DNS TXT Answers Containing Command Execution Keywords (IEX, Invoke-Expression, cmd.exe)

Alerts on DNS TXT answers containing IEX/Invoke-Expression or cmd.exe strings indicative of execution-oriented payloads.

FreeReviewedSigma · High · v2
Category
dns
Author
Markus Neis (SigmaHQ), DRL 1.1
Published
2018-08-08
Updated
2026-07-31

ATT&CK techniques

C2
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Discovery

  10. Lateral Movement

  11. Collection

  12. Exfiltration

  13. Impact

What it detects

This rule flags DNS responses where the TXT record content contains likely command-execution indicators such as "IEX", "Invoke-Expression", or "cmd.exe". Attackers may embed executable commands or scripting triggers in DNS TXT answers to blend C2 traffic with normal DNS activity. It relies on DNS telemetry that includes the DNS record type and the TXT answer payload so the response can be scanned for these specific strings.

Related detections9 linkedT1071.004 — drag to rearrange
Malicious GS-Netcat Command and Control via Global Socket Relay Network (via dns_query)
Suspicious DNS Query to Dynamic DNS and Tunneling Providers Abused by RATs
Suspicious UPSTYLE Command Channel Pattern in Web Requests via CVE-2024-3400
Suspicious DNS C2 to Microsoft Typosquat Domain
Suspicious DNS Queries to Simitor Tracking Tunnel Infrastructure
Suspicious DNS Queries to Secshow Open Resolver Scanning Infrastructure
Suspicious OpenMetadata Exploit Interactsh OAST Callback (via process_creation)
Suspicious Outlook Process Spawning Network Utilities for NotDoor C2 (via process_creation)
Malicious DNS Query To fdmpkg C2 Domain via DNS Query
DNS TXT Answers Containing Command Execution Keywords (IEX, Invoke-Expression, cmd.exe)
Pivot detection · T1071.004 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.