Detect Subvert Trust Controls in IBM QRadar
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/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS EventTime,
LOGSOURCENAME(logsourceid) AS LogSource,
sourceip AS SourceIP,
username AS Username,
"Process Name",
"Command Line",
"Parent Process Name",
CASE
WHEN LOWER("Process Name") LIKE '%certutil.exe%'
AND (LOWER("Command Line") LIKE '%-addstore%' OR LOWER("Command Line") LIKE '%-delstore%'
OR LOWER("Command Line") LIKE '%-importpfx%' OR LOWER("Command Line") LIKE '%-enterprise%')
AND (LOWER("Command Line") LIKE '%root%' OR LOWER("Command Line") LIKE '%authroot%'
OR LOWER("Command Line") LIKE '%trustedpublisher%')
THEN 'ROOT_CERT_INSTALL'
WHEN LOWER("Process Name") LIKE '%certutil.exe%'
AND (LOWER("Command Line") LIKE '%-addstore%' OR LOWER("Command Line") LIKE '%-importpfx%')
THEN 'CERT_STORE_MANIP'
WHEN (LOWER("Process Name") LIKE '%powershell%' OR LOWER("Process Name") LIKE '%cmd.exe%'
OR LOWER("Process Name") LIKE '%pwsh.exe%')
AND (LOWER("Command Line") LIKE '%zone.identifier%' OR LOWER("Command Line") LIKE '%unblock-file%')
THEN 'MOTW_REMOVAL'
WHEN LOWER("Process Name") LIKE '%signtool.exe%' AND LOWER("Command Line") LIKE '%sign%'
THEN 'SIGNTOOL_SIGN'
WHEN LOWER("Process Name") LIKE '%makecert.exe%' OR LOWER("Process Name") LIKE '%pvk2pfx.exe%'
THEN 'CERT_CREATION'
ELSE 'TRUST_SUBVERSION'
END AS DetectionBranch
FROM events
WHERE LOGSOURCETYPEID IN (12, 119)
AND (
(
LOWER("Process Name") LIKE '%certutil.exe%' AND
(
LOWER("Command Line") LIKE '%-addstore%' OR
LOWER("Command Line") LIKE '%-delstore%' OR
LOWER("Command Line") LIKE '%-importpfx%' OR
LOWER("Command Line") LIKE '%-enterprise%'
)
) OR
(
(
LOWER("Process Name") LIKE '%powershell%' OR
LOWER("Process Name") LIKE '%cmd.exe%' OR
LOWER("Process Name") LIKE '%pwsh.exe%'
) AND
(
LOWER("Command Line") LIKE '%zone.identifier%' OR
LOWER("Command Line") LIKE '%unblock-file%' OR
LOWER("Command Line") LIKE '%zoneid%'
)
) OR
(
LOWER("Process Name") LIKE '%signtool.exe%' AND
LOWER("Command Line") LIKE '%sign%'
) OR
LOWER("Process Name") LIKE '%makecert.exe%' OR
LOWER("Process Name") LIKE '%pvk2pfx.exe%'
)
LAST 24 HOURS
ORDER BY starttime DESC IBM QRadar AQL query detecting T1553 Subvert Trust Controls. Targets Windows Security Event Log (LOGSOURCETYPEID 12, EventID 4688) and Sysmon (LOGSOURCETYPEID 119, EventID 1) process creation events. Detects certutil certificate store manipulation including root store additions, MOTW removal, signtool signing operations, and certificate creation utility usage. Requires custom QRadar DSM properties for Process Name and Command Line to be mapped from raw Windows event payloads.
Data Sources
Required Tables
False Positives & Tuning
- IT infrastructure teams distributing enterprise root CA certificates to endpoints via Group Policy or manual certutil operations will produce ROOT_CERT_INSTALL and CERT_STORE_MANIP events at scale across fleet-wide certificate rollout windows
- Automated code signing systems and developer workstations with signtool integrated into build toolchains will generate high-volume SIGNTOOL_SIGN events during CI/CD pipeline execution on build servers
- Legitimate software distribution platforms that download and execute installer packages may strip Zone.Identifier ADS streams in a preprocessing step before execution, triggering MOTW_REMOVAL detections at scale
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.