Discovery · Windows
nslookup.exe
nslookup
Queries DNS servers. Used to map domain controllers and services through SRV records, and DNS lookups can also carry data out.
Legitimate use
Used to troubleshoot name resolution.
Switches
Sets the record type to query, for example SRV, TXT or MX.
LowSame as -type.
LowSets the query timeout.
InfoCommand lines to worry about
- Medium
TXT record lookup
TXT records can carry data. A TXT query from a script or an Office parent can mean a payload is being staged over DNS. Check the queried domain.
Detection regex
nslookup(\.exe)?\s+.*(-type|-querytype|-q)=txt\b - Low
Domain controller lookup through SRV records
Locates domain controllers through DNS. Common in domain discovery.
Detection regex
nslookup(\.exe)?\s+.*_ldap\._tcp\.
Where it is recorded
- Security4688Process creation with the full command line, when command-line auditing is enabled.
- Sysmon1Process creation with command line, hashes and parent process.
- Sysmon22DNS query with the queried name and the process that made it.
Community detections
5 SigmaHQ rules for nslookup.exe. The explainer checks every pasted command line against all of them.
- HighPotential Process Injection Via Msra.EXE
Detects potential process injection via Microsoft Remote Asssistance (Msra.exe) by looking at suspicious child processes spawned from the aforementioned process. It has been a target used by many threat actors and used for discovery and persistence tactics
T1055by Alexander McDonald
- HighSuspicious Child Process Of Wermgr.EXE
Detects suspicious Windows Error Reporting manager (wermgr.exe) child process
T1055T1036by Florian Roth (Nextron Systems)
- HighWebshell Detection With Command Line Keywords
Detects certain command line parameters often used during reconnaissance activity via web shells
T1505.003T1018T1033T1087by Florian Roth (Nextron Systems), Jonhnathan Ribeiro, Anton Kutepov, oscd.community, Chad Hudson, Matt Anderson
- HighWindows Shell/Scripting Processes Spawning Suspicious Programs
Detects suspicious child processes of a Windows shell and scripting processes such as wscript, rundll32, powershell, mshta...etc.
T1059.005T1059.001T1218by Florian Roth (Nextron Systems), Tim Shelton
- MediumNslookup PowerShell Download Cradle - ProcessCreation
Detects suspicious powershell download cradle using nslookup. This cradle uses nslookup to extract payloads from DNS records
T1071.004by Nasreddine Bencherchali (Nextron Systems)
Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.