DNS Exfiltration and Tunneling Tools Execution
Last updated on:
In this page
Rule name | Rule type | Log sources | MITRE ATT&CK tags | Severity |
DNS Exfiltration and Tunneling Tools Execution | Standard | Windows | Command and Control: Application Layer Protocol - DNS (T1071.004),"Exfiltration: Exfiltration Over Alternative Protocol - Exfiltration Over Symmetric Encrypted Non-C2 Protocol (T1048.001)","Command and Control: Data Encoding - Standard Encoding (T1132.001)" | Trouble |
About the rule
Rule Type
Standard
Rule Description
DNS is a foundational network protocol, but it’s frequently abused by attackers for data exfiltration and to establish covert command and control (C2) channels. Specialized DNS tunneling tools such as dns2tcp, iodine, dnscat2, and similar utilities can encode and transmit data or commands using DNS queries and responses, often bypassing firewalls and detection systems.
Severity
Trouble
Rule journey
Attack chain scenario
Initial access → Lateral movement → Execution of DNS tunneling tool → Covert data exfiltration → Impact
Impact
- Defense evasion
- Data exfiltration
- Covert command and control
- Evasion of traditional network security tools
- Information disclosure
Rule Requirement
Prerequisites
Use the Group Policy Management Console to audit process creation and process termination.
Install Sysmon from Microsoft Sysinternals and download the Sysmon configuration file that includes process creation monitoring. Add network connection events to the configuration file to monitor all network activity.
Create a new registry key "Microsoft-Windows-Sysmon/Operational" in the directory "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\" if not already created.
Criteria
Action1: actionname = "Process started" AND PROCESSNAME endswith "\iodine.exe,\dnscat2*" select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME
Detection
Execution Mode
realtime
Log Sources
Windows
MITRE ATT&CK
Command and Control: Application Layer Protocol - DNS (T1071.004),"Exfiltration: Exfiltration Over Alternative Protocol - Exfiltration Over Symmetric Encrypted Non-C2 Protocol (T1048.001)","Command and Control: Data Encoding - Standard Encoding (T1132.001)"
Security Standards
Enabling this rule will help you meet the security standard's requirement listed below:
DE.CM-01: Networks and network services are monitored to find potentially adverse events.
When this rule is triggered, you’re notified of the execution of a known DNS tunneling or exfiltration utility, or suspicious script/command-line usage consistent with DNS-based data transfer. This allows you to detect and investigate covert data movements or unauthorized C2 activity, review DNS query patterns for signs of tunneling, and promptly identify systems targeted for exfiltration or backdoor operations.
Author
Daniil Yugoslavskiy, oscd.community
Future actions
Known False Positives
This rule may be triggered during legitimate security testing (e.g., penetration testing), internal research activities, or custom applications that use DNS for authorized communication. Review tool path, user context, and destination domains for legitimacy.
Next Steps
When this rule is triggered, the following measures can be implemented:
- Identification: Identify if the flagged event is a new incident or part of an existing incident.
- Analysis: Analyze the impact and extent of the incident to comprehend the severity of the attack using the Incident Workbench.
- Response: Respond promptly by initiating an automated workflow to interrupt the network connections and cease the malicious process.
- Reconfiguration: Update DNS monitoring analytics, tune signatures for environment-specific false positives, and establish stricter egress controls on DNS to untrusted external domains.
Mitigation
Mitigation ID | Mitigation Name | Mitigation description |
M1037 | Filter Network Traffic | Consider filtering DNS requests to unknown, untrusted, or known bad domains and resources. Resolving DNS requests with on-premise/proxy servers may also disrupt adversary attempts to conceal data within DNS packets. |
M1031 | Network Intrusion Prevention | Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. |
M1030 | Network Segmentation | Follow best practices for network firewall configurations to allow only necessary ports and traffic to enter and exit the network.(Citation: TechNet Firewall Design) |


