How hackers use DNS to spread malware, and how Versa DNS Security stops it

Attackers now embed malware in DNS records to evade detection. Learn how Versa's layered DNS security detects and blocks these covert payload delivery tactics.

Shubham Sangle
Product Manager
  • Read Time: 8 min
  • Published: August 19, 2025
  • Modified: November 5, 2026
  • 8 read
  • August 19, 2025
  • November 5, 2026

Summary

Attackers are now embedding malware payloads directly inside DNS TXT records, exploiting the protocol's trusted status to bypass traditional defenses. Versa DNS Security counters these threats through integrated reputation analysis, tunneling detection, query-based controls, and sinkholing — identifying and neutralizing encoded payloads, blocking communication with command-and-control servers, and stopping exfiltration before it reaches the network.

  • Hackers encoded malware into hexadecimal chunks stored across hundreds of subdomain TXT records to evade conventional inspection tools.
  • Versa DNS Security blocks queries to newly registered or unreputed domains, mitigating zero-day delivery mechanisms like those used in this campaign.
  • DNS tunneling detection uses frequency analysis and invalid character inspection to identify covert data transfer hidden inside routine queries.
  • DNS sinkholing redirects compromised device connections to safe addresses, enabling forensic collection while preventing command-and-control communication.
  • Integrated URL filtering and IPS inspect post-resolution traffic, ensuring threats that bypass DNS-layer controls are still caught and blocked.

Domain Name System (DNS), the system that translates domain names into IP addresses, is one of the most foundational parts of the internet. It’s also one of the least inspected by traditional security tools.

Now, attackers are taking advantage of this oversight to use it as a cover channel to deliver malware.

A recent Ars Technica article uncovered a sophisticated campaign where hackers embedded malware inside DNS TXT records. These records, typically used for harmless tasks like domain verification or email authentication, were repurposed to store chunks of malicious code.

In this campaign, malware was first converted into hexadecimal format and split into hundreds of small chunks. The attackers then registered a domain, whitetreecollective[.]com, and created hundreds of subdomains. Each chunk of malware was then stored in the TXT record of one of the subdomains.

Once an attacker gains access to a network, the malware could be reassembled by making a series of DNS requests to these subdomains. Since DNS request traffic is both routine and rarely inspected, this method would allow the attackers to bypass traditional security tools.

DNS has often been used for covert channels and data exfiltration via tunneling, but hosting full malware payloads in DNS records is a more brazen and novel tactic. It underlines the need for DNS-level visibility and enforcement as part of a modern enterprise security strategy.

Versa DNS Security: a purpose-built solution for DNS-based threats

Versa’s approach to DNS security is designed to detect these kinds of evolving attacks. Part of Versa Unified SASE and delivered through its Secure Web Gateway (SWG), Versa DNS Security is a fully integrated, cloud-delivered service that combines DNS filtering, reputation analysis, behavioral detection, and integration with broader security layers.

Specifically, Versa’s DNS Security works across multiple dimensions to:

  • Filter DNS queries based on type, size, and frequency.
  • Evaluate domain reputation in real time.
  • Detect tunneling behavior and encoded data patterns.
  • Integrate with URL filtering, advanced file filtering, and IPS to block threats outside of DNS.

This layered approach ensures that threats hiding in DNS traffic are identified and stopped as early as possible.

How Versa neutralizes the attack techniques described

Let’s take a closer look at how Versa can directly address the tactics used in this and similar DNS-based attacks.

1. Detecting DNS records hosting malware and malicious scripts

Attackers using DNS records to host malware and malicious scripts is not a new behavior, and Versa is well-versed in detecting and stopping these threats. Versa’s multiple security layers work together to prevent the use of DNS records for attacks through a combination of reputation and behavioral analysis:

  • IP and domain reputation: If a DNS response contains an IP address known for hosting malware, Versa’s reputation-based IP filtering will block subsequent traffic to that IP. Even if a device is compromised or a DNS cache is poisoned, Versa will prevent the connection to suspicious or malicious command-and-control servers.
  • DNS sinkholing: For domains identified as suspicious or malicious, Versa can use a DNS sinkhole action to prevent compromised devices from connecting to command-and-control servers. Rather than allowing the client to connect to the actual IP address returned in a DNS response, the request is redirected to a safe or internal IP address. This allows security teams to collect forensics information about an attack while keeping users and resources safe.
  • Integration with advanced filtering: Versa’s DNS filtering integrates with Versa Intrusion Prevention System (IPS) and advanced file filtering to identify threats using signature-based and anomaly detection to protect against malware delivered via DNS.
Versa supports multiple options and profiles to granularly configure DNS security
Fig. 1 – Versa supports multiple options and profiles to granularly configure DNS security.

2. Detecting hidden and encoded threats hosted in DNS records

In the Ars Technica article, instead of directly hosting malware in the DNS TXT field, the attackers added a new layer of subterfuge by encoding the malware file into hexadecimal format and breaking it up into chunks. Attackers often use TXT records to hide payloads because these records can store arbitrary text.

While Versa doesn’t inspect every TXT record’s content directly, it provides powerful controls to block risky requests:

  • Query-based controls allow administrators to limit or block large TXT records or suspicious query volumes, which are commonly used in DNS amplification and data exfiltration. This is especially useful in defending against attacks like this one where the payload is delivered in segments via multiple TXT responses.
