A.Chaitanya Krishna
Vivek Ramachandran (SecurityTube.net)


Bharath (Kiva Cyber securities)


My friends
Agenda
   Introduction to Metasploit Framework

   Keywords

   Introduction to Metasploit

   Meterpreter


   Enhancing Meterpreter using Railguns

   Adding Railguns Functions and Dlls on fly

   Demo
Buzz Words


    Vulnerability   Weakness existed in a system which could be compromised.




      Exploit       Code which works on the target vulnerability system.




      Payload       Actual Code that lets an attacker to gain access after exploitation
Metasploit Framework
Widely used Tool for Development and Testing Vulnerabilities


         Buzzing word security community


         Used for Penetration Testing


         IDS signature development

         Exploit Development
Why we need to opt Metasploit

  Widely accepted tool for the Testing vulnerabilities


  Makes complex tasks more ease


  Posses rich set of modules organized in systematic manner


  Has Regular updates

  Contains different types 1000 + exploits , 200 + Payloads, 500+ Auxiliary Modules
Meterpreter

  Meterpreter >

          Its a default Goto Payload for Windows

          Provides Enhanced Command Shell for the attacker

          Consists of default set of core commands

          Can be extended at runtime by shipping DLLs on the Victim machine

          Provides basic post-exploitation API
Working of Meterpreter
   Getting a meterpreter shell undergoes 3 different stages



      sends exploit + Stage 1 Payload




                     sends DLL injection payload




                                   meterpreter DLL starts communication
Sample Scenario



                   Sends Combination of
                    Payload and Exploit



Backtrack                                 Windows XP
192.168.47.129                            192.168.47.128
Metasploit Railguns presentation @ tcs hyderabad
Why Railguns
Meterpreter > irb
[*] Starting IRB shell
[*] The ‘Client’ variable holds meterpreter client
>>



          Meterpreter extension that allows an attacker to run any DLL’s

          Allows arbitrary loading of DLL’s

          Windows API DLL’s are known paths. So we can load them very easily

          Railgun gives us flexibility and power to call arbitrary functions in DLL's on victims machine
Hello World DLLs


As windows operating system is known for its rich set of DLLs


Contains shipped in DLLs along with windows as well as from installed applications


Can be called on the fly using the irb mode or can be statically define them


/opt/metasploit/msf3/lib/rex/post/meterpreter/extensions/stdapi/railgun/def
Introduction to DLLs and Functions

        Not all functions are defined to call.

        Need to add our own DLLs to call them during the runtime.

        Appropriate Function to be called for particular DLL

Meterpreter > irb
[*] Starting IRB shell
[*] The ‘Client’ variable holds meterpreter client
>> Client.railgun.user32.MessageBoxA(0, “Hello Null Hyderabad, Welcome to the meet”, “NullCon” , “MB_OK”)
Anatomy of Functions
Function Name


Function Return Type
      In Parameters are the arguments through which we pass input to the function

      Out Parameters are full-fledged data pointers and complete memory allocation is entirely managed

      by Railgun

      Out Parameters

Array of Parameters
Metasploit Railguns presentation @ tcs hyderabad
Necessity of DLLs and Functions

In the middle of our penetration testing we need to call additional API for support to our work.

Can be called during fly or else we need to define them statically


        /opt/metasploit/msf3/lib/rex/post/meterpreter/extensions/stdapi/railgun/def
Metasploit Railguns presentation @ tcs hyderabad
Adding Functions on fly

Meterpreter > irb
[*] Starting IRB shell
[*] The ‘Client’ variable holds meterpreter client
>> ?> client.railgun.known_dll_names

