Metasploit Framework

Metasploit Framework Cheatsheet Default Ports: N/A (framework) — handlers commonly bind 4444/tcp For authorized testing, CTFs, and lab use only. Always have explicit permission. Starting Up msfconsole # Launch the console msfconsole -q # Launch quietly (no banner) msfconsole -r script.rc # Run a resource script on start msfdb init # Initialise the PostgreSQL database msfdb status # Check database status service postgresql start # Start DB backend (if not running) Inside the console: db_status # Confirm DB connection version # Show framework version help # List commands banner # Print a random banner Core Console Commands Command Description search <term> Search modules use <module> Select a module info Show details of current module show options Show required/optional settings show advanced Show advanced options show payloads List compatible payloads show targets List target platforms set <opt> <val> Set an option setg <opt> <val> Set an option globally (all modules) unset <opt> Clear an option (unset all for all) run / exploit Execute the module back Leave the current module info -d Open module docs in browser Searching Modules search type:exploit platform:windows smb search cve:2017-0144 # EternalBlue search name:eternalblue search type:auxiliary scanner ssh search rank:excellent type:exploit struts Search filters: type: platform: cve: name: rank: author: app: port: ...

5 min · d3vilsec