Detect Compromise Software Supply Chain in Sumo Logic CSE
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.
MITRE ATT&CK
- Tactic
- Initial Access
- Technique
- T1195 Supply Chain Compromise
- Sub-technique
- T1195.002 Compromise Software Supply Chain
- Canonical reference
- https://attack.mitre.org/techniques/T1195/002/
Sumo Detection Query
_sourceCategory=windows* AND ("EventCode=1" OR "EventCode=3" OR "EventCode=11" OR "EventCode=4688")
| parse field=_raw "<Data Name='ParentImage'>*</Data>" as ParentImageRaw nodrop
| parse field=_raw "<Data Name='Image'>*</Data>" as ChildImageRaw nodrop
| parse field=_raw "<Data Name='CommandLine'>*</Data>" as CommandLine nodrop
| parse field=_raw "<Data Name='TargetFilename'>*</Data>" as TargetFilename nodrop
| parse field=_raw "<Data Name='DestinationIp'>*</Data>" as DestinationIp nodrop
| parse field=_raw "<Data Name='DestinationPort'>*</Data>" as DestinationPort nodrop
| parse field=_raw "<Data Name='User'>*</Data>" as User nodrop
| parse field=_raw "EventCode=*" as EventCode nodrop
| eval ParentProcessName = replace(ParentImageRaw, "(.+\\\\)", "")
| eval ChildProcessName = replace(ChildImageRaw, "(.+\\\\)", "")
| eval ParentLower = toLowerCase(ParentProcessName)
| eval ChildLower = toLowerCase(ChildProcessName)
| eval CmdLineLower = toLowerCase(CommandLine)
| eval TargetLower = toLowerCase(TargetFilename)
| eval IsInstallerParent = if(ParentLower matches "msiexec.exe" or ParentLower matches "setup.exe" or ParentLower matches "install.exe" or ParentLower matches "installer.exe" or ParentLower matches "update.exe" or ParentLower matches "updater.exe" or ParentLower matches "autoupdate.exe" or ParentLower matches "softwareupdate.exe" or ParentLower matches "uninst.exe" or ParentLower matches "uninstall.exe" or ParentLower matches "patch.exe" or ParentLower matches "patchinstall.exe", 1, 0)
| eval IsBuildToolParent = if(ParentLower matches "msbuild.exe" or ParentLower matches "devenv.exe" or ParentLower matches "cl.exe" or ParentLower matches "link.exe" or ParentLower matches "csc.exe" or ParentLower matches "vbc.exe" or ParentLower matches "dotnet.exe", 1, 0)
| eval IsSuspiciousChild = if(ChildLower matches "powershell.exe" or ChildLower matches "pwsh.exe" or ChildLower matches "cmd.exe" or ChildLower matches "wscript.exe" or ChildLower matches "cscript.exe" or ChildLower matches "mshta.exe" or ChildLower matches "regsvr32.exe" or ChildLower matches "rundll32.exe" or ChildLower matches "certutil.exe" or ChildLower matches "bitsadmin.exe" or ChildLower matches "wmic.exe" or ChildLower matches "installutil.exe" or ChildLower matches "regasm.exe" or ChildLower matches "cmstp.exe", 1, 0)
| eval DroppedInTemp = if(EventCode = "11" and (TargetLower contains "\\temp\\" or TargetLower contains "\\appdata\\local\\temp\\" or TargetLower contains "\\windows\\temp\\") and (TargetLower matches "*.exe" or TargetLower matches "*.dll" or TargetLower matches "*.ps1" or TargetLower matches "*.bat") and IsInstallerParent = 1, 1, 0)
| eval IsEncodedCmd = if(CmdLineLower contains "-encodedcommand" or CmdLineLower contains "-enc " or CmdLineLower contains "-e " or CmdLineLower contains "base64", 1, 0)
| eval NonStandardPortOutbound = if(EventCode = "3" and IsInstallerParent = 1 and DestinationPort != "80" and DestinationPort != "443" and DestinationPort != "8080" and DestinationPort != "8443" and !DestinationIp matches "10.*" and !DestinationIp matches "192.168.*" and !DestinationIp matches "172.1[6-9].*" and !DestinationIp matches "172.2[0-9].*" and !DestinationIp matches "172.3[01].*", 1, 0)
| eval DetectionType = if(IsInstallerParent = 1 and IsSuspiciousChild = 1, "Installer_Spawned_Suspicious_Child",
if(IsBuildToolParent = 1 and IsSuspiciousChild = 1, "BuildTool_Spawned_Suspicious_Process",
if(DroppedInTemp = 1, "Updater_Dropped_Executable_In_Temp",
if(NonStandardPortOutbound = 1, "Updater_Nonstandard_Port_Outbound", null))))
| where !isNull(DetectionType)
| eval SuspicionScore = IsInstallerParent + IsSuspiciousChild + IsBuildToolParent + DroppedInTemp + IsEncodedCmd + NonStandardPortOutbound
| fields _messageTime, Computer, User, DetectionType, SuspicionScore, ParentProcessName, ChildProcessName, CommandLine, DestinationIp, DestinationPort, TargetFilename
| sort by _messageTime desc Sumo Logic detection for T1195.002 supply chain compromise. Parses Sysmon XML event data from Windows endpoints to identify installer/updater processes spawning suspicious LOLBin child processes, build tools spawning unexpected shells (SUNSPOT-style), update processes dropping executables in temp paths, and update processes making outbound connections to non-standard ports on public IPs.
Data Sources
Required Tables
False Positives & Tuning
- Third-party software distribution platforms (e.g., Chocolatey, Scoop, Ninite) that wrap installer processes in PowerShell or cmd.exe scripts as part of their normal packaging workflow
- Antivirus or endpoint protection update mechanisms that write signature files or update components to temp directories as part of legitimate update processes
- Enterprise application packaging tools (e.g., InstallShield, NSIS, WiX) that use build tool chains including msbuild.exe that legitimately invoke PowerShell for post-build actions during development
Other platforms for T1195.002
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate Backdoored Installer Spawning PowerShell (Post-Install C2 Simulation)
Expected signal: Sysmon Event ID 1: Process Create with ParentImage=msiexec.exe, Image=powershell.exe, CommandLine containing '-WindowStyle Hidden' and 'Invoke-WebRequest'. Sysmon Event ID 3: Network Connection attempt from powershell.exe to 127.0.0.1:9999 (connection refused is acceptable). Security Event ID 4688 if command line auditing is enabled.
- Test 2Simulate Build Tool Spawning Unexpected Shell (SUNSPOT-Style Build Injection)
Expected signal: Sysmon Event ID 1: Process Create with ParentImage=msbuild.exe (or cmd.exe spawned from the test fallback), Image=cmd.exe, CommandLine containing 'whoami'. Security Event ID 4688 with NewProcessName=cmd.exe, CreatorProcessName=msbuild.exe. File creation event for the output file in %TEMP%.
- Test 3Simulate Supply Chain Malware Dropping Executable in Temp During Install
Expected signal: Sysmon Event ID 11: File Create with TargetFilename=%TEMP%\payload_stage2.exe, Image=powershell.exe. Sysmon Event ID 1: PowerShell spawning (parent chain visible). The file copy of calc.exe will have a known benign SHA256 but the file path in Temp will be flagged.
- Test 4Verify Code Signing Certificate on Installed Binary (Supply Chain Investigation Validation)
Expected signal: Sysmon Event ID 1: PowerShell process spawned. No file modification events. The command performs read-only certificate inspection. PowerShell ScriptBlock Log Event ID 4104 captures the script content. This is purely a verification/investigation command.
References (12)
- https://attack.mitre.org/techniques/T1195/002/
- https://www.crowdstrike.com/blog/sunspot-malware-technical-analysis/
- https://blog.avast.com/new-investigations-in-ccleaner-incident-point-to-a-possible-third-stage-that-had-keylogger-capacities
- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/goldenspy-chapter-two-the-uninstaller/
- https://www.secureworks.com/research/revil-sodinokibi-ransomware
- https://www.welivesecurity.com/2023/04/26/evasive-panda-apt-group-moss-plugin-attack/
- https://www.microsoft.com/en-us/security/blog/2024/05/28/moonstone-sleet-emerges-as-new-north-korean-threat-actor/
- https://www.mandiant.com/resources/blog/fin7-reboot-quakbot
- https://www.cisa.gov/sites/default/files/publications/CISA_Insights-Mitigations_and_Hardening_Guidance_for_MSPs_and_Small-and-Mid-sized_Businesses.pdf
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicefileevents-table
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1195.002/T1195.002.md
Unlock Pro Content
Get the full detection package for T1195.002 including response playbook, investigation guide, and atomic red team tests.