Detect Install Root Certificate in IBM QRadar
Adversaries may install a root certificate on a compromised system to undermine TLS/SSL trust validation, enabling Adversary-in-the-Middle (AiTM) attacks against encrypted communications. By adding a malicious CA certificate to the system or user trust store, the adversary can intercept HTTPS traffic, sign malicious executables to bypass code signing checks, or spoof legitimate websites to harvest credentials without triggering browser security warnings. This technique has been observed in banking trojans (RTM, Hikit), macOS malware (Dok, Ay MaMi), and supply chain attacks (Superfish). On Windows, certutil.exe is the primary living-off-the-land tool for adding certificates to named stores (ROOT, CA, TrustedPublisher). On macOS, the security binary can add trusted root certificates to the System or login keychain. On Linux, certificates can be dropped into /usr/local/share/ca-certificates/ followed by update-ca-certificates.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1553 Subvert Trust Controls
- Sub-technique
- T1553.004 Install Root Certificate
- Canonical reference
- https://attack.mitre.org/techniques/T1553/004/
QRadar Detection Query
SELECT
DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
logsourcename(logsourceid) AS log_source,
sourceip,
username,
QIDNAME(qid) AS event_name,
"ImageFileName" AS process_image,
"CommandLine" AS command_line,
"ParentImage" AS parent_image,
CASE
WHEN LOWER("CommandLine") MATCHES '.*(?:-|/)addstore\s+(?:root|trustedroot|authroot).*' THEN 'High'
WHEN LOWER("CommandLine") MATCHES '.*(?:-|/)addstore\s+(?:trustedpublisher|trusted).*' THEN 'Medium'
ELSE 'Low'
END AS severity,
CASE
WHEN LOWER("CommandLine") MATCHES '.*(\\temp\\|\\appdata\\|\\downloads\\|\\programdata\\|users\\public).*' THEN 1
ELSE 0
END AS suspicious_path_flag
FROM events
WHERE
LOGSOURCETYPEID(logsourceid) IN (12, 376)
AND (
(
("ImageFileName" IMATCHES '%\\certutil.exe'
OR "ImageFileName" IMATCHES '%\\certutil')
AND ("CommandLine" IMATCHES '%-addstore%'
OR "CommandLine" IMATCHES '%/addstore%')
)
OR
(
("EventID" = 12 OR "EventID" = 13)
AND (
"TargetObject" IMATCHES '%\\SOFTWARE\\Microsoft\\SystemCertificates\\ROOT\\Certificates\\%'
OR "TargetObject" IMATCHES '%\\SOFTWARE\\Microsoft\\SystemCertificates\\AuthRoot\\Certificates\\%'
OR "TargetObject" IMATCHES '%\\SOFTWARE\\Microsoft\\SystemCertificates\\TrustedPublisher\\Certificates\\%'
OR "TargetObject" IMATCHES '%\\SOFTWARE\\Policies\\Microsoft\\SystemCertificates\\ROOT\\Certificates\\%'
)
AND "ImageFileName" NOT IMATCHES '%\\svchost.exe'
AND "ImageFileName" NOT IMATCHES '%\\TrustedInstaller.exe'
AND "ImageFileName" NOT IMATCHES '%\\MicrosoftEdgeUpdate.exe'
AND "ImageFileName" NOT IMATCHES '%\\chrome.exe'
AND "ImageFileName" NOT IMATCHES '%\\msedge.exe'
AND "ImageFileName" NOT IMATCHES '%\\firefox.exe'
)
)
AND devicetime > (CURRENT_TIMESTAMP - 86400000)
ORDER BY devicetime DESC
LAST 24 HOURS Detects T1553.004 Install Root Certificate in QRadar using Sysmon process creation (EventID 1) for certutil -addstore and Sysmon registry events (EventID 12/13) for writes to Windows certificate trust store paths. Assigns severity based on target store type and file path.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise certificate management systems (SCCM, Active Directory Certificate Services) that push CA certs to managed endpoints during provisioning
- Security software (antivirus, endpoint agents) that add their own signing certificates to TrustedPublisher to facilitate driver loading
- System administrators running certutil manually during workstation setup or certificate renewal workflows
Other platforms for T1553.004
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 1Install Malicious Root Certificate via certutil (Windows)
Expected signal: Sysmon Event ID 1: Process Create with Image=certutil.exe, CommandLine containing '-addstore -f ROOT' and the temp path '\Temp\df00tech-test-root.cer'. Sysmon Event ID 12/13: Registry key created under HKLM\SOFTWARE\Microsoft\SystemCertificates\ROOT\Certificates\<thumbprint> with Blob value containing the DER-encoded certificate. Security Event ID 4688 (if command line auditing enabled) with same certutil invocation.
- Test 2Install Root Certificate to User Store (Low-Privilege Variant)
Expected signal: Sysmon Event ID 1: certutil.exe with CommandLine containing '-user -addstore ROOT' and %APPDATA% path. Sysmon Event ID 13: Registry value set under HKCU\SOFTWARE\Microsoft\SystemCertificates\ROOT\Certificates\<thumbprint>. This variant writes to HKCU (user hive) rather than HKLM — ensure the registry detection covers both hive locations.
- Test 3Install Root Certificate on macOS via security Command
Expected signal: Endpoint Security Framework (ESF) / Unified Log: process execution of /usr/bin/security with arguments 'add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/df00tech-test-root.pem'. macOS Endpoint Detection (Jamf Protect, Crowdstrike Falcon for Mac): process create event with the security binary invocation. Keychain modification events in the Unified Log (log stream --predicate 'subsystem == "com.apple.securityd"').
- Test 4Install Root Certificate on Linux via update-ca-certificates
Expected signal: Auditd: syscall write/open to /usr/local/share/ca-certificates/ (rule: -w /usr/local/share/ca-certificates/ -p wa -k cert_store_modification). Syslog/auditd execve: update-ca-certificates process creation. File integrity monitoring (OSSEC, Wazuh, Falco): alert on new file creation in /usr/local/share/ca-certificates/ and modification of /etc/ssl/certs/ directory. Falco rule: spawning of update-ca-certificates by an unexpected parent process.
References (10)
- https://attack.mitre.org/techniques/T1553/004/
- https://en.wikipedia.org/wiki/Root_certificate
- https://www.tripwire.com/state-of-security/off-topic/appunblocker-bypassing-applocker/
- https://objective-see.com/blog/blog_0x26.html
- https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec
- https://www.kaspersky.com/blog/lenovo-pc-with-adware-superfish-preinstalled/7712/
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1553.004/T1553.004.md
- https://docs.microsoft.com/sysinternals/downloads/sigcheck
- https://support.apple.com/guide/keychain-access/add-certificates-to-a-keychain-kyca2540/mac
Unlock Pro Content
Get the full detection package for T1553.004 including response playbook, investigation guide, and atomic red team tests.