T1036.001 Splunk · SPL

Detect Invalid Code Signature in Splunk

Adversaries may attempt to mimic features of valid code signatures to increase the chance of deceiving a user, analyst, or tool. Code signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. Adversaries can copy the metadata and signature information from a signed program, then use it as a template for an unsigned program. Files with invalid code signatures will fail digital signature validation checks, but they may appear more legitimate to users and security tools may improperly handle these files. Unlike Code Signing (T1553.002), this activity will not result in a valid signature.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1036 Masquerading
Sub-technique
T1036.001 Invalid Code Signature
Canonical reference
https://attack.mitre.org/techniques/T1036/001/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=7
| where SignatureStatus!="Valid"
| where isnotnull(Signature) AND Signature!="?"
| eval SignedButInvalid=if(SignatureStatus IN ("Invalid", "Expired", "Revoked", "Untrusted"), 1, 0)
| where SignedButInvalid=1
| stats count as Executions, values(SignatureStatus) as SigStatus, dc(host) as Hosts by Image, Signature, Signed
| where Executions < 10
| sort - Executions
medium severity medium confidence

Detects loaded images (DLLs and executables) with invalid code signatures using Sysmon Event ID 7 (Image Loaded). Filters for signature states indicating tampering, expiry, or revocation. Low execution counts across few hosts suggest targeted malware rather than widespread legitimate software.

Data Sources

File: File MetadataModule: Module LoadSysmon Event ID 7

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Expired certificates on legitimate but outdated software that has not been updated
  • Self-signed certificates used by internal development or testing tools
  • Legitimate software with misconfigured or incomplete signing (common in some open-source tools)
Download portable Sigma rule (.yml)

Other platforms for T1036.001


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.

  1. Test 1Sign Binary with Invalid Self-Signed Certificate

    Expected signal: Sysmon Event ID 7: ImageLoaded with SignatureStatus=Untrusted and Signature containing 'Microsoft Corporation'. Process creation event for test_signed.exe.

  2. Test 2Copy Signature Metadata with SigThief

    Expected signal: Sysmon Event ID 1: Process creation for PowerShell examining signature metadata. File creation events for both binaries in temp directory.

  3. Test 3Execute Binary with Expired Certificate (Simulated)

    Expected signal: PowerShell ScriptBlock Logging Event ID 4104 showing certificate creation. Sysmon Event ID 1 for PowerShell process.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections