Command & Control

Hidden DNS Tunnel

Hidden DNS Tunnel

Detection overview

The Hidden DNS Tunnel detection identifies the use of DNS traffic to covertly communicate with external command and control servers by encapsulating another protocol within DNS queries and responses. Attackers use this technique to evade detection by blending malicious traffic with legitimate DNS traffic, making it difficult to identify without advanced analysis.

Triggers

  • An internal host is communicating with an outside IP using DNS where another protocol is running over the top of the DNS sessions
  • This represents a hidden tunnel involving multiple sessions over longer periods of time mimicking normal DNS traffic

Possible Root Causes

  • A targeted attack may use hidden tunnels to hide communication with command and control servers
  • A user is utilizing tunneling software to communicate with Internet services which might not otherwise be accessible
  • Intentionally installed software is using a hidden tunnel to bypass expected firewall rules

Business Impact

  • The use of a hidden tunnel by some software may be benign, but it represents significant risk as the intention is to bypass security controls
  • Hidden tunnels used as part of a targeted attack are meant to slip by your perimeter security controls and indicate a sophisticated attacker
  • Hidden tunnels are rarely used by botnets, though more sophisticated bot herders with more ambitious goals may utilize them

Steps to Verify

  • Check to see if the destination domain of the tunnel is an entity you trust for your network
  • Ask the user of the host whether they are using hidden tunnel software for any purpose
  • Before removing the offending software via antivirus or reimaging, take a memory snapshot for future analysis of the incident
  • If the behavior reappears shortly after a reimaging, this may be a hardware/BIOS tunnel
Hidden DNS Tunnel

Possible root causes

Malicious Detection

  • An attacker using an internal host to communicate with an external command and control server by tunneling malicious protocols over DNS.
  • Malware installed on the internal host designed to use DNS tunnels to exfiltrate data or receive commands from an attacker.
  • Compromised internal host part of a botnet using DNS to evade network security measures.

Benign Detection

  • Security or network management tools performing legitimate tasks that involve unusual DNS traffic patterns.
  • Legitimate software updates or cloud services that use non-standard DNS communication.
  • Misconfigured applications or services generating traffic that resembles hidden tunnels.
Hidden DNS Tunnel

Example scenarios

Scenario 1: An internal host communicates with an external IP over DNS, displaying consistent communication patterns and unusual payload sizes. Further investigation reveals the presence of malware using DNS tunneling to exfiltrate data.

Scenario 2: A security audit detects long-duration DNS sessions from an internal host to a suspicious domain. Analysis shows the sessions contain hidden command and control traffic, indicating the host is compromised and part of a botnet.

Hidden DNS Tunnel

Business impact

If this detection indicates a genuine threat, the organization faces significant risks:

Data Exfiltration

Hidden DNS tunnels can be used to exfiltrate sensitive data from the organization, leading to potential financial and reputational damage.

Unauthorized Remote Access

Attackers can use these tunnels to maintain persistent remote access, allowing them to control compromised hosts undetected.

Bypassing Security Controls

The use of encrypted tunnels through DNS can bypass traditional network security measures, increasing the risk of undetected malicious activity.

Hidden DNS Tunnel

Steps to investigate

FAQs

What is a Hidden DNS Tunnel?

A Hidden DNS Tunnel is a technique where attackers use DNS traffic to covertly communicate with external command and control servers by encapsulating other protocols within DNS queries and responses to evade detection.

What are the common signs of a Hidden DNS Tunnel?

Common signs include long-duration DNS sessions, frequent communication with suspicious domains, payload sizes inconsistent with typical DNS traffic, and unusual frequency or variability in DNS session sizes.

Can legitimate software trigger this detection?

Yes, security tools, legitimate software updates, or misconfigured applications can generate traffic that resembles hidden DNS tunnels.

How does Vectra AI identify Hidden DNS Tunnels?

Vectra AI uses advanced AI algorithms and machine learning to analyze DNS traffic patterns and identify anomalies indicative of hidden tunneling activities.

What is the business impact of a Hidden DNS Tunnel?

It can lead to data exfiltration, unauthorized remote access, and bypassing security controls, resulting in financial and reputational damage.

How can I detect a Hidden DNS Tunnel in my network?

Detect Hidden DNS Tunnels by monitoring for unusual DNS traffic patterns, such as long or multiple sessions with variable sizes, and communication with uncommon or suspicious external domains.

Why are Hidden DNS Tunnels a significant threat?

They can be used for data exfiltration, maintaining persistent unauthorized remote access, and bypassing traditional network security controls, posing significant risks to the organization.

What steps should I take if I detect a Hidden DNS Tunnel?

Investigate the source and nature of the DNS traffic, check the host for signs of compromise, review network traffic logs, and consult with IT and security teams to verify if the activity is legitimate.

What tools can help verify the presence of a Hidden DNS Tunnel?

Tools such as network traffic analysis, firewall logs, and intrusion detection systems can help verify and investigate suspicious hidden DNS tunnel activities.

How can I prevent Hidden DNS Tunnels?

Implement robust network monitoring and alerting, enforce strict access controls, regularly conduct security assessments, and ensure timely patching and updating of systems to minimize vulnerabilities.