What is SMB Relay?
Definition
Instead of cracking hashes gathered with responder (just as in LLMNR Poisoning), we can instead relay those hashes to specific machines and potentially gain access.
Let’s assume machine (A) has the same password as machine (B), and machine (A) has administrator privileges on machine (B). If the NTLMv2 hash of machine (A) is captured (without the need of cracking it), it can be relayed to machine (B) and get access to machine (B).
The main advantage of SMB Relay is that you DO NOT need to crack the hash to get the password.
Requirements and identification
Requirements
- SMB singing must be disabled or not enforced on the target (This is the default setting)
- Relayed user credentials must be admin on other’s machine for any real value (Keep in your mind that you CAN NOT relay to your self). So that means the captured relayed credentials MUST be local admin on a different machine.
Identify hosts without SMB signing
To identify whether the host has SMB signing enabled or not (don’t forget to run netdiscover tool first):
No results for alive hosts
Sometimes you scan hosts that you’re 100% sure that they’re alive but nmap shows no results or says something like “Host seems down”. To mitigate this problem use the flag -Pn
Executing SMB Relay attack
- Edit the configuration of responder, turn of both HTTP and SMB because we want to make sure that the hashes captured are being relayed
- Set up responder (BUT DO NOT RUN)
- Set up relay tool
- Run
ntlmrelay
thenresponder
- Capture an event
- Gain access (Potentially)
Dumped SAM hashes (LM:NT)
This tool will Dump SAM hashes if the attack is successful, these hashes can be useful for gaining shell access using MS or Pass Attacks.