8-Hunting Responder
8-Hunting Responder
A hunting exercise has been scheduled, where you are tasked with detecting Responder’s or
Inveigh’s presence on the network.
LLMNR, NBT-NS and MDNS poisoning can be seen as a Man-in-The-Middle attack that is
similar to ARP poisoning, in terms of the actual outcome. In both LLMNR, NBT-NS & MDNS
poisoning and ARP poisoning, the victim will eventually interact with an attacker controlled
system. In the case of LLMNR, NBT-NS and MDNS poisoning, the attack may result in the
victim’s NetNTLM password hash being captured and reused by the attacker.
Following is how LLMNR, NBT-NS and MDNS poisoning is performed, at a high level.
The objective of this lab is to use different detection techniques to detect Responder’s or
Inveigh’s presence on a network. Specifically, you will learn to use CredDefense, Honey
Credentials (deliberately placed credentials on the network, acting as bait), Sysmon and
PowerShell’s capabilities, separately, to detect LLMNR, NBT-NS and MDNS poisoning
attempts on a network.
Organization: ELS-CHILD
You:
o IP: 172.16.81.0/24
UATSERVER (the server from where you will start your hunt):
o IP: 10.100.11.150
o VNC Credentials: vnc@3L$-CHILDL0c@l
o Domain Credentials: ELS-CHILD\Administrator | Admin@3L$-CHILDL0c@l*****
By deliberately requesting for a non-existing network resource and using honey credentials,
you can detect the presence of Responder or Inveigh inside a network.
The detection can be performed by looking for any responses regarding the non-existing
network resource and also by monitoring the usage of honey credentials.
Sysmon is able to collect all interactions of a network asset with other assets in the network.
If you query those Sysmon logs for any SMB (or NetBIOS)-related communications with an
untrusted IP, you will be able to identify if Responder or Inveigh is operating inside the
network.
Specifically, Sysmon’s Event ID 3 contains all the information you need to detect any SMB (or
NetBIOS)-related communications with an untrusted IP. If the Destination IP is not a trusted
File Server or a Domain Controller, chances are that Responder or Inveigh is operating inside
the network.
Once you log in successfully to the designated machine, open a PowerShell terminal as
Administrator, navigate to the ‘Case 1 – CredDefense (ResponderGuard) & HoneyCreds’ folder,
which is located in the Desktop and execute the following. [ResponderGuard is part the
CredDefense suite]
If you inspect ResponderGuard’s code, you will see that it deliberately requests for a non-
existing network resource and listens for any ill-intended responses.
The above means that Responder or Inveigh is present in the network, since we got a
response for a non-existing network resource.
We can monitor and query the logs associated with the Event ID 4648 as follows.
First go the machine’s Event Viewer and clear all Security logs.
You should see something similar to the following, once the honey credentials are used.
Find-HoneyAccount.ps1 content:
As mentioned, the Sysmon Event ID that is of interest when looking for any SMB (or
NetBIOS)-related communications with an untrusted IP, is Sysmon Event ID 3.
First go the machine’s Event Viewer and clear the ‘Applications and Services Logs’ –
Microsoft – Windows – Sysmon – Operational log
Then, simulate an SMB connection with Responder’s rogue authentication server. (This is
actually similar to what will happen in the background if Responder is operating inside the
network)
Find-UntrustedSMBConnections.ps1 content:
#credits to haveyousecured.blogspot.gr
Import-Module Get-WinEventData.ps1
Set-Location \\nonexisting\sharenotthere -ErrorAction SilentlyContinue
foreach($Event3 in $EventsID3){
}
This is how you can query a
machine’s Sysmon logs using
PowerShell
You could also use the script above for port 139 (NetBIOS).
Let’s now leverage PowerShell’s Script Block Logging capability. You can enable script
block logging on a Windows Server 2012 if Windows Management Framework (WMF) 5.0
and .Net 4.5 are already installed and the following registry key and DWORD are
configured, as follows.
The recorded block above is actually part of Inveigh’s LLMNR poisoning procedure.
To conclude, in this lab four (4) distinct ways were documented that could assist you in
detecting Responder or Inveigh on a network, under your supervision.