Query-based controls allow admins to block large or suspicious query volumes
Fig. 2 – Query-based controls allow admins to block large or suspicious query volumes.
  • Reputation-based blocking ensures that any queries to a known suspicious/malicious domain, or newly registered domains without a reputation, are automatically blocked. In the attack above, Versa can block the queries to the newly created subdomains (on whitetreecollective[.]com in this case) containing the encoded malware chunks since they did not have reputations. This allows Versa to mitigate zero-day attacks like the one described.

This means that even if malware is encoded and hidden inside a TXT record, Versa can prevent the malware from infecting the victim network.

3. Detecting attempts to contact command-and-control (CnC) servers

DNS tunneling is a technique that hides data or communication inside DNS queries and responses to bypass security and/or exfiltrate information from a network. In the article, the attackers attempted to use DNS tunneling to transfer malware from a command-and-control (CnC) server (whitetreecollective[.]com) into a network.

The behavior observed – frequent, repetitive requests to a single domain or its subdomains – is one characteristic of DNS tunneling.

Versa DNS Security is specifically designed to detect DNS tunneling and block CnC server communication through:

  • DNS tunneling detection: Versa’s DNS Tunneling detection can identify malicious activity using frequency-based detection and invalid character detection. The former can track repetitive and uncommon requests over a period of time to block requests once limits are exceeded while the latter inspects DNS queries for invalid characters, an indicator of encoded data within DNS traffic.
Easily configure how DNS tunneling detection should be handled.
Fig. 3 – Easily configure how DNS tunneling detection should be handled.
  • URL filtering integration: Versa DNS works in conjunction with other Versa security functions including IP and URL Filtering. Even if a malicious DNS query is resolved, subsequent HTTP/HTTPS traffic would be inspected and blocked by URL filtering based on categorization and threat intelligence.
Versa Recommended Profile
Fig. 4 – Versa supports user-defined and predefined profiles (like “Versa Recommended Profile”) for flexibility and ease of configuration.

Versa is highly effective at detecting these and other sophisticated security threats. To see how Versa performs in real-world threat detection, check out the CyberRatings.org 2025 Comparative Test Report: Security Service Edge (SSE).

Attackers will continue to exploit overlooked infrastructure like DNS to deliver malware and exfiltrate data. Versa’s multi-layered protections form a robust defense against sophisticated DNS-based attacks.

By applying real-time inspection, behavioral analytics, and integrated filtering, Versa DNS Security can identify, block, and neutralize threats well before they reach the user or the network.

To learn how Versa’s DNS Security and other Security Service Edge products can help protect your organization from these and other novel attacks, schedule a demo with our team today.

Shubham Sangle

By Shubham Sangle

Product Manager

Shubham Sangle is a product manager working across Versa's Security Service Edge portfolio, including DNS security, Secure Enterprise Browser, and AI-enhanced data loss prevention. He writes frequently on emerging attack techniques.

FAQs

DNS security refers to the inspection, filtering, and enforcement controls applied to Domain Name System traffic to detect and block threats. Because DNS translates domain names into IP addresses and is rarely inspected by traditional tools, attackers exploit it as a covert channel for malware delivery, data exfiltration, and command-and-control communication, making DNS-level protection essential for enterprise defense.

Traditional malware delivery relies on file downloads or email attachments that endpoint and perimeter tools typically inspect. DNS-based delivery embeds malicious code inside DNS TXT records, encoding payloads in hexadecimal and splitting them across hundreds of subdomains. Because DNS request traffic is routine and rarely scrutinized, this approach bypasses conventional security layers that focus on web and email vectors.

DNS tunneling detection uses frequency-based analysis and invalid character inspection to identify malicious activity. Frequency-based detection tracks repetitive, uncommon requests to a single domain or its subdomains over time and blocks traffic once thresholds are exceeded. Invalid character detection inspects DNS queries for anomalous characters that indicate encoded data, flagging payloads hidden within otherwise normal-looking DNS traffic.

Integrated DNS filtering within a unified SASE platform enables enterprises to block threats at the earliest resolution stage before connections are established. Combining domain reputation analysis, query-based controls, DNS sinkholing, and integration with IPS and URL filtering provides layered defense that reduces lateral movement risk, supports forensic data collection, and eliminates gaps between standalone security tools.

Enterprises should evaluate whether a DNS security solution offers real-time domain reputation scoring, behavioral detection for tunneling, granular query-based controls for record types and volumes, and DNS sinkholing for forensic collection. Integration with broader security layers such as intrusion prevention, URL filtering, and advanced file filtering is critical to ensure threats bypassing DNS inspection are caught downstream.

Subscribe to the Versa Blog

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Related Posts

Versa URL Filtering walkthrough – how it works

How Versa's URL filtering works is shown in this interactive demo.

Read More

GigaOm Radar Report for Security Service Edge

GigaOm has published its 2025 research report evaluating the top 19 solution providers in the SSE market, including Versa SSE delivered from the VersaONE Universal SASE Platform.

Read More

Overview of the Versa Secure Web Gateway

The Versa Secure Web Gateway (SWG) protects your organization from web-based threats while providing comprehensive control over internet usage.

Read More