Metasploit introduction
From Hackerspace Brussels
|
What is Metasploit? How does it work? Just the first baby steps. Let's figure out more together...
The Metasploit Project is a computer security project that provides information about security vulnerabilities and aids in penetration testing.
More info on the project site: https://www.metasploit.com
Some introductory videos and other resources
Please have a look at them so we can speed up to the fun part...
- https://www.youtube.com/watch?v=8lR27r8Y_ik
- https://www.youtube.com/watch?v=6SNHuWaLuhU
- https://www.youtube.com/watch?v=CYB6Uta9VTI
- https://www.youtube.com/watch?v=AyMgYhwyGSE
- Msf venom: https://netsec.ws/?p=331
- Metasploit tutorials: https://www.hackers-arise.com/metasploit-1
What you need to do
An environment with a few typical vulnerable devices (metasploitable, ...) will be available to go at it. Bring a laptop with WiFi and metasploit installed. You could also just run from a virtual machine or live CD with Kali Linux or Parrot OS.
- Kali Linux: https://www.kali.org/
- Parrot OS: https://www.parrotsec.org/
Slide Deck
About Metasploit
- Product by Rapid7 – also has a pro (paid) version
- Other tools
- Metasploitable 2 & 3
- A few freebies
- Lots of paid tools
- Course: https://www.offensive-security.com/metasploit-unleashed/
- Website: https://www.rapid7.com/products/metasploit/
- Part of Kali Linux: https://kali.org & https://kali.training
6 types of modules
- Exploits: take advantage of a system vulnerability
- Payloads: plant this on the system to get access
- Auxiliary: discovery tools (crawl, scan, snif) etc...
- Nops: “nop = do nothing” – to allow remote execution
- Post: post-exploitation tools (escalation, capture, ...)
- Encoders: evasion, bypassing firewall, etc...
Basic commands in Metasploit
- Help = overview of all commands
- use: load a module → visible in command line
- search: search a module
- set and setg (set globally)
- back
- exit
!! Autocomplete :D (tab)
Most important commands in a module
- show info
- show options
- show payloads
- show targets
- set and setg
- run (=exploit)
Searching in metasploit
- Parameters
- Platform
- Type
- Ranking (-R) https://github.com/rapid7/metasploit-framework/wiki/Exploit-Ranking
- Search platform:windows type:windows flash
First steps when looking into a network
- IP-range
- Open ports
- TOOL: nmap
- Metasploit: db_nmap
Modular Layout
You can easily add modules to MetaSploit. You can find these on Github or on Exploit-db.
Practical tips
- Go to /usr/share/metasploit-framework/modules and keep this over for a practical overview of available modules
- ...