Metasploit
Setup
Start the postgresql service:
Enable the postgresql service at boot:
Create and initialize the MSF database:
Update Metasploit:
Start Metasploit quietly:
Commands
use: activate a module
use exploit/multi/handler
back: go back to the main prompt
previous: activate the previously-used module
show: display module-related info
show options
show payloads
show targets
set/unset: configure options for the currently-used module
set LHOST tun0
set LPORT 443
unset LHOST
unset LPORT
setg/unsetg: configure options for all modules during this Metasploit session
setg LHOST tun0
setg LPORT 443
unsetg LHOST
unsetg LPORT
Database Access
Show stored findings in the current module:
Check a specific finding on port 445:
Run Nmap and save the findings to the database:
Display all discovered hosts:
Add Exploits to Metasploit
If searchsploit
finds a Metasploit exploit but it is not in the Metasploit framework, add it manually:
In Metasploit, run reload_all
.
Advanced Options
Metasploit modules have some advanced options for you to play with. For example, in exploit/linux/samba/is_known_pipename
, we have to set SMB version to 1. This is done in one of the advanced options:
Set SMB:ProtocolVersion
to 1:
Last updated