Bytes over DNS, (Mon, Oct 27th)
I was intrigued when Johannes talked about malware that uses BASE64 over DNS to communicate. Take a DNS request like this: label1.label2.tld. Labels in a request like this can only be composed with letters (not case-sensitive), digits and a hyphen character (-). While BASE64 is encoded with letters (uppercase and lowercase), digits and special characters + and /. And also a special padding character: =.
AI Analysis
Technical Summary
The analyzed threat describes a method by which malware can use DNS queries to transmit arbitrary byte data by encoding it within DNS labels, effectively creating a covert communication channel over DNS. DNS labels traditionally only allow letters (case-insensitive), digits, and hyphens, which conflicts with standard BASE64 encoding that includes uppercase and lowercase letters, digits, plus (+), slash (/), and padding (=). The research demonstrates that by not strictly adhering to DNS label standards and crafting custom DNS packets, it is possible to transmit all ASCII byte values (0x00 to 0x7F) reliably over DNS infrastructure such as CloudFlare and Google DNS servers. However, Google DNS applies anti-spoofing measures that alter the case of letters, limiting reliable transmission of letters but still allowing digits, hyphens, and underscores. CloudFlare DNS allows transmission of letters, digits, hyphens, and underscores reliably. The study also shows that extended ASCII byte values (0x80 to 0xFF) are generally converted to PUNICODE and fail unless custom DNS packet crafting and parsing are used. This technique enables malware to establish a command-and-control (C2) channel or exfiltrate data covertly by encoding data bytes into DNS queries, which are often overlooked by security controls because DNS traffic is typically permitted through firewalls and proxies. The research includes tests using OS DNS APIs and Python DNS libraries, highlighting the limitations and capabilities of each approach. The author suggests that detection of such covert DNS channels requires specialized monitoring for abnormal DNS traffic patterns. While no known exploits are currently in the wild, the method represents a low-severity but stealthy threat vector for data exfiltration and malware communication.
Potential Impact
For European organizations, this threat could enable attackers to bypass traditional network security controls by tunneling data over DNS queries, a protocol almost universally allowed through firewalls and proxies. This covert channel can be used for data exfiltration of sensitive information or for maintaining stealthy command-and-control communications with compromised hosts. Organizations with critical infrastructure, financial institutions, and government agencies are particularly at risk due to the potential for espionage or data theft. The difficulty in detecting such traffic increases the risk of prolonged undetected intrusions. Additionally, reliance on third-party DNS providers like CloudFlare and Google, which are widely used in Europe, means that attackers can leverage these infrastructures without needing control over DNS servers. The impact is compounded by the fact that DNS traffic is often not deeply inspected, and traditional security tools may not detect this form of covert communication. While currently assessed as low severity due to lack of known exploits, the technique’s stealth and potential for misuse make it a significant concern for European cybersecurity.
Mitigation Recommendations
European organizations should implement advanced DNS monitoring and anomaly detection solutions capable of identifying unusual DNS query patterns, such as excessive or irregular label encoding that deviates from normal domain name structures. Deploy DNS traffic analysis tools that can decode and inspect DNS queries for suspicious encoding schemes, including non-standard characters or unusually frequent queries to uncommon domains. Employ DNS filtering solutions that can restrict DNS queries to authorized domains and block queries with suspicious label formats. Network segmentation and strict egress filtering should be enforced to limit DNS queries to trusted DNS resolvers, reducing exposure to third-party DNS infrastructure abuse. Security teams should develop and integrate threat hunting procedures focused on DNS-based covert channels, leveraging threat intelligence feeds and custom detection rules. Regularly update endpoint detection and response (EDR) tools to recognize malware behaviors involving DNS tunneling. Finally, organizations should consider deploying DNS over HTTPS (DoH) or DNS over TLS (DoT) with trusted resolvers that provide enhanced security and logging capabilities, while balancing privacy and monitoring needs.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Belgium, Italy, Spain
Bytes over DNS, (Mon, Oct 27th)
Description
I was intrigued when Johannes talked about malware that uses BASE64 over DNS to communicate. Take a DNS request like this: label1.label2.tld. Labels in a request like this can only be composed with letters (not case-sensitive), digits and a hyphen character (-). While BASE64 is encoded with letters (uppercase and lowercase), digits and special characters + and /. And also a special padding character: =.
AI-Powered Analysis
Technical Analysis
The analyzed threat describes a method by which malware can use DNS queries to transmit arbitrary byte data by encoding it within DNS labels, effectively creating a covert communication channel over DNS. DNS labels traditionally only allow letters (case-insensitive), digits, and hyphens, which conflicts with standard BASE64 encoding that includes uppercase and lowercase letters, digits, plus (+), slash (/), and padding (=). The research demonstrates that by not strictly adhering to DNS label standards and crafting custom DNS packets, it is possible to transmit all ASCII byte values (0x00 to 0x7F) reliably over DNS infrastructure such as CloudFlare and Google DNS servers. However, Google DNS applies anti-spoofing measures that alter the case of letters, limiting reliable transmission of letters but still allowing digits, hyphens, and underscores. CloudFlare DNS allows transmission of letters, digits, hyphens, and underscores reliably. The study also shows that extended ASCII byte values (0x80 to 0xFF) are generally converted to PUNICODE and fail unless custom DNS packet crafting and parsing are used. This technique enables malware to establish a command-and-control (C2) channel or exfiltrate data covertly by encoding data bytes into DNS queries, which are often overlooked by security controls because DNS traffic is typically permitted through firewalls and proxies. The research includes tests using OS DNS APIs and Python DNS libraries, highlighting the limitations and capabilities of each approach. The author suggests that detection of such covert DNS channels requires specialized monitoring for abnormal DNS traffic patterns. While no known exploits are currently in the wild, the method represents a low-severity but stealthy threat vector for data exfiltration and malware communication.
Potential Impact
For European organizations, this threat could enable attackers to bypass traditional network security controls by tunneling data over DNS queries, a protocol almost universally allowed through firewalls and proxies. This covert channel can be used for data exfiltration of sensitive information or for maintaining stealthy command-and-control communications with compromised hosts. Organizations with critical infrastructure, financial institutions, and government agencies are particularly at risk due to the potential for espionage or data theft. The difficulty in detecting such traffic increases the risk of prolonged undetected intrusions. Additionally, reliance on third-party DNS providers like CloudFlare and Google, which are widely used in Europe, means that attackers can leverage these infrastructures without needing control over DNS servers. The impact is compounded by the fact that DNS traffic is often not deeply inspected, and traditional security tools may not detect this form of covert communication. While currently assessed as low severity due to lack of known exploits, the technique’s stealth and potential for misuse make it a significant concern for European cybersecurity.
Mitigation Recommendations
European organizations should implement advanced DNS monitoring and anomaly detection solutions capable of identifying unusual DNS query patterns, such as excessive or irregular label encoding that deviates from normal domain name structures. Deploy DNS traffic analysis tools that can decode and inspect DNS queries for suspicious encoding schemes, including non-standard characters or unusually frequent queries to uncommon domains. Employ DNS filtering solutions that can restrict DNS queries to authorized domains and block queries with suspicious label formats. Network segmentation and strict egress filtering should be enforced to limit DNS queries to trusted DNS resolvers, reducing exposure to third-party DNS infrastructure abuse. Security teams should develop and integrate threat hunting procedures focused on DNS-based covert channels, leveraging threat intelligence feeds and custom detection rules. Regularly update endpoint detection and response (EDR) tools to recognize malware behaviors involving DNS tunneling. Finally, organizations should consider deploying DNS over HTTPS (DoH) or DNS over TLS (DoT) with trusted resolvers that provide enhanced security and logging capabilities, while balancing privacy and monitoring needs.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Article Source
- {"url":"https://isc.sans.edu/diary/rss/32420","fetched":true,"fetchedAt":"2025-10-27T09:12:45.721Z","wordCount":918}
Threat ID: 68ff378d8ee3628e2d779a80
Added to database: 10/27/2025, 9:12:45 AM
Last enriched: 11/3/2025, 12:39:05 PM
Last updated: 12/12/2025, 4:43:33 AM
Views: 153
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
MuddyWater Deploys UDPGangster Backdoor in Targeted Turkey-Israel-Azerbaijan Campaign
LowAndroid Trojan 'Fantasy Hub' Malware Service Turns Telegram Into a Hub for Hackers
LowAttackers Sell Turnkey Remote Access Trojan 'Atroposia'
LowNew ChatGPT Atlas Browser Exploit Lets Attackers Plant Persistent Hidden Commands
LowRansomware payments hit record low: only 23% Pay in Q3 2025
LowActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.