Detect Code Signing Certificates in CrowdStrike LogScale
Adversaries may buy and/or steal code signing certificates to sign malicious payloads, enabling their software to appear legitimate and bypass security controls that trust signed code. Code signing provides authenticity guarantees that cause users and security tools to trust signed executables more readily than unsigned binaries. Adversaries purchase certificates using front organizations or stolen identity information, or directly steal signing materials from compromised third parties. Real-world threat actors including Wizard Spider (DigiCert, GlobalSign certs), OilRig, BlackTech, MegaCortex (fake company certificates), and Kimsuky have all leveraged stolen or fraudulently-obtained code signing certificates. Detection pivots to observable artifacts when signed malicious code executes in the environment: certificate anomalies (revoked, expired, recently-issued, or from unusual certificate authorities), discrepancies between file metadata and certificate subjects, Windows Code Integrity enforcement events, and low-prevalence signed executables executing from user-writable paths.
MITRE ATT&CK
- Tactic
- Resource Development
- Technique
- T1588 Obtain Capabilities
- Sub-technique
- T1588.003 Code Signing Certificates
- Canonical reference
- https://attack.mitre.org/techniques/T1588/003/
LogScale Detection Query
#event_simpleName=ProcessRollup2
| ImageFileName = /(?i)(\\AppData\\|\\Temp\\|\\Downloads\\|\\Users\\Public\\|\\ProgramData\\)/
| ImageFileName != /(?i)(\\Windows\\System32|\\Windows\\SysWOW64|\\Program Files|\\Program Files \(x86\))/
| UserName != /^(SYSTEM|LOCAL SERVICE|NETWORK SERVICE)$/
| case {
SignInfoFlags = "4" | CertStatus := "REVOKED" ;
SignInfoFlags = "8" | CertStatus := "EXPIRED" ;
SignInfoFlags = "2" | CertStatus := "UNTRUSTED" ;
SignInfoFlags = "16" | CertStatus := "INVALID" ;
* | CertStatus := "UNKNOWN"
}
| CertStatus = /^(REVOKED|EXPIRED|UNTRUSTED|INVALID)$/
| SignerName != /(?i)(Microsoft|Google LLC|Adobe|Oracle|Intel|NVIDIA|Cisco|VMware|Apple|Amazon)/
| groupBy(
[ComputerName, UserName, ImageFileName, SHA256HashData, SignerName, CertStatus],
function=[
count(as=ExecutionCount),
min(@timestamp, as=FirstSeen),
max(@timestamp, as=LastSeen)
]
)
| sort(ExecutionCount, order=asc)
| head(500) CrowdStrike Falcon LogScale (NG-SIEM) query detecting ProcessRollup2 events from user-writable paths where SignInfoFlags indicates an anomalous code signing state (revoked, expired, untrusted, or invalid). Results are grouped by host+binary+signer combination and sorted ascending by execution count to surface rare, novel signed executables that warrant investigation. IMPORTANT: SignInfoFlags and SignerName field availability depends on Falcon sensor version (7.x+) and Windows telemetry policy configuration — confirm field population in your environment before relying on this query operationally.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate portable applications distributed as self-contained executables and run directly from user Downloads folders — particularly common for open-source utilities, SysInternals tools, and developer tooling — where SignInfoFlags may reflect a non-standard trust chain rather than actual malicious certificate abuse
- Corporate MDM or endpoint management systems (Intune, SCCM, Tanium) that provision signed software packages to ProgramData or AppData staging areas prior to installation completion, causing transient detections before binaries are relocated to standard Program Files paths
- Authorized red team or penetration testing tooling signed with legitimately-obtained or expired test certificates executed from temporary staging directories on endpoints during documented security assessments — coordinate with red team to suppress known tool hashes during engagements
Other platforms for T1588.003
Testing Methodology
Validate this detection against 5 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 1Create Self-Signed Code Signing Certificate and Sign Test Binary
Expected signal: Sysmon Event ID 11 (File Create): argus_signed_test.exe created in %TEMP%. Sysmon Event ID 1 (Process Create): powershell.exe spawning csc.exe (C# compiler) to build the test binary. Sysmon Event ID 13 (Registry Value Set): certificate written to HKCU\SOFTWARE\Microsoft\SystemCertificates\My\. DeviceFileEvents in MDE: file creation event for the test executable in user temp path.
- Test 2Inspect Authenticode Certificate Chain on Suspicious Executable
Expected signal: Sysmon Event ID 11 (File Create): argus_lolbin_test.exe in %TEMP%. Sysmon Event ID 1 (Process Create): certutil.exe with -verify -urlfetch flags and temp path argument. Sysmon Event ID 3 (Network Connection): certutil.exe making outbound HTTPS connections to Microsoft CRL distribution points (crl.microsoft.com, ocsp.msocsp.com) for revocation checking. DeviceProcessEvents: certutil.exe spawned from PowerShell/cmd.exe.
- Test 3Enumerate Code Signing Certificates Including Private Key Holders
Expected signal: Sysmon Event ID 1 (Process Create): PowerShell accessing multiple certificate stores. Sysmon Event ID 11 (File Create): codesign_enum.csv created in %TEMP%. DeviceRegistryEvents: reads to HKLM\SOFTWARE\Microsoft\SystemCertificates\{My,Root,CA,TrustedPublisher}. DeviceFileEvents in MDE: CSV output file creation in user temp directory.
- Test 4Validate Executable Signatures Using Sigcheck Sysinternals Tool
Expected signal: Sysmon Event ID 1 (Process Create): sigcheck.exe launching from %TEMP% with -a -h flags. Sysmon Event ID 3 (Network Connection): sigcheck.exe may attempt outbound connection to VirusTotal API if -vt flag is included. DeviceProcessEvents: sigcheck.exe spawned by PowerShell with the target path argument covering %TEMP% executables.
- Test 5Query Windows Code Integrity Logs for Historical Certificate Enforcement Events
Expected signal: Sysmon Event ID 1 (Process Create): PowerShell executing Get-WinEvent against the Code Integrity operational log. DeviceProcessEvents: PowerShell with Get-WinEvent in command line. If any Code Integrity events were previously logged on this system (e.g., from WDAC policy enforcement), they will be returned. In environments without WDAC policy configured, Event IDs 3033/3034 may not appear, but 3036 (certificate details) often does.
References (10)
- https://attack.mitre.org/techniques/T1588/003/
- https://en.wikipedia.org/wiki/Code_signing
- https://learn.microsoft.com/en-us/microsoft-365/security/defender/advanced-hunting-devicefilecertificateinfo-table
- https://learn.microsoft.com/en-us/sysinternals/downloads/sigcheck
- https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/event-id-explanations
- https://crt.sh/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1588.003/T1588.003.md
- https://www.mandiant.com/resources/blog/fin12-ransomware-intrusion-actor-pursuing-high-value-targets
- https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/palmerworm-espionage-apt-target-taiwan
- https://www.ibm.com/reports/threat-intelligence
Unlock Pro Content
Get the full detection package for T1588.003 including response playbook, investigation guide, and atomic red team tests.