DNS Query with Padded Encoded Label

Last updated 14 days ago on 2026-11-18
Created 14 days ago on 2026-11-18

About

Identifies a DNS lookup on host or a DNS query tool such as dig or nslookup, for a name that contains a label ending in Base64 or Base32 padding. The equals sign is not valid in a hostname, so a padded label indicates that a program placed encoded data in the query name. Adversaries encode data into DNS labels to exfiltrate it or to communicate with a command and control server through the resolver.
Tags
Domain: EndpointOS: LinuxOS: macOSOS: WindowsUse Case: Threat DetectionTactic: ExfiltrationTactic: Command and ControlData Source: Elastic DefendRule Type: Event Correlation (EQL)Platform: LinuxPlatform: WindowsPlatform: macOSLanguage: eql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Exfiltration (TA0010)(external, opens in a new tab or window)

Command and Control (TA0011)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.network-*logs-endpoint.events.process-*
Related Integrations

endpoint(external, opens in a new tab or window)

Query
text code block:
any where host.os.type in ("linux", "macos", "windows") and ( ( event.action in ("lookup_requested", "lookup_result") and dns.question.name regex """.*[A-Za-z0-9+/]{2,}={1,6}\.[A-Za-z0-9\-]+.*""" and not dns.question.name : "*.local" ) or ( event.category == "process" and event.type == "start" and event.action in ("exec", "start") and process.name : ("dig", "nslookup", "nslookup.exe", "host", "drill") and process.args regex """.*[A-Za-z0-9+/]{2,}={1,6}\.[A-Za-z0-9\-]+.*""" ) )

Install detection rules in Elastic Security

Detect DNS Query with Padded Encoded Label in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).