![[Metasploit - Cheat Sheet#Search]]
![[Metasploit - Cheat Sheet#Module]]
![[Metasploit - Cheat Sheet#Jobs]]
![[Metasploit - Cheat Sheet#Run (Backgroundjob)]]
![[Metasploit - Cheat Sheet#RHOSTS ip address list]]
![[Metasploit - Cheat Sheet#Impacket Secretsdump]]
![[Metasploit - Cheat Sheet#SMB Login]]
![[Metasploit - Cheat Sheet#impersonate_ssl]]
![[Metasploit - Cheat Sheet#Custom SSL]]
![[Metasploit - Cheat Sheet#Sessions]]
Modules
List all modules
load -l
Run module
meterpreter > run scriptname
| Scriptname | Action |
|---|---|
| checkvm | check if target system is a VM |
| getcountermeasure | checks security settings |
| getgui | try to enable RDP |
| get_local_subnets | list local subnets |
| gettelnet | enable telnet |
| hostsedit | edit the hosts file |
| killav | try to kill antivirus |
| remotewinenum | enumerate system information |
| scraper | enumerate more system information |
| winenum | detailed windows enumeration |
![[Metasploit - Cheat Sheet#WinRM_Login]]
![[Metasploit - Cheat Sheet#Alias]]
![[Metasploit - Cheat Sheet#wiki]]
![[Metasploit - Cheat Sheet#Service]]
![[Metasploit - Cheat Sheet#UAC Enumeration]]
![[Metasploit - Cheat Sheet#Local Exploit Suggester]]
![[Metasploit - Cheat Sheet#SMB PsExec]]
![[Metasploit - Cheat Sheet#Upgrade Shell to Meterpreter]]
Initialize a database with msfdb init. A database with user and password will be generated.
Database nmap
msf6 > db_connect user:pass@localhost/msf
msf6 > db_status
msf6 > workspace
msf6 > workspace -a new_ws
msf6 > db_nmap -sP 192.168.2.0/24
msf6 > hosts
msf6 > use auxiliary/scanner/portscan/tcp
msf6 auxiliary(scanner/portscan/tcp) > hosts -R
msf6 auxiliary(scanner/portscan/tcp) > run