Detect Subvert Trust Controls in Sumo Logic CSE
Adversaries may undermine security controls that warn users of untrusted activity or prevent execution of untrusted programs. Operating systems and security products contain mechanisms to identify programs or websites as possessing some level of trust, such as code signing certificates, Mark-of-the-Web (MOTW) attributes, Gatekeeper on macOS, or SIP and Trust Provider validation on Windows. Adversaries attempt to subvert these trust mechanisms through techniques including code signing certificate theft or forgery, MOTW removal, root certificate installation, SIP/Trust Provider hijacking, and Gatekeeper bypass. The method used depends on the specific mechanism being subverted.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1553 Subvert Trust Controls
- Canonical reference
- https://attack.mitre.org/techniques/T1553/
Sumo Detection Query
_index=sec_record*
| where metadata_deviceEventId in ("1", "4688")
| where (
(toLowerCase(baseImage) matches ".*certutil\\.exe.*" AND
toLowerCase(commandLine) matches ".*(-addstore|-delstore|-importpfx|-enterprise).*")
OR (toLowerCase(baseImage) matches ".*(powershell|pwsh|cmd)\\.exe.*" AND
toLowerCase(commandLine) matches ".*(zone\\.identifier|unblock-file|zoneid).*")
OR (toLowerCase(baseImage) matches ".*signtool\\.exe.*" AND
toLowerCase(commandLine) matches ".*sign.*")
OR toLowerCase(baseImage) matches ".*(makecert|pvk2pfx)\\.exe.*"
)
| eval ImageLower = toLowerCase(baseImage)
| eval CmdLower = toLowerCase(commandLine)
| eval CertStoreManip = if (ImageLower matches ".*certutil\\.exe.*" AND (CmdLower matches ".*-addstore.*" OR CmdLower matches ".*-delstore.*" OR CmdLower matches ".*-importpfx.*" OR CmdLower matches ".*-enterprise.*"), 1, 0)
| eval RootStoreAdd = if (CertStoreManip == 1 AND (CmdLower matches ".*(root|authroot|trustedpublisher|trustedpeople).*"), 1, 0)
| eval MotwRemoval = if (ImageLower matches ".*(powershell|pwsh|cmd)\\.exe.*" AND (CmdLower matches ".*zone\\.identifier.*" OR CmdLower matches ".*unblock-file.*"), 1, 0)
| eval SigntoolUsage = if (ImageLower matches ".*signtool\\.exe.*" AND CmdLower matches ".*sign.*", 1, 0)
| eval CertCreation = if (ImageLower matches ".*(makecert|pvk2pfx)\\.exe.*", 1, 0)
| eval SuspicionScore = CertStoreManip + RootStoreAdd + MotwRemoval + SigntoolUsage + CertCreation
| eval DetectionBranch = if (RootStoreAdd == 1, "ROOT_CERT_INSTALL", if (CertStoreManip == 1, "CERT_STORE_MANIP", if (MotwRemoval == 1, "MOTW_REMOVAL", if (SigntoolUsage == 1, "SIGNTOOL_SIGN", if (CertCreation == 1, "CERT_CREATION", "TRUST_SUBVERSION")))))
| fields metadata_deviceTimestamp, device_hostname, user_username, baseImage, commandLine, parentBaseImage, DetectionBranch, CertStoreManip, RootStoreAdd, MotwRemoval, SigntoolUsage, CertCreation, SuspicionScore
| sort by SuspicionScore desc, metadata_deviceTimestamp desc Sumo Logic Cloud SIEM (CSE) query detecting T1553 Subvert Trust Controls using the normalized sec_record schema. Targets Sysmon EventID 1 and Windows Security EventID 4688 process creation records ingested through CSE normalization. Implements multi-branch scoring for certutil certificate manipulation, MOTW removal, signtool usage, and certificate creation tools. Requires CSE normalization with baseImage, commandLine, parentBaseImage, device_hostname, and user_username fields populated from Windows endpoint telemetry.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise certificate lifecycle management processes run by IT security or PKI teams using certutil to install corporate CA certificates into ROOT and TRUSTEDPUBLISHER stores will trigger CERT_STORE_MANIP and ROOT_CERT_INSTALL branches on every managed endpoint during rollouts
- Developers using Windows SDK tools (makecert, pvk2pfx, signtool) during local development and testing of code signing workflows will generate persistent CERT_CREATION and SIGNTOOL_SIGN detections on developer workstations
- Security scanning and EDR tools that interact with Zone.Identifier ADS attributes during file quarantine, sandboxing, or safe-launch preprocessing workflows may trigger MOTW_REMOVAL detections as a routine operational side effect
Other platforms for T1553
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 1Add Self-Signed Root Certificate to Windows ROOT Store
Expected signal: Sysmon Event ID 1: Process Create with Image=certutil.exe, CommandLine containing '-addstore ROOT'. Security Event ID 4688 (if command line auditing enabled). Windows CertificateServicesClient-Lifecycle-System/Operational Event ID 1001 (certificate installed). CAPI2 Operational log entries for certificate store modification.
- Test 2Remove Mark-of-the-Web via PowerShell Unblock-File
Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Unblock-File' and the target file path. Sysmon Event ID 23 or 26 (File Delete) for the Zone.Identifier ADS removal. PowerShell ScriptBlock Log Event ID 4104 showing the Unblock-File command. Security Event ID 4663 (object access) if file system auditing is enabled for the temp directory.
- Test 3Remove Zone.Identifier ADS via cmd.exe del command
Expected signal: Sysmon Event ID 1: cmd.exe with CommandLine containing 'Zone.Identifier' and 'del'. Sysmon Event ID 23 (File Delete) for the ADS. Security Event ID 4688 if command line auditing is enabled. Note: some EDR solutions specifically monitor for ADS deletion on .exe files.
- Test 4Inspect and Enumerate SIP Trust Provider Registry Keys
Expected signal: Sysmon Event ID 1: reg.exe with CommandLine querying Cryptography\OID paths. Security Event ID 4663 (registry object access) if registry auditing is enabled. No modifications occur — this tests detection of enumeration prior to hijacking.
References (9)
- https://attack.mitre.org/techniques/T1553/
- https://specterops.io/assets/resources/SpecterOps_Subverting_Trust_in_Windows.pdf
- https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec
- https://securelist.com/why-you-shouldnt-completely-trust-files-signed-with-digital-certificates/68593/
- https://learn.microsoft.com/en-us/windows/win32/seccrypto/subject-interface-packages
- https://learn.microsoft.com/en-us/sysinternals/downloads/streams
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceregistryevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1553/T1553.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/registry
Unlock Pro Content
Get the full detection package for T1553 including response playbook, investigation guide, and atomic red team tests.