Potential DNS Tunneling via NsLookup
Multiple executions of nslookup.exe with explicit query types from a single host may indicate command and control activity using DNS tunneling.
Triage facts
Revision 2- Evidence
- Unknown
- Severity
- Medium
- Sources
- 1 public source
- Freshness
- Revision 2Jan 2, 12:00 UTC
- Detection
- 2 rules
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
Attackers can abuse DNS protocol for command and control or data exfiltration, a technique known as DNS tunneling. This involves embedding commands or malicious files within DNS queries or exfiltrating data to attacker-controlled DNS servers. This activity is detected by identifying a high volume of nslookup.exe executions with explicit query types originating from a single host within a short timeframe. This behavior deviates from typical system administration tasks and can signify malicious actors attempting to leverage DNS for covert communication. The detection is based on identifying a specific number (defined as 10 within 5 minutes) of nslookup.exe processes with arguments indicating explicit DNS query types (e.g., -querytype, -qt, -q, -type). Defenders should be aware of this technique as it allows attackers to bypass traditional network security measures that permit DNS traffic.
Attack Chain
- An attacker gains initial access to a compromised host through a separate method (e.g., phishing, exploit).
- The attacker establishes a covert communication channel using DNS tunneling.
- The attacker executes
nslookup.exewith specific query type arguments (e.g.,-querytype=txt,-qt=mx) to send DNS requests containing encoded data. - The attacker repeats this process multiple times within a short period (e.g., 10 times within 5 minutes).
- The compromised host sends these DNS requests to a malicious DNS server controlled by the attacker.
- The attacker receives the encoded data through the DNS responses from the compromised host.
- The attacker decodes the data, which may contain commands or exfiltrated information.
- The attacker uses the extracted information to further compromise the system or exfiltrate sensitive data.
Impact
Successful DNS tunneling can allow attackers to establish a covert command and control channel, exfiltrate sensitive data, or download malicious payloads without triggering traditional security alerts. If successful, attackers can bypass network restrictions and exfiltrate sensitive data, potentially leading to financial loss, reputational damage, or intellectual property theft. The number of victims depends on the scope of the initial compromise.
Recommendation
- Deploy the Sigma rule "Potential DNS Tunneling via NsLookup" to your SIEM to detect suspicious nslookup activity.
- Inspect process execution chains (parent processes) of
nslookup.exefor unusual or untrusted processes. - Monitor DNS query logs for suspicious patterns, such as long domain names or unusual query types.
- Block known malicious DNS servers and domains identified in threat intelligence feeds at the DNS resolver.
- Review and update firewall rules to restrict outbound DNS traffic to only authorized DNS servers.
- Implement network segmentation to limit the impact of compromised hosts.
Detection coverage 2
Potential DNS Tunneling via NsLookup
mediumDetects a high number of nslookup.exe executions with explicit query types, potentially indicating DNS tunneling.
Nslookup with Uncommon Query Type
lowDetects nslookup.exe executed with uncommon DNS query types, which can be a sign of DNS tunneling
Detection queries are available on the platform. Get full rules →