T1588.003 Splunk · SPL

Detect Code Signing Certificates in Splunk

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/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=7
| where Signed="true"
| where SignatureStatus!="Valid"
| eval CertAnomalyType=case(
    SignatureStatus="Revoked", "Revoked Certificate — HIGH PRIORITY",
    SignatureStatus="Expired", "Expired Certificate",
    SignatureStatus="Invalid", "Invalid Signature",
    SignatureStatus="NotFound", "Signature Not Found",
    true(), "Unknown Certificate Issue"
  )
| eval SuspiciousPath=if(
    match(ImageLoaded, "(?i)(\\\\AppData\\\\|\\\\Temp\\\\|\\\\Downloads\\\\|\\\\Users\\\\Public\\\\|\\\\ProgramData\\\\)"),
    1, 0
  )
| eval NotSystemPath=if(
    NOT match(ImageLoaded, "(?i)(\\\\Windows\\\\System32|\\\\Windows\\\\SysWOW64|\\\\Program Files|\\\\Program Files \\(x86\\))"),
    1, 0
  )
| eval KnownPublisher=if(
    match(Signature, "(?i)(Microsoft|Google|Adobe|Oracle|Intel|NVIDIA|Cisco|VMware|Apple|Amazon)"),
    1, 0
  )
| eval RiskScore=SuspiciousPath + NotSystemPath + if(SignatureStatus="Revoked", 3, 0) + if(KnownPublisher=0, 1, 0)
| where RiskScore >= 1
| table _time, host, User, Image, ImageLoaded, Signature, SignatureStatus,
        CertAnomalyType, SuspiciousPath, NotSystemPath, KnownPublisher, RiskScore
| sort - RiskScore, - _time
high severity medium confidence

Detects loading of DLLs and executables with invalid, expired, or revoked code signing certificates using Sysmon Event ID 7 (Image Loaded). The SignatureStatus field reveals certificate validity issues. A composite RiskScore weights revoked certificates most heavily (+3), suspicious user-writable paths (+1 each), and non-system paths (+1), enabling analysts to prioritize the most actionable alerts. Revoked certificate detections warrant immediate escalation as they represent definitive adversary use of known-bad signing material.

Data Sources

Module: Module LoadSysmon Event ID 7 (Image Loaded)

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Enterprise applications signed with internal PKI certificates not globally trusted — Signature field will show internal CA names
  • Third-party software with expired code signing certificates still deployed and functional in the environment
  • Antivirus and endpoint security products loading drivers with unusual signing chains during startup
  • Development machines where test-signed or debug-built binaries load frequently
  • Software immediately after a CA revocation event where legitimate vendor binaries become temporarily flagged before re-signing and redeployment
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Unlock Pro Content

Get the full detection package for T1588.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections