SlideShare a Scribd company logo
Metasploit for Beginners
Ramnath
Whoami
Ramnath Shenoy
• Engineering @ FireEye
• https://www.linkedin.com/in/ramnathshenoyk
• @Ramnathsk
Metasploit for Beginners
●Why Metasploit?
●Demo Setup
●Auxiliary Module
●Exploit Module
●Payloads
●Demo 1 - Elastic Search exploit
●Demo 2 - Jenkins exploit
Why Metasploit?
● Published independently
● Different programming languages
● Targeted limited to a specific platform
● No evasion techniques
● No clear documentation
● No coding style and difficult to embed /modify
Metasploit Framework
Current stable version is v4.13.X
• Written in ruby, https://github.com/rapid7/metasploit-framework.git,
• [ 1610 exploits, 914 auxiliary, 279 post ,471 payloads , 39 encoders , 9 nops ]
Ready in kali - used in this demo.
Available as windows installer. (Never really tried!..)
Metasploit Architecture
Libraries
Interfaces
Modules
nops payloads exploits Auxiliary Encoder Post
msfconsole
Rex
MSF::Core
MSF::Base
Tools
Plugins
Visualising an attack
Target
Vulnerable software
PayloadExploitAuxiliary
Windows/Shell
Windows/add user
Remote exploit
Local exploit
Scan and enumerate
Rogue Servers
Post
Enum credentials
Exploit suggest
Exploit Payload Post
msfconsole
Demo Setup!
Target Windows 2008 R2 – Metasploitable3
Designed vulnerable to test payload
Setup instructions https://github.com/rapid7/metasploitable3
172.28.128.4
Metasploit/kali
Attacker
172.28.128.3
Victim
Windows 2k8
Virtual Box
Msfconsole Navigation cheat sheet!
Msfupdate - update
Msfconsole – initialize metasploit
>help - example: help search
>search – example: search name:pcman type:exploit
>show - example show info, show options and show advanced
>use - example use exploit/.., use aux/.., use payload/..
>set, unset, setg & unsetg - set payload/.. set exitfunc
>back,previous
Exploit ,POST and Payload specifics
>set RHOST : Victim IP
>set RPORT: Victim port
>set LHOST: Attacker IP
>set LPORT: Attacker Port on Reverse Connect or Victim Port on Bind
>set SESSION: The Session id of an earlier attack to attempt Local priv esc
Commands Prior Demo!
• Start the PostgreSQL, initialize database for metasploit and then proceed with starting msfconsole
• Setup a workspace within metasploit to store enumeration result
• Initialise a scan with nmap to store its results. Results in db will be accessible via “services”
Auxiliary Module - Demo
• Brute Force access tests on different protocols.
• Enumerate and gather more information with limited access.
• Check for misconfigured or default Web Portals.
• Set up a rogue- ftp,http,smb,imap servers
Auxiliary Module - “use auxiliary/scanner/snmp/snmp_enum”
Exploit Module
Searching remote exploits are typically -> exploit/Platform/protocol/Application_or_service
Searching local exploits are typically -> exploit/Platform/local/Application_or_service
Payload Module
Bind Shell TCP
• Successful exploitation leads to a new port on Victim with shell access.
Reverse Shell TCP
• Successful exploitation makes to client connect to Attack and provide its shell.
BindShell-Listener
Reverse Shell-Listener
Exploit
Exploit
Exploit Module -Demo
exploit/multi/elasticsearch/script_mvel_rce
ElasticSearch ->1.1.1
Payload -> java/shell/reverse_tcp
Exploit Module 2
In these cases we will need to use the attacker machine as a server, servicing
the delivery of the exploit. We will need 2 more options,
SRVHOST and SRVPORT
Meterpreter Payload ,provides an interactive environment with functionalities
likes
• Getsystem, clearnenv, migrate, hashdump, post, up/download,edit
• Run portrecorder , load mimikatz..
Exploit Module -Demo 2
• exploit/multi/http/jenkins_script_console
• windows/meterpreter/reverse_tcp
Thanks.

More Related Content

PPTX
Metasploit
PPTX
Introduction to Metasploit
 
PDF
PHDays 2018 Threat Hunting Hands-On Lab
PDF
Metasploit for Penetration Testing: Beginner Class
PDF
A Threat Hunter Himself
PDF
Hunting for Credentials Dumping in Windows Environment
PPTX
Metasploit framework in Network Security
PPTX
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
Metasploit
Introduction to Metasploit
 
PHDays 2018 Threat Hunting Hands-On Lab
Metasploit for Penetration Testing: Beginner Class
A Threat Hunter Himself
Hunting for Credentials Dumping in Windows Environment
Metasploit framework in Network Security
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour

What's hot (20)

PPTX
Reverse shell
PDF
Metasploit et Metasploitable2 : exploiter VSFTPD v2.3.4
PPTX
Keyloger & spyware
PDF
Hunting malware with volatility v2.0
PPTX
Intrusion Detection Systems (IDS)
PPT
Port scanning
PPTX
Introduction To Vulnerability Assessment & Penetration Testing
PDF
Privilege escalation from 1 to 0 Workshop
PDF
Pentest with Metasploit
PDF
OWASP Top 10 Web Application Vulnerabilities
PPTX
Client side attacks using PowerShell
PPTX
Derbycon - Passing the Torch
PDF
(Mis)trusting and (ab)using ssh
PDF
Site JEE de ECommerce Basé sur Spring IOC MVC Security JPA Hibernate
PDF
Penetration testing web application web application (in) security
PDF
Microservices avec Spring Cloud
PPTX
Metasploit framwork
PPTX
Malware Classification and Analysis
PPTX
Exploitation techniques and fuzzing
PPT
IDS and IPS
Reverse shell
Metasploit et Metasploitable2 : exploiter VSFTPD v2.3.4
Keyloger & spyware
Hunting malware with volatility v2.0
Intrusion Detection Systems (IDS)
Port scanning
Introduction To Vulnerability Assessment & Penetration Testing
Privilege escalation from 1 to 0 Workshop
Pentest with Metasploit
OWASP Top 10 Web Application Vulnerabilities
Client side attacks using PowerShell
Derbycon - Passing the Torch
(Mis)trusting and (ab)using ssh
Site JEE de ECommerce Basé sur Spring IOC MVC Security JPA Hibernate
Penetration testing web application web application (in) security
Microservices avec Spring Cloud
Metasploit framwork
Malware Classification and Analysis
Exploitation techniques and fuzzing
IDS and IPS
Ad

Viewers also liked (20)

PDF
PPTX
An Introduction to Sysinternals
PPTX
Netcat - A Swiss Army Tool
PPTX
DataSploit - Tool Demo at Null Bangalore - March Meet.
PPTX
Poodle
PPTX
Malvertising
PDF
Radare2 - An Introduction by Anto Joseph
PPTX
Threat intelligence - nullmeetblr 21st June 2015
PPTX
Panel discussion social engineering - manasdeep - nullmeetblr 21st June 2015
ODP
PPTX
IOS Security Basics - NULL/ OWASP/G4H Meet
PPTX
Penetration testing using metasploit
PPTX
Inteligencia artificial
PPTX
Ethical Hacking Services
DOCX
Ceh certified ethical hacker
PPTX
3Es of Ransomware
PDF
Buffer overflow null
PPTX
Http2 Security Perspective
An Introduction to Sysinternals
Netcat - A Swiss Army Tool
DataSploit - Tool Demo at Null Bangalore - March Meet.
Poodle
Malvertising
Radare2 - An Introduction by Anto Joseph
Threat intelligence - nullmeetblr 21st June 2015
Panel discussion social engineering - manasdeep - nullmeetblr 21st June 2015
IOS Security Basics - NULL/ OWASP/G4H Meet
Penetration testing using metasploit
Inteligencia artificial
Ethical Hacking Services
Ceh certified ethical hacker
3Es of Ransomware
Buffer overflow null
Http2 Security Perspective
Ad

Similar to Metasploit For Beginners (20)

PDF
Metasploit: Pwnage and Ponies
PDF
Metasploit Computer security testing tool
PPTX
Client side exploits
DOCX
Backtrack Manual Part6
DOCX
Backtrack Manual Part7
KEY
Metasploit @ 2010 Utah Open Source Conference
PDF
Metasploit Humla for Beginner
PDF
Metasploitation part-1 (murtuja)
PPTX
Metasploit - Basic and Android Demo
DOCX
Google Hacking Lab ClassNameDate This is an introducti.docx
PPTX
Metasploit
PDF
iCrOSS 2013_Pentest
PDF
Cheatsheet: Metasploit
PPTX
Intro to exploits in metasploitand payloads in msfvenom
PPTX
Metasploit
PPTX
Intimacy with MSF - Metasploit Framework
PPTX
BSides Algiers - Metasploit framework - Oussama Elhamer
PPTX
Metasploit for Web Workshop
PDF
24 33 -_metasploit
Metasploit: Pwnage and Ponies
Metasploit Computer security testing tool
Client side exploits
Backtrack Manual Part6
Backtrack Manual Part7
Metasploit @ 2010 Utah Open Source Conference
Metasploit Humla for Beginner
Metasploitation part-1 (murtuja)
Metasploit - Basic and Android Demo
Google Hacking Lab ClassNameDate This is an introducti.docx
Metasploit
iCrOSS 2013_Pentest
Cheatsheet: Metasploit
Intro to exploits in metasploitand payloads in msfvenom
Metasploit
Intimacy with MSF - Metasploit Framework
BSides Algiers - Metasploit framework - Oussama Elhamer
Metasploit for Web Workshop
24 33 -_metasploit

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Electronic commerce courselecture one. Pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Understanding_Digital_Forensics_Presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectroscopy.pptx food analysis technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Electronic commerce courselecture one. Pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.

Metasploit For Beginners

  • 2. Whoami Ramnath Shenoy • Engineering @ FireEye • https://www.linkedin.com/in/ramnathshenoyk • @Ramnathsk
  • 3. Metasploit for Beginners ●Why Metasploit? ●Demo Setup ●Auxiliary Module ●Exploit Module ●Payloads ●Demo 1 - Elastic Search exploit ●Demo 2 - Jenkins exploit
  • 4. Why Metasploit? ● Published independently ● Different programming languages ● Targeted limited to a specific platform ● No evasion techniques ● No clear documentation ● No coding style and difficult to embed /modify
  • 5. Metasploit Framework Current stable version is v4.13.X • Written in ruby, https://github.com/rapid7/metasploit-framework.git, • [ 1610 exploits, 914 auxiliary, 279 post ,471 payloads , 39 encoders , 9 nops ] Ready in kali - used in this demo. Available as windows installer. (Never really tried!..)
  • 6. Metasploit Architecture Libraries Interfaces Modules nops payloads exploits Auxiliary Encoder Post msfconsole Rex MSF::Core MSF::Base Tools Plugins
  • 7. Visualising an attack Target Vulnerable software PayloadExploitAuxiliary Windows/Shell Windows/add user Remote exploit Local exploit Scan and enumerate Rogue Servers Post Enum credentials Exploit suggest Exploit Payload Post msfconsole
  • 8. Demo Setup! Target Windows 2008 R2 – Metasploitable3 Designed vulnerable to test payload Setup instructions https://github.com/rapid7/metasploitable3 172.28.128.4 Metasploit/kali Attacker 172.28.128.3 Victim Windows 2k8 Virtual Box
  • 9. Msfconsole Navigation cheat sheet! Msfupdate - update Msfconsole – initialize metasploit >help - example: help search >search – example: search name:pcman type:exploit >show - example show info, show options and show advanced >use - example use exploit/.., use aux/.., use payload/.. >set, unset, setg & unsetg - set payload/.. set exitfunc >back,previous Exploit ,POST and Payload specifics >set RHOST : Victim IP >set RPORT: Victim port >set LHOST: Attacker IP >set LPORT: Attacker Port on Reverse Connect or Victim Port on Bind >set SESSION: The Session id of an earlier attack to attempt Local priv esc
  • 10. Commands Prior Demo! • Start the PostgreSQL, initialize database for metasploit and then proceed with starting msfconsole • Setup a workspace within metasploit to store enumeration result • Initialise a scan with nmap to store its results. Results in db will be accessible via “services”
  • 11. Auxiliary Module - Demo • Brute Force access tests on different protocols. • Enumerate and gather more information with limited access. • Check for misconfigured or default Web Portals. • Set up a rogue- ftp,http,smb,imap servers
  • 12. Auxiliary Module - “use auxiliary/scanner/snmp/snmp_enum”
  • 13. Exploit Module Searching remote exploits are typically -> exploit/Platform/protocol/Application_or_service Searching local exploits are typically -> exploit/Platform/local/Application_or_service
  • 14. Payload Module Bind Shell TCP • Successful exploitation leads to a new port on Victim with shell access. Reverse Shell TCP • Successful exploitation makes to client connect to Attack and provide its shell. BindShell-Listener Reverse Shell-Listener Exploit Exploit
  • 16. Exploit Module 2 In these cases we will need to use the attacker machine as a server, servicing the delivery of the exploit. We will need 2 more options, SRVHOST and SRVPORT Meterpreter Payload ,provides an interactive environment with functionalities likes • Getsystem, clearnenv, migrate, hashdump, post, up/download,edit • Run portrecorder , load mimikatz..
  • 17. Exploit Module -Demo 2 • exploit/multi/http/jenkins_script_console • windows/meterpreter/reverse_tcp

Editor's Notes

  • #6: Why ruby? https://dev.metasploit.com/pipermail/framework/2006-October/001325.html On ubuntu? http://www.darkoperator.com/installing-metasploit-in-ubunt/