T1036.001 Elastic Security · Elastic

Detect Invalid Code Signature in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by process.entity_id
  [library where process.code_signature.status != "trusted" and
   process.code_signature.exists == true and
   process.code_signature.status in ("error", "expired", "revoked", "untrusted") and
   process.code_signature.subject_name != null and
   process.code_signature.subject_name != ""
  ]
  [process where event.type == "start" and
   process.code_signature.exists == true and
   process.code_signature.status != "trusted" and
   process.code_signature.status in ("error", "expired", "revoked", "untrusted") and
   not process.name in ("MicrosoftEdgeUpdate.exe", "MsiExec.exe")
  ]
high severity high confidence

Detects processes and loaded libraries with invalid, expired, revoked, or untrusted code signatures. Mirrors the KQL join between file certificate info and process events, flagging signed-but-invalid binaries that may be impersonating legitimate software.

Data Sources

Elastic EndpointElastic Agent (endpoint integration)Sysmon via Beats

Required Tables

logs-endpoint.events.library-*logs-endpoint.events.process-*

False Positives & Tuning

  • Expired signing certificates on legacy internal tooling or build artifacts not yet re-signed after certificate renewal
  • Self-signed development binaries deployed to production endpoints during CI/CD pipeline testing
  • Third-party vendor software with revoked certificates that have not yet been updated or patched by the vendor
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