PowerShell DNSExfiltrator command usage (DNSExfiltration)
Detects PowerShell use of Invoke-DNSExfiltrator for DNS/DoH-based exfiltration based on Script Block Logging content.
- Product
- windows
- Category
- ps_script
- Author
- frack113 (SigmaHQ), DRL 1.1
- Published
- 2022-01-07
- Updated
- 2026-07-31
ATT&CK techniques
ExfiltrationRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies PowerShell script block content that references the Invoke-DNSExfiltrator functionality with parameters indicating exfiltration over DNS, including options consistent with DoH usage. Attackers use DNS covert channels to move data while blending into common network traffic patterns and reducing visibility of direct outbound transfers. The detection relies on Script Block Logging telemetry and matches the presence of specific command text and required parameter fragments within the executed script block.
Reporting behind it
- github.comhttps://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048/T1048.md#atomic-test-3---dnsexfiltration-doh
- github.comhttps://github.com/Arno0x/DNSExfiltrator
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_invoke_dnsexfiltration.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No 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.
title: PowerShell DNSExfiltrator command usage (DNSExfiltration)
id: 6f396942-268b-456c-af90-3957f25915f0
status: test
description: This rule identifies PowerShell script block content that references the Invoke-DNSExfiltrator functionality with parameters indicating exfiltration over DNS, including options consistent with DoH usage. Attackers use DNS covert channels to move data while blending into common network traffic patterns and reducing visibility of direct outbound transfers. The detection relies on Script Block Logging telemetry and matches the presence of specific command text and required parameter fragments within the executed script block.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048/T1048.md#atomic-test-3---dnsexfiltration-doh
- https://github.com/Arno0x/DNSExfiltrator
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_invoke_dnsexfiltration.yml
author: frack113, Huntrule Team
date: 2022-01-07
tags:
- attack.exfiltration
- attack.t1048
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection_cmdlet:
- ScriptBlockText|contains: Invoke-DNSExfiltrator
- ScriptBlockText|contains|all:
- " -i "
- " -d "
- " -p "
- " -doh "
- " -t "
condition: selection_cmdlet
falsepositives:
- Legitimate script
level: high
license: DRL-1.1
related:
- id: d59d7842-9a21-4bc6-ba98-64bfe0091355
type: derived