Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

Long encoded DNS label queried by a script host or proxy binary

AN1121 describes DNS tunnelling as anomalous lookups issued by non-browser, non-system processes, and the Sysmon DNS query event is the one Windows source that names the process which actually called the resolver, so it can bind an encoded lookup to the interpreter that made it — unlike the network connection event, where a DNS query is attributed to the service host rather than the caller. The rule requires both halves: an image from the script host, signed proxy and interpreter set that has no business resolving names in bulk, and a leftmost DNS label of forty characters or more, which is the shape a base32 or base64 payload takes inside a query. The length gate stands in for MITRE's QueryLengthThreshold knob and the image list for its ProcessImageFilter knob; both sets of values are authored here, not supplied by MITRE. The remaining knobs, TimeWindow and query rate, need counting over an interval and Sigma has no way to express that, which is why this is a shape test rather than a frequency test. Two consequences follow and neither is tunable away: a compiled tunnelling client resolves under its own image and will not match the list, and an operator who keeps labels short to stay under a threshold defeats the regex. Sysmon EventID 22 needs Sysmon 10 or later with DNS query logging enabled, and most shipped configurations filter or exclude it outright, so confirm it is being collected before reading a quiet result as a clean one. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0400, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 2 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.

detection.yml

title: Long encoded DNS label queried by a script host or proxy binaryid: 8ed8a425-0c85-4725-ac51-d63578d5ddfbstatus: experimentaldescription: |  AN1121 describes DNS tunnelling as anomalous lookups issued by non-browser,  non-system processes, and the Sysmon DNS query event is the one Windows source  that names the process which actually called the resolver, so it can bind an  encoded lookup to the interpreter that made it — unlike the network connection  event, where a DNS query is attributed to the service host rather than the  caller. The rule requires both halves: an image from the script host, signed  proxy and interpreter set that has no business resolving names in bulk, and a  leftmost DNS label of forty characters or more, which is the shape a base32 or  base64 payload takes inside a query. The length gate stands in for MITRE's  QueryLengthThreshold knob and the image list for its ProcessImageFilter knob;  both sets of values are authored here, not supplied by MITRE. The remaining  knobs, TimeWindow and query rate, need counting over an interval and Sigma has  no way to express that, which is why this is a shape test rather than a  frequency test. Two consequences follow and neither is tunable away: a  compiled tunnelling client resolves under its own image and will not match the  list, and an operator who keeps labels short to stay under a threshold defeats  the regex. Sysmon EventID 22 needs Sysmon 10 or later with DNS query logging  enabled, and most shipped configurations filter or exclude it outright, so  confirm it is being collected before reading a quiet result as a clean one.  UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0400, not hand-written and not tested by its author. Any lab result is on this rule's own page.references:  - https://attack.mitre.org/techniques/T1071/004  - https://attack.mitre.org/detectionstrategies/DET0400author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.command-and-control  - attack.t1071.004logsource:  category: dns_query  product: windowsdetection:  selection_process:    Image|endswith:      - '\powershell.exe'      - '\pwsh.exe'      - '\rundll32.exe'      - '\regsvr32.exe'      - '\mshta.exe'      - '\wscript.exe'      - '\cscript.exe'      - '\nslookup.exe'      - '\certutil.exe'      - '\python.exe'      - '\msbuild.exe'      - '\installutil.exe'  selection_encoded_label:    QueryName|re: '^[A-Za-z0-9_-]{40,}\.'  condition: selection_process and selection_encoded_labelfalsepositives:  - "Developer and build hosts running python.exe or pwsh.exe against cloud SDKs, where per-object, per-tenant and per-request endpoints are resolved as generated hostnames whose leftmost label runs well past forty characters — one busy build agent can produce a steady stream of matches and this is the loudest entry here."  - "Endpoint security and reputation tooling that encodes a file hash or telemetry blob into the leftmost DNS label of a vendor lookup domain, which is the same query shape as a tunnel; when such a lookup is driven from a management script under powershell.exe it matches both halves of this rule."  - "An administrator resolving a long auto-generated cloud endpoint by hand with Resolve-DnsName inside a PowerShell session during troubleshooting, which needs no repetition to alert — a single lookup of a front-door, load-balancer or CDN hostname is enough."  - "Scheduled PowerShell tasks that call update, licensing or certificate-transparency services addressing each request through a randomised hostname, which resolve on a fixed interval whether or not anyone is at the keyboard."level: low

Splunk · SPL

Run this as a search.

index=* | where ((match(Image, "(?i)\\\\powershell\\.exe$") OR match(Image, "(?i)\\\\pwsh\\.exe$") OR match(Image, "(?i)\\\\rundll32\\.exe$") OR match(Image, "(?i)\\\\regsvr32\\.exe$") OR match(Image, "(?i)\\\\mshta\\.exe$") OR match(Image, "(?i)\\\\wscript\\.exe$") OR match(Image, "(?i)\\\\cscript\\.exe$") OR match(Image, "(?i)\\\\nslookup\\.exe$") OR match(Image, "(?i)\\\\certutil\\.exe$") OR match(Image, "(?i)\\\\python\\.exe$") OR match(Image, "(?i)\\\\msbuild\\.exe$") OR match(Image, "(?i)\\\\installutil\\.exe$")) AND match(QueryName, "^[A-Za-z0-9_-]{40,}\\."))

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,windows,dns_query,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$|\\rundll32\.exe$|\\regsvr32\.exe$|\\mshta\.exe$|\\wscript\.exe$|\\cscript\.exe$|\\nslookup\.exe$|\\certutil\.exe$|\\python\.exe$|\\msbuild\.exe$|\\installutil\.exe$)</field>    <field name="QueryName" type="pcre2">(?i)^[A-Za-z0-9_-]{40,}\.</field>    <description>Long encoded DNS label queried by a script host or proxy binary</description>    <mitre>      <id>T1071.004</id>    </mitre>  </rule></group>

Sentinel · KQL

Run this as a search.

Sentinel cannot express this construct. No Sentinel table is modelled for this logsource ({"category":"dns_query","product":"windows"}), so there is nothing honest to query. Pick a logsource this translator maps, or write the KQL by hand. The Sigma source is on the first tab, unchanged.

Elastic · ES|QL

Run this as a search.

Elastic cannot express this construct. ES|QL RLIKE uses Lucene regexp syntax, which has no case-insensitive flag, and Sigma regexes are case-insensitive. Use |contains/|startswith/|endswith, or write the ES|QL by hand. The Sigma source is on the first tab, unchanged.

Verdicts · reactions · comments

Community

Verdicts from engineers who actually deployed it, and the conversation around it.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.

Log in to report a verdict.

Log in to join the discussion.

No comments yet. Someone who deploys this will have something to say about it.