Detection rules › Splunk

Microsoft Diagnostic Tool "DogWalk" Package Path Traversal (Windows Event Log)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

The vulnerability lies in the Microsoft Diagnostic Tool's sdiageng.dll library, which takes the attacker-supplied folder path from the package configuration XML file inside the diagcab archive, and copies all files from that folder to a local temporary folder. During this process, it enumerates files in attacker's folder, gets the file name for each of them, then glues together the local temporary path and that file name to generate the local path on the computer where the file is to be created.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1204 User Execution

References

Event coverage

Rule body yaml

id: '11280.15742'
title: Microsoft Diagnostic Tool "DogWalk" Package Path Traversal
description: The vulnerability lies in the Microsoft Diagnostic Tool's sdiageng.dll
  library, which takes the attacker-supplied folder path from the package configuration
  XML file inside the diagcab archive, and copies all files from that folder to a
  local temporary folder. During this process, it enumerates files in attacker's folder,
  gets the file name for each of them, then glues together the local temporary path
  and that file name to generate the local path on the computer where the file is
  to be created.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) ("msdt.exe" OR TERM(msdt)) AND ("/cab" OR ".diagcab")
  | table _time, host, user process, process_*, parent_*, signature_id, trun_cmd |
  bin span=1s | stats values(*) as * by _time, host | where match(process, "(?i)cab|diagcab") '
techniques:
- execution:user execution
technique_id: 
- T1204
data_category:
- Windows event logs
references:
- https://blog.0patch.com/2022/06/microsoft-diagnostic-tools-dogwalk.html

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) ("msdt.exe" OR TERM(msdt)) AND ("/cab" OR ".diagcab")

Stage 2: table

| table _time, host, user process, process_*, parent_*, signature_id, trun_cmd

Stage 3: bucket

| bin span=1s

Stage 4: stats

| stats values(*) as * by _time, host

Stage 5: where

| where match(process, "(?i)cab|diagcab")

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 4688 corpus 313 (splunk 283, kusto 30)
processmatch
  • "(?i)cab|diagcab" corpus 3 (splunk 3)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>4688<"
1"msdt.exe"
1TERM
1msdt
1"/cab"
1".diagcab"