Detect Subvert Trust Controls in Elastic Security
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/
Elastic Detection Query
any where
(
event.category == "process" and event.type == "start" and
(
(
process.name == "certutil.exe" and
process.command_line : ("*-addstore*", "*-delstore*", "*-importpfx*", "*-enterprise*")
) or
(
process.name in~ ("powershell.exe", "pwsh.exe", "cmd.exe") and
process.command_line : ("*Zone.Identifier*", "*Unblock-File*", "*ZoneId*")
) or
(
process.name == "signtool.exe" and
process.command_line : "*sign*"
) or
process.name in~ ("makecert.exe", "pvk2pfx.exe")
)
) or
(
event.category == "registry" and
event.type in ("creation", "change") and
registry.path : (
"*SOFTWARE\\Microsoft\\Cryptography\\OID*",
"*SOFTWARE\\Microsoft\\Cryptography\\Providers*",
"*SOFTWARE\\Policies\\Microsoft\\SystemCertificates*",
"*SOFTWARE\\Microsoft\\EnterpriseCertificates*",
"*SYSTEM\\CurrentControlSet\\Control\\SecurityProviders*"
)
) Detects T1553 Subvert Trust Controls via Elastic EQL across process and registry event categories. Covers certutil certificate store manipulation (-addstore, -delstore, -importpfx, -enterprise), MOTW removal via Zone.Identifier ADS deletion or Unblock-File, signtool signing activity, certificate creation tools (makecert/pvk2pfx), and modifications to Windows cryptography and trust provider registry hives. Uses ECS fields compatible with Elastic Agent endpoint integration and Winlogbeat/Sysmon ingestion.
Data Sources
Required Tables
False Positives & Tuning
- PKI administrators and enterprise IT teams legitimately invoke certutil.exe with -addstore to distribute corporate CA certificates to managed endpoints during onboarding or certificate rotation cycles
- Development and release engineering pipelines use signtool.exe routinely during build automation and code signing for internal or commercial software releases on CI/CD build agents
- Enterprise software deployment tools (SCCM, Intune, Jamf) may remove Zone.Identifier alternate data streams from distributed packages as part of automated deployment preprocessing before execution
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.