Suspicious Microsoft Diagnostics Wizard Execution
This rule detects potential abuse of the Microsoft Diagnostics Troubleshooting Wizard (MSDT) to proxy malicious command or binary execution via malicious process arguments on Windows systems.
The Microsoft Diagnostics Troubleshooting Wizard (MSDT) is a built-in Windows tool used for troubleshooting various system issues. Attackers can abuse MSDT to proxy malicious command or binary execution through carefully crafted process arguments, evading traditional defense mechanisms. This technique leverages the trust associated with a signed Microsoft binary (msdt.exe) to execute arbitrary commands. The detection rule identifies suspicious MSDT executions based on command-line arguments, filename discrepancies, and unusual process relationships. This activity has been observed since at least May 2022 and continues to be a relevant defense evasion technique. Defenders should monitor for unusual invocations of MSDT, especially when launched from untrusted sources or with suspicious arguments.
Attack Chain
- Attacker gains initial access via an unspecified vector (e.g., phishing, drive-by download).
- The attacker uses a malicious document or script to invoke
msdt.exewith specific arguments. - MSDT is executed with a crafted
IT_RebrowseForFileorIT_BrowseForFileparameter containing a malicious payload. - Alternatively, MSDT is executed with
-af /skipand a path to a maliciousPCWDiagnostic.xmlfile. - MSDT processes the malicious input, leading to the execution of attacker-controlled code.
- The attacker’s code executes, potentially downloading or executing further payloads.
- The attacker achieves persistence by modifying registry keys or creating scheduled tasks.
- The attacker moves laterally through the network, compromising additional systems and data.
Impact
Successful exploitation allows attackers to bypass security controls and execute arbitrary code on compromised systems. This can lead to data theft, system compromise, and further propagation of the attack within the network. The defense evasion tactic can obscure malicious activities, making it more difficult to detect and respond to incidents. Depending on the user’s privileges, the attacker might gain elevated privileges on the system.
Recommendation
- Deploy the provided Sigma rules to detect suspicious MSDT executions based on process arguments, filename discrepancies, and unusual parent-child relationships.
- Monitor process creation events for
msdt.exewith arguments containingIT_RebrowseForFile=*,*FromBase64*, or*/../../../*using the provided Sigma rule. - Enable Sysmon process creation logging (Event ID 1) to capture the necessary process execution details for the provided Sigma rules.
- Investigate any alerts generated by these rules, focusing on the process command line, parent process, and any spawned child processes.
- Block execution of
msdt.exefrom non-standard paths as highlighted in the detection rule.
Detection coverage 3
Suspicious MSDT Execution with IT_RebrowseForFile
highDetects MSDT execution with IT_RebrowseForFile or IT_BrowseForFile arguments, indicating potential abuse.
Suspicious MSDT Execution with -af and /skip
highDetects MSDT execution with -af /skip arguments pointing to a PCWDiagnostic.xml file, often used for exploitation.
MSDT Executed from Unusual Location
mediumDetects MSDT execution from a non-standard directory, which can indicate malicious activity.
Detection queries are kept inside the platform. Get full rules →