=> ["kernel32", "ntdll", "user32", "ws2_32", "iphlpapi", "advapi32", "shell32", "netapi32", "crypt32", "wlanapi"]

  unless client.railgun.known_dll_names.include? ‘NullCon ‘

    print_status "Adding NullCon.dll"

    client.railgun.add_dll(‘NullCon','C:WINDOWSsystem32NullCon.dll')

  else
         print_status “NullCon DLL has already loaded.. skipping"
  end
Metasploit Railguns presentation @ tcs hyderabad
Adding Functions on fly

Meterpreter > irb
[*] Starting IRB shell
[*] The ‘Client’ variable holds meterpreter client
>> client.railgun.add_funcution('netapi32', 'NetuserChangePassword', 'DWORD',[
   ["pwchar", "domainname", "in"],
   ["pwchar", "username", "in"],
   ["pwchar", "oldpassword", "in"],
   ["pwchar", "newpassword", "in"])

= = > => #<Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::DLLFunction:0x00000006d4fa70
@return_ me", "in"], ["PWCHAR", "oldpassword", "in"], ["PWCHAR", "newpassword", "in"]], @windows_name="N


>> client.railgun.netapi32.NetUserChangePassword(‘nil’, “NullCon”, “NullCon”, “NullCon123”)
That’s all

Client.railgun.user32.MessageBoxA(0, “That’s what in my slides to show”, “NullCon” , “MB_OK”)




                                                                                                Chaitanyapentest@gmail.com

More Related Content

PDF
Metasploit Humla for Beginner
PPTX
Metasploit seminar
PDF
Metaploit
PPTX
Metasploit
PPTX
Metasploit framework in Network Security
PPTX
Penetration testing using metasploit
Metasploit Humla for Beginner
Metasploit seminar
Metaploit
Metasploit
Metasploit framework in Network Security
Penetration testing using metasploit

What's hot (20)

PPTX
Metasploit For Beginners
PPTX
Introduction To Exploitation & Metasploit
PPTX
Metasploit framwork
PPTX
Finalppt metasploit
PDF
Metasploit - The Exploit Learning Tree
PPTX
Metasploit (Module-1) - Getting Started With Metasploit
PDF
Metasploit for Penetration Testing: Beginner Class
PPTX
Metasploit
PPTX
Metasploit for Web Workshop
PPT
Automated Penetration Testing With The Metasploit Framework
PPTX
Metasploit & Windows Kernel Exploitation
PDF
Metasploit
PPTX
Metasploit - Basic and Android Demo
PPTX
Metasploit
PDF
Pentest with Metasploit
PDF
SSMF (Security Scope Metasploit Framework) - Course Syllabus
PPTX
BH Arsenal '14 TurboTalk: The Veil-framework
PPTX
Linux operating system
PPTX
Practical Windows Kernel Exploitation
PPTX
Vulnerability, exploit to metasploit
Metasploit For Beginners
Introduction To Exploitation & Metasploit
Metasploit framwork
Finalppt metasploit
Metasploit - The Exploit Learning Tree
Metasploit (Module-1) - Getting Started With Metasploit
Metasploit for Penetration Testing: Beginner Class
Metasploit
Metasploit for Web Workshop
Automated Penetration Testing With The Metasploit Framework
Metasploit & Windows Kernel Exploitation
Metasploit
Metasploit - Basic and Android Demo
Metasploit
Pentest with Metasploit
SSMF (Security Scope Metasploit Framework) - Course Syllabus
BH Arsenal '14 TurboTalk: The Veil-framework
Linux operating system
Practical Windows Kernel Exploitation
Vulnerability, exploit to metasploit
Ad

Similar to Metasploit Railguns presentation @ tcs hyderabad (20)

PPT
Distributed System by Pratik Tambekar
PDF
Typhoon Managed Execution Toolkit
PDF
Formbook - In-depth malware analysis (Botconf 2018)
PPTX
Monitoring distributed (micro-)services
PPT
PPT
PPTX
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
PDF
Deltacloud API
PPTX
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
KEY
The use of Symfony2 @ Overblog
PPT
PDF
[2009 CodeEngn Conference 03] koheung - 윈도우 커널 악성코드에 대한 분석 및 방법
ODP
Firebird 3: provider-based architecture, plugins and OO approach to API
PPT
Windows Filtering Platform And Winsock Kernel
PPTX
Unit 1
PPT
PDF
Advanced System Security and Digital Forensics
PDF
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PPTX
Weaponizing the Windows API with Metasploit's Railgun
PPTX
DevOps, Microservices and Serverless Architecture
Distributed System by Pratik Tambekar
Typhoon Managed Execution Toolkit
Formbook - In-depth malware analysis (Botconf 2018)
Monitoring distributed (micro-)services
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Deltacloud API
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
The use of Symfony2 @ Overblog
[2009 CodeEngn Conference 03] koheung - 윈도우 커널 악성코드에 대한 분석 및 방법
Firebird 3: provider-based architecture, plugins and OO approach to API
Windows Filtering Platform And Winsock Kernel
Unit 1
Advanced System Security and Digital Forensics
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
Weaponizing the Windows API with Metasploit's Railgun
DevOps, Microservices and Serverless Architecture
Ad

Recently uploaded (20)

PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
HVAC Specification 2024 according to central public works department
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
advance database management system book.pdf
PDF
IGGE1 Understanding the Self1234567891011
PDF
Trump Administration's workforce development strategy
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Empowerment Technology for Senior High School Guide
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
Introduction to pro and eukaryotes and differences.pptx
Complications of Minimal Access-Surgery.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
HVAC Specification 2024 according to central public works department
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Cambridge-Practice-Tests-for-IELTS-12.docx
TNA_Presentation-1-Final(SAVE)) (1).pptx
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
advance database management system book.pdf
IGGE1 Understanding the Self1234567891011
Trump Administration's workforce development strategy
LDMMIA Reiki Yoga Finals Review Spring Summer
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Empowerment Technology for Senior High School Guide
FORM 1 BIOLOGY MIND MAPS and their schemes

Metasploit Railguns presentation @ tcs hyderabad

  • 2. Vivek Ramachandran (SecurityTube.net) Bharath (Kiva Cyber securities) My friends
  • 3. Agenda Introduction to Metasploit Framework Keywords Introduction to Metasploit Meterpreter Enhancing Meterpreter using Railguns Adding Railguns Functions and Dlls on fly Demo
  • 4. Buzz Words Vulnerability Weakness existed in a system which could be compromised. Exploit Code which works on the target vulnerability system. Payload Actual Code that lets an attacker to gain access after exploitation
  • 5. Metasploit Framework Widely used Tool for Development and Testing Vulnerabilities Buzzing word security community Used for Penetration Testing IDS signature development Exploit Development
  • 6. Why we need to opt Metasploit Widely accepted tool for the Testing vulnerabilities Makes complex tasks more ease Posses rich set of modules organized in systematic manner Has Regular updates Contains different types 1000 + exploits , 200 + Payloads, 500+ Auxiliary Modules
  • 7. Meterpreter Meterpreter > Its a default Goto Payload for Windows Provides Enhanced Command Shell for the attacker Consists of default set of core commands Can be extended at runtime by shipping DLLs on the Victim machine Provides basic post-exploitation API
  • 8. Working of Meterpreter Getting a meterpreter shell undergoes 3 different stages sends exploit + Stage 1 Payload sends DLL injection payload meterpreter DLL starts communication
  • 9. Sample Scenario Sends Combination of Payload and Exploit Backtrack Windows XP 192.168.47.129 192.168.47.128
  • 11. Why Railguns Meterpreter > irb [*] Starting IRB shell [*] The ‘Client’ variable holds meterpreter client >> Meterpreter extension that allows an attacker to run any DLL’s Allows arbitrary loading of DLL’s Windows API DLL’s are known paths. So we can load them very easily Railgun gives us flexibility and power to call arbitrary functions in DLL's on victims machine
  • 12. Hello World DLLs As windows operating system is known for its rich set of DLLs Contains shipped in DLLs along with windows as well as from installed applications Can be called on the fly using the irb mode or can be statically define them /opt/metasploit/msf3/lib/rex/post/meterpreter/extensions/stdapi/railgun/def
  • 13. Introduction to DLLs and Functions Not all functions are defined to call. Need to add our own DLLs to call them during the runtime. Appropriate Function to be called for particular DLL Meterpreter > irb [*] Starting IRB shell [*] The ‘Client’ variable holds meterpreter client >> Client.railgun.user32.MessageBoxA(0, “Hello Null Hyderabad, Welcome to the meet”, “NullCon” , “MB_OK”)
  • 14. Anatomy of Functions Function Name Function Return Type In Parameters are the arguments through which we pass input to the function Out Parameters are full-fledged data pointers and complete memory allocation is entirely managed by Railgun Out Parameters Array of Parameters
  • 16. Necessity of DLLs and Functions In the middle of our penetration testing we need to call additional API for support to our work. Can be called during fly or else we need to define them statically /opt/metasploit/msf3/lib/rex/post/meterpreter/extensions/stdapi/railgun/def
  • 18. Adding Functions on fly Meterpreter > irb [*] Starting IRB shell [*] The ‘Client’ variable holds meterpreter client >> ?> client.railgun.known_dll_names => ["kernel32", "ntdll", "user32", "ws2_32", "iphlpapi", "advapi32", "shell32", "netapi32", "crypt32", "wlanapi"] unless client.railgun.known_dll_names.include? ‘NullCon ‘ print_status "Adding NullCon.dll" client.railgun.add_dll(‘NullCon','C:WINDOWSsystem32NullCon.dll') else print_status “NullCon DLL has already loaded.. skipping" end
  • 20. Adding Functions on fly Meterpreter > irb [*] Starting IRB shell [*] The ‘Client’ variable holds meterpreter client >> client.railgun.add_funcution('netapi32', 'NetuserChangePassword', 'DWORD',[ ["pwchar", "domainname", "in"], ["pwchar", "username", "in"], ["pwchar", "oldpassword", "in"], ["pwchar", "newpassword", "in"]) = = > => #<Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::DLLFunction:0x00000006d4fa70 @return_ me", "in"], ["PWCHAR", "oldpassword", "in"], ["PWCHAR", "newpassword", "in"]], @windows_name="N >> client.railgun.netapi32.NetUserChangePassword(‘nil’, “NullCon”, “NullCon”, “NullCon123”)
  • 21. That’s all Client.railgun.user32.MessageBoxA(0, “That’s what in my slides to show”, “NullCon” , “MB_OK”) Chaitanyapentest@gmail.com