Tags
Initial AccessPost Exploitation
Table of Contents
- Table of Contents
- Basic Commands
- Working with Sessions
- Database Commands
- Exploit and Payload Commands
- Advanced Commands
- Networking Commands
Basic Commands
msfconsole: Launch Metasploit console.help: Display help for core commands inmsfconsole.search [keyword]: Search for modules (exploits, payloads, etc.) related to the keyword.use [module path]: Select a module by path.info: Display information about the current module.show options: Show options for the current module.set [option] [value]: Set a value for a module option.exploit: Run the selected exploit module.runorexecute: Run auxiliary modules.
Working with Sessions
sessions: List all active sessions.sessions -i [session id]: Interact with a specific session.background: Background the current session.
Database Commands
db_status: Show the current database status.db_connect [string]: Connect to a database.hosts: List all hosts in the database.services: List all services in the database.vulns: List all vulnerabilities in the database.
Exploit and Payload Commands
show exploits: List all exploits in the database.show payloads: List all payloads in the database.set payload [payload path]: Choose a payload to use with an exploit.generate -t [format] -f [filename]: Generate a payload in a specific format.
Advanced Commands
setg [option] [value]: Set a global variable.save: Save the current configuration.edit [file]: Edit a module or script.reload_all: Reload all modules.
Networking Commands
route: View and modify the routing table.arp: Display ARP cache.netstat: Show network connections.