Digital Certificates
Adversaries may buy and/or steal SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are designed to instill trust. They include information about the key, information about its owner's identity, and the digital signature of an entity that has verified the certificate's contents are correct. Adversaries may purchase or steal SSL/TLS certificates to further their operations, such as encrypting C2 traffic or enabling Adversary-in-the-Middle attacks if the certificate is trusted or added to the root of trust. Free certificate authorities (e.g., Let's Encrypt) enable adversaries to acquire certificates at no cost. Compromised certificate authority infrastructure (e.g., DigiNotar) allows issuance of fraudulent certificates for any domain. After obtaining a digital certificate, an adversary may install it on infrastructure under their control to legitimize malicious communications.
// Detection: Unauthorized certificate installation in Windows certificate trust stores
// Monitors registry paths for additions to Trusted Root CA and Intermediate CA stores
// by unexpected processes outside of known software deployment tooling
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any (
"SOFTWARE\\Microsoft\\SystemCertificates\\Root\\Certificates",
"SOFTWARE\\Microsoft\\SystemCertificates\\CA\\Certificates",
"SOFTWARE\\Policies\\Microsoft\\SystemCertificates\\Root\\Certificates",
"SOFTWARE\\Policies\\Microsoft\\SystemCertificates\\CA"
)
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| where InitiatingProcessFileName !in~ (
"svchost.exe", "lsass.exe", "wuauclt.exe", "TrustedInstaller.exe",
"MicrosoftEdgeUpdate.exe", "MsMpEng.exe", "SgrmBroker.exe"
)
| extend CertStoreType = case(
RegistryKey has "Root\\", "Trusted Root CA",
RegistryKey has "CA\\", "Intermediate CA",
"Other"
)
| extend CertThumbprint = tostring(split(RegistryKey, "\\")[-1])
| project
Timestamp,
DeviceName,
AccountName,
ActionType,
CertStoreType,
CertThumbprint,
RegistryKey,
InitiatingProcessFileName,
InitiatingProcessCommandLine,
InitiatingProcessParentFileName
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Enterprise software deployments pushing corporate root CA certificates via SCCM, Intune, or GPO — msiexec.exe or specific application installers will modify certificate stores during installation
- Browser auto-updates (Chrome, Edge, Firefox) that maintain bundled root certificate programs and refresh them via their update processes
- VPN client software and SSL inspection proxy agents (Zscaler, Netskope, Blue Coat) installing their TLS inspection root certificates during agent deployment
- Security products (EDR agents, DLP tools) that install their own root CAs for local HTTPS inspection during initial endpoint enrollment
References (9)
- https://attack.mitre.org/techniques/T1588/004/
- https://threatpost.com/final-report-diginotar-hack-shows-total-compromise-ca-servers-103112/77170/
- https://www.splunk.com/en_us/blog/security/tall-tales-of-hunting-with-tls-ssl-certificates.html
- https://letsencrypt.org/docs/faq/
- https://crt.sh
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
- https://learn.microsoft.com/en-us/powershell/module/pki/import-certificate
- https://www.recordedfuture.com/research/cobalt-strike-servers
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4104
Unlock Pro Content
Get the full detection package for T1588.004 including response playbook, investigation guide, and atomic red team tests.