T1588.003

Code Signing Certificates

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.

Microsoft Sentinel / Defender
kusto
// Detect execution of signed binaries with suspicious certificate characteristics
// Requires Microsoft Defender for Endpoint with DeviceFileCertificateInfo telemetry
let KnownTrustedPublishers = dynamic([
    "Microsoft Corporation", "Microsoft Windows", "Google LLC", "Adobe Inc.",
    "Oracle America", "Mozilla Corporation", "Cisco Systems", "VMware, Inc.",
    "Intel Corporation", "NVIDIA Corporation", "Apple Inc.", "Amazon.com"
]);
let SuspiciousFolders = dynamic([
    "\\AppData\\", "\\Temp\\", "\\Downloads\\", "\\Users\\Public\\",
    "\\ProgramData\\", "\\Roaming\\", "\\Local\\Temp\\"
]);
// Identify signed files with certificate trust issues
let SuspiciousCerts = DeviceFileCertificateInfo
| where Timestamp > ago(24h)
| where IsSigned == true
| where IsTrusted == false
      or (CertificateExpirationTime < now() and CertificateExpirationTime > datetime(2000-01-01))
| project SHA1, Issuer, Subject, CertificateExpirationTime,
         IsTrusted, SignatureType, CertificateSerialNumber, CrlDistributionPointUrl;
// Join with process executions from user-writable suspicious paths
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName endswith ".exe" or FileName endswith ".dll"
| where FolderPath has_any (SuspiciousFolders)
| where InitiatingProcessFileName !in~ ("MsMpEng.exe", "SenseCnfgr.exe", "SenseIR.exe")
| join kind=inner SuspiciousCerts on SHA1
| extend CertExpired = CertificateExpirationTime < now()
| extend CertUntrusted = IsTrusted == false
| extend KnownPublisher = Subject has_any (KnownTrustedPublishers)
| extend RiskIndicators = toint(CertExpired) + toint(CertUntrusted) + toint(not(KnownPublisher))
| where RiskIndicators >= 1
| project Timestamp, DeviceName, AccountName, FileName, FolderPath,
         ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine,
         Issuer, Subject, CertificateExpirationTime, CertExpired, CertUntrusted,
         SignatureType, CertificateSerialNumber, RiskIndicators
| sort by RiskIndicators desc, Timestamp desc
high severity medium confidence

Data Sources

File: File Metadata Process: Process Creation Microsoft Defender for Endpoint — DeviceFileCertificateInfo

Required Tables

DeviceFileCertificateInfo DeviceProcessEvents

False Positives

  • Legitimate enterprise applications signed with internal PKI certificates not in the global trusted root CA store — these will appear as IsTrusted=false
  • Software vendors whose code signing certificates have recently expired but the binaries remain deployed across the enterprise
  • Open-source software distributed with certificates from lesser-known certificate authorities that are not pre-trusted by Windows
  • Security testing and penetration testing tools legitimately signed by small vendors or individual researchers
  • Development and staging environments where test-signed or debug-built binaries execute frequently from non-standard paths
  • Software after CA revocation events (e.g., DigiCert mass revocations) where legitimate vendor certificates become temporarily invalid before re-signing and redeployment

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