Suspicious Microsoft Diagnostics Wizard Execution

Identifies potential abuse of the Microsoft Diagnostics Troubleshooting Wizard (MSDT) to proxy malicious command or binary execution via malicious process arguments.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2022/05/31"
 3integration = ["endpoint", "windows", "m365_defender"]
 4maturity = "production"
 5updated_date = "2024/10/15"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies potential abuse of the Microsoft Diagnostics Troubleshooting Wizard (MSDT) to proxy malicious command or
13binary execution via malicious process arguments.
14"""
15from = "now-9m"
16index = ["logs-endpoint.events.process-*", "winlogbeat-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Suspicious Microsoft Diagnostics Wizard Execution"
20references = [
21    "https://twitter.com/nao_sec/status/1530196847679401984",
22    "https://lolbas-project.github.io/lolbas/Binaries/Msdt/",
23]
24risk_score = 73
25rule_id = "2c3c29a4-f170-42f8-a3d8-2ceebc18eb6a"
26severity = "high"
27tags = [
28    "Domain: Endpoint",
29    "OS: Windows",
30    "Use Case: Threat Detection",
31    "Tactic: Defense Evasion",
32    "Data Source: Elastic Endgame",
33    "Data Source: Elastic Defend",
34    "Data Source: Microsoft Defender for Endpoint",
35    "Data Source: Sysmon",
36]
37timestamp_override = "event.ingested"
38type = "eql"
39
40query = '''
41process where host.os.type == "windows" and event.type == "start" and
42   (process.pe.original_file_name == "msdt.exe" or process.name : "msdt.exe") and
43   (
44    process.args : ("IT_RebrowseForFile=*", "ms-msdt:/id", "ms-msdt:-id", "*FromBase64*") or
45
46    (process.args : "-af" and process.args : "/skip" and
47     process.parent.name : ("explorer.exe", "cmd.exe", "powershell.exe", "cscript.exe", "wscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe") and
48     process.args : ("?:\\WINDOWS\\diagnostics\\index\\PCWDiagnostic.xml", "PCWDiagnostic.xml", "?:\\Users\\Public\\*", "?:\\Windows\\Temp\\*")) or
49
50    (process.pe.original_file_name == "msdt.exe" and not process.name : "msdt.exe" and process.name != null) or
51
52    (process.pe.original_file_name == "msdt.exe" and not process.executable : ("?:\\Windows\\system32\\msdt.exe", "?:\\Windows\\SysWOW64\\msdt.exe"))
53    )
54'''
55
56
57[[rule.threat]]
58framework = "MITRE ATT&CK"
59[[rule.threat.technique]]
60id = "T1218"
61name = "System Binary Proxy Execution"
62reference = "https://attack.mitre.org/techniques/T1218/"
63
64
65[rule.threat.tactic]
66id = "TA0005"
67name = "Defense Evasion"
68reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top