T1195.002

Compromise Software Supply Chain

Adversaries may manipulate application software prior to receipt by a final consumer for the purpose of data or system compromise. Supply chain compromise of software can take place in a number of ways, including manipulation of the application source code, manipulation of the update/distribution mechanism for that software, or replacing compiled releases with a modified version. Real-world examples include SUNSPOT injecting SUNBURST into SolarWinds Orion builds, CCBkdr backdooring CCleaner 5.33, and Sandworm replacing M.E.Doc updates with NotPetya. Detection focuses on post-installation behavioral anomalies: legitimate software exhibiting unexpected child process execution, unusual outbound connectivity, suspicious DLL loading, and credential access patterns that should never originate from trusted update mechanisms.

Microsoft Sentinel / Defender
kusto
let SoftwareInstallerProcesses = dynamic([
  "msiexec.exe", "setup.exe", "install.exe", "installer.exe",
  "update.exe", "updater.exe", "autoupdate.exe", "softwareupdate.exe",
  "uninst.exe", "uninstall.exe", "patch.exe", "patchinstall.exe"
]);
let SuspiciousChildProcesses = dynamic([
  "powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe",
  "mshta.exe", "regsvr32.exe", "rundll32.exe", "certutil.exe",
  "bitsadmin.exe", "wmic.exe", "msbuild.exe", "installutil.exe",
  "regasm.exe", "cmstp.exe", "control.exe", "msiexec.exe"
]);
let KnownBuildTools = dynamic([
  "msbuild.exe", "devenv.exe", "cl.exe", "link.exe",
  "csc.exe", "vbc.exe", "dotnet.exe", "gradle", "maven"
]);
// Query 1: Installers/updaters spawning suspicious child processes
let InstallerChildProcesses = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ (SoftwareInstallerProcesses)
| where FileName in~ (SuspiciousChildProcesses)
| extend DetectionType = "Installer_Spawned_Suspicious_Child"
| project Timestamp, DeviceName, AccountName, DetectionType,
         FileName, ProcessCommandLine, SHA256,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         InitiatingProcessParentFileName;
// Query 2: Trusted vendor update processes making outbound connections to non-standard destinations
let UpdateNetworkAnomalies = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ (SoftwareInstallerProcesses)
| where RemoteIPType == "Public"
| where RemotePort !in (80, 443, 8080, 8443)
| extend DetectionType = "Updater_Nonstandard_Port_Outbound"
| project Timestamp, DeviceName, DetectionType,
         RemoteIP, RemotePort, RemoteUrl,
         InitiatingProcessFileName, InitiatingProcessCommandLine;
// Query 3: Executables written by update/install processes to suspicious paths then immediately executed
let SuspiciousDropAndExecute = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where InitiatingProcessFileName in~ (SoftwareInstallerProcesses)
| where FileName endswith ".exe" or FileName endswith ".dll" or FileName endswith ".ps1"
| where FolderPath has_any ("\\Temp\\", "\\AppData\\Local\\Temp\\", "\\Windows\\Temp\\")
| extend DetectionType = "Updater_Dropped_Executable_In_Temp"
| project Timestamp, DeviceName, DetectionType,
         FolderPath, FileName, SHA256,
         InitiatingProcessFileName, InitiatingProcessCommandLine;
// Query 4: Build system processes creating executables in unexpected locations (SUNSPOT-style)
let BuildToolAnomalies = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ (KnownBuildTools)
| where FileName in~ (SuspiciousChildProcesses)
| where not(ProcessCommandLine has_any ("--help", "-help", "/?"))
| extend DetectionType = "BuildTool_Spawned_Suspicious_Process"
| project Timestamp, DeviceName, AccountName, DetectionType,
         FileName, ProcessCommandLine, SHA256,
         InitiatingProcessFileName, InitiatingProcessCommandLine;
// Combine all detections
InstallerChildProcesses
| union UpdateNetworkAnomalies
| union SuspiciousDropAndExecute
| union BuildToolAnomalies
| sort by Timestamp desc
high severity medium confidence

Data Sources

Process: Process Creation Network Traffic: Network Connection Creation File: File Creation Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceNetworkEvents DeviceFileEvents

False Positives

  • Legitimate software updaters that use PowerShell or cmd.exe as part of their post-install configuration (e.g., some enterprise software uses PowerShell for environment setup after MSI installation)
  • Build systems that invoke utility scripts via cmd.exe or PowerShell during compilation steps — common in CI/CD pipelines where MSBuild calls post-build scripts
  • Software vendors using non-standard ports for update delivery (e.g., some enterprise patch management solutions use custom ports for update traffic)
  • IT provisioning tools (SCCM, Intune, Chocolatey) that install software via msiexec.exe and then run PowerShell configuration scripts as part of normal deployment workflows
  • Development workstations where build tools (devenv.exe, dotnet.exe) regularly invoke scripts during local builds

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections