T1127

Trusted Developer Utilities Proxy Execution

Adversaries may take advantage of trusted developer utilities to proxy execution of malicious payloads. Utilities used for software development tasks such as MSBuild, csc.exe, vbc.exe, WinDbg, cdb.exe, tracker.exe, dnx.exe, and rcsi.exe are typically signed with legitimate Microsoft certificates, allowing them to execute code and bypass application control solutions. These utilities can compile and execute inline C#, VB.NET, or native shellcode embedded in project files, scripts, or command-line arguments, effectively masquerading malicious execution as legitimate developer activity. Adversaries also leverage these tools to bypass Smart App Control by abusing the OS trust model for signed binaries that support arbitrary code execution.

Microsoft Sentinel / Defender
kusto
let TrustedDevUtils = dynamic([
  "msbuild.exe", "csc.exe", "vbc.exe", "jsc.exe",
  "dnx.exe", "rcsi.exe", "tracker.exe",
  "cdb.exe", "windbg.exe", "kd.exe", "ntsd.exe",
  "msdeploy.exe", "xwizard.exe", "mshta.exe"
]);
let SuspiciousParents = dynamic([
  "winword.exe", "excel.exe", "powerpnt.exe", "outlook.exe",
  "msedge.exe", "chrome.exe", "firefox.exe", "iexplore.exe",
  "wscript.exe", "cscript.exe", "mshta.exe", "cmd.exe",
  "powershell.exe", "pwsh.exe"
]);
let SuspiciousPaths = dynamic([
  "\\Temp\\", "\\AppData\\Local\\Temp\\", "\\AppData\\Roaming\\",
  "\\ProgramData\\", "\\Users\\Public\\", "\\Downloads\\"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (TrustedDevUtils)
| extend LaunchedBySuspiciousParent = InitiatingProcessFileName in~ (SuspiciousParents)
| extend FileFromSuspiciousPath = ProcessCommandLine has_any (SuspiciousPaths)
| extend MSBuildInlineTask = FileName =~ "msbuild.exe" and ProcessCommandLine has_any (".csproj", ".proj", ".xml", ".targets", ".tasks")
| extend CompilerFromTemp = FileName in~ ("csc.exe", "vbc.exe", "jsc.exe") and ProcessCommandLine has_any (SuspiciousPaths)
| extend DebuggerShellcode = FileName in~ ("cdb.exe", "windbg.exe", "ntsd.exe", "kd.exe") and ProcessCommandLine has_any ("-pd", "-pv", "-cf", "-c ")
| extend TrackerExec = FileName =~ "tracker.exe" and ProcessCommandLine has_any ("/d3", "/dumpstartuplogging", ".dll", ".exe")
| extend RareUtility = FileName in~ ("dnx.exe", "rcsi.exe")
| where LaunchedBySuspiciousParent
     or FileFromSuspiciousPath
     or CompilerFromTemp
     or DebuggerShellcode
     or TrackerExec
     or RareUtility
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         FolderPath,
         LaunchedBySuspiciousParent, FileFromSuspiciousPath, MSBuildInlineTask,
         CompilerFromTemp, DebuggerShellcode, TrackerExec, RareUtility
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • Developer workstations where engineers legitimately invoke MSBuild, csc.exe, or vbc.exe from scripts and IDE terminal sessions
  • CI/CD agents (Azure DevOps, Jenkins, TeamCity) that build .NET code using MSBuild or csc.exe — often running as SYSTEM or a service account from non-standard working directories
  • IT automation frameworks that compile helper DLLs on-demand from scripts (e.g., some Ansible Windows modules use inline C# via csc.exe)
  • Debugging and crash analysis workflows where WinDbg or cdb.exe is legitimately invoked by developers or support engineers
  • Visual Studio and Roslyn toolchain processes that compile code from user profile temp directories during incremental builds

Unlock Pro Content

Get the full detection package for T1127 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections