Metasploit Section 3 of 10
Essential msfconsole Commands
Master these fundamental commands to navigate msfconsole effectively.
searchSearch for modules by name or keywordsearch ms17_010useSelect a module for useuse exploit/windows/smb/ms17_010_eternalblueinfoShow detailed information about the selected moduleinfoshow optionsDisplay required and optional parametersshow optionssetAssign a value to a module optionset RHOSTS 192.168.1.10unsetRemove a value from a module optionunset RHOSTSsetgSet a global option valuesetg LHOST 10.0.0.1exploitRun the selected exploit moduleexploitrunRun the selected auxiliary or post moduleruncheckCheck if target is vulnerablecheckbackReturn to the main prompt without the module selectedbacksessionsList active sessionssessions -lsessions -iInteract with a specific sessionsessions -i 1Session Management
bash
1sessions -l # List all sessions\nsessions -i 1 # Interact with session 1\nsessions -k 1 # Kill session 1\nsessions -K # Kill all sessions
Workspace Management
bash
1workspace -a pentest # Create new workspace\nworkspace -s pentest # Switch to workspace\nworkspace -d pentest # Delete workspace