# SMB Relay (LLNMR, NTB-NS & WPAD)

The Server Message Block (SMB) protocol allows clients (like workstations) to communicate with a server (like a file share). In Microsoft AD networks, SMB governs everything from inter-network file-sharing to remote administration.

> Responder allows us to perform Man-in-the-Middle attacks by poisoning the responses during NetNTLM authentication, tricking the client into talking to you instead of the actual server they wanted to connect to. On a real LAN, Responder will attempt to poison any Link-Local Multicast Name Resolution (LLMNR), NetBIOS Name Service (NBT-NS), and Web Proxy Auto-Discovery (WPAD) requests that are detected.

> On large Windows networks, these protocols allow hosts to perform their own local DNS resolution for all hosts on the same local network. Rather than overburdening network resources such as the DNS servers, hosts can first attempt to determine if the host they are looking for is on the same local network by sending out LLMNR requests and seeing if any hosts respond. The NBT-NS is the precursor protocol to LLMNR, and WPAD requests are made to try and find a proxy for future HTTP(s) connections.

> Since these protocols rely on requests broadcasted on the local network, our rogue device would also receive these requests. Usually, these requests would simply be dropped since they were not meant for our host. However, Responder will actively listen to the requests and send poisoned responses telling the requesting host that our IP is associated with the requested hostname. By poisoning these requests, Responder attempts to force the client to connect to our machine. In the same line, it starts to host several servers such as SMB, HTTP, SQL, and others to capture these requests and force authentication.

{% hint style="info" %}
Although Responder would be able to intercept and poison more authentication requests when executed from our rogue device connected to the LAN of an organisation, it is crucial to understand that this behaviour can be disruptive and thus detected. By poisoning authentication requests, normal network authentication attempts would fail, meaning users and services would not connect to the hosts and shares they intend to. Do keep this in mind when using Responder on a security assessment.
{% endhint %}

## Using Responder to poisoning requests

{% embed url="https://github.com/lgandx/Responder" %}

```bash
sudo python3 Responder/Responder.py -I INTERFACE_NAME
```

<figure><img src="https://344105405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFJ8sxzGfhnecDpAjrc%2Fuploads%2F40Klo1WSFHL1mNwqnxVL%2Fimage.png?alt=media&#x26;token=a5e8c0f6-8650-40aa-aa80-d88cf45e8ad5" alt=""><figcaption></figcaption></figure>

## Cracking the NTLM challenge

```bash
john --wordlist=rockyou.txt --format=netntlmv2 ntlmv2-chall-svcFileCopy.hash
```
