THM Practice Room- https://tryhackme.com/room/rpmetasploit
Metasploit is case-insensitive. Variables can be in CAPITAL or small case letters.
Initialize the database - msfdb init
Check that we've connected to the database - db_status
start Metasploit - msfconsole
or msfdb run
Find modules - search <module_name>
Select a module as the active module - use <module_name OR number>
Set remote host variable - set RHOSTS <remote_host_IP>
Also set any other required variable
Exploit the target - exploit
OR run
msfdb run
→ start the database and run msfconsole, it stores cracked passwords in its database, check using creds
while using Metasploit
setg
→ set global variables, unsetg
→ unset a global variable, guide
Run Nmap inside Metasploit - db_nmap <IP>
List of service available after scan - services
Default Payload - windows/meterpreter/reverse_tcp
After exploitation,
getuid
sysinfo
getprivs
run post/windows/gather/checkvm
run post/multi/recon/local_exploit_suggester
run post/windows/manage/enable_rdp