Detect Steal or Forge Authentication Certificates in CrowdStrike LogScale
This detection identifies adversary attempts to steal or forge authentication certificates from Windows certificate stores, Active Directory Certificate Services (AD CS) infrastructure, or via crypto APIs. Key behaviors include use of certutil.exe with export flags, Mimikatz crypto module commands (crypto::certificates, crypto::capi), known AD CS abuse tools (Certify, Certipy), suspicious certificate file creation (.pfx/.p12), anomalous certificate enrollment or template modification events (Security EventIDs 4886, 4887, 4899, 4900), and process access to certificate material in LSASS or DPAPI-protected storage. Successful certificate theft enables persistent authentication as valid accounts and lateral movement without requiring password knowledge.
MITRE ATT&CK
- Tactic
- Credential Access
- Canonical reference
- https://attack.mitre.org/techniques/T1649/
LogScale Detection Query
#event_simpleName = "ProcessRollup2"
| ImageFileName = /(?i)(powershell|cmd|wscript|cscript|mshta|rundll32)\.exe$/
| CommandLine = /(?i)(-enc(odedcommand)?|-bypass|-noprofile|invoke-expression|iex\s|http:\/\/)/
| case {
CommandLine = /(?i)-enc(odedcommand)?/ | DetectionType := "EncodedCommand" ;
CommandLine = /(?i)-bypass/ | DetectionType := "BypassExecution" ;
CommandLine = /(?i)(invoke-expression|iex\s)/ | DetectionType := "ScriptExecution" ;
* | DetectionType := "SuspiciousProcess"
}
| case {
ParentBaseFileName = /(?i)(w3wp|httpd|nginx|php-cgi)\.exe/ | RiskScore := "Critical" ;
CommandLine = /(?i)-enc/ | RiskScore := "High" ;
* | RiskScore := "Medium"
}
| table([ComputerName, UserName, ImageFileName, CommandLine, ParentBaseFileName, DetectionType, RiskScore, ProcessId, ParentProcessId])
| sort(RiskScore, order=desc, limit=100) CrowdStrike LogScale CQL detection for Steal or Forge Authentication Certificates (T1649). Queries Falcon telemetry for steal or forge authentication certificates behavioral indicators aligned with MITRE ATT&CK T1649.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate PKI administrators exporting certificates for backup or migration using certutil.exe with -exportPFX
- Web server or application administrators renewing SSL/TLS certificates and exporting as PFX for IIS or other services
- Enterprise MDM/endpoint management tools (Intune, SCCM) that programmatically request or renew device certificates via certreq.exe
Other platforms for T1649
Testing Methodology
Validate this detection against 3 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 1Export User Certificate from Windows Store via CertUtil
Expected signal: DeviceProcessEvents: certutil.exe with CommandLine containing '-exportPFX' and '-user'. DeviceFileEvents: FileCreated event for C:\Windows\Temp\stolen_cert.pfx. Sysmon EventID 1: certutil.exe process with full command line. Sysmon EventID 11: .pfx file creation in C:\Windows\Temp.
- Test 2Enumerate and Export Certificates via PowerShell CryptoAPI
Expected signal: DeviceProcessEvents: powershell.exe with command line containing X509Store, X509ContentType, and WriteAllBytes. Sysmon EventID 1: powershell.exe with certificate store access patterns. Sysmon EventID 11: atomic_cert_export.pfx file creation in C:\Windows\Temp. This test specifically validates coverage of non-certutil.exe certificate theft.
- Test 3Request Certificate via CertReq Against AD CS
Expected signal: DeviceProcessEvents: certreq.exe -new execution with INF path in CommandLine. Sysmon EventID 1: certreq.exe process creation with -new flag. Sysmon EventID 11: .csr file creation in C:\Windows\Temp. If submission step is run against a real CA: Windows Security Event 4886 on the CA server (certificate request received), followed by 4887 (issued) or 4888 (denied).
References (10)
- https://attack.mitre.org/techniques/T1649/
- https://specterops.io/assets/resources/Certified_Pre-Owned.pdf
- https://posts.specterops.io/certified-pre-owned-d95910965cd2
- https://github.com/GhostPack/Certify
- https://github.com/ly4k/Certipy
- https://github.com/TheWover/CertStealer
- https://learn.microsoft.com/en-us/windows-server/identity/ad-cs/active-directory-certificate-services-overview
- https://www.microsoft.com/en-us/security/blog/2022/08/24/azure-ad-certificate-based-authentication-cba-on-mobile-now-in-preview/
- https://o365blog.com/post/deviceidentity/
- https://adsecurity.org/?p=2053
Unlock Pro Content
Get the full detection package for T1649 including response playbook, investigation guide, and atomic red team tests.