Join our Newsletter — 33% off our NHI Course
Home› Guides› M1045 Code Signing: Code Signing as a Mapped…
Guide SOC & Detection Engineering

M1045 Code Signing: Code Signing as a Mapped ATT&CK Control

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 12 November 2026 11 min read
On this page

Code signing only stops attacks where something actually refuses to run unsigned or wrongly signed code, and M1045 Code Signing in MITRE ATT&CK is about that enforcement, not about owning certificates. ATT&CK v20 describes M1045 as using digital signatures to verify the authenticity and integrity of executables, scripts and other code, with enforced policy for unsigned code, vendor-signed driver enforcement, certificate revocation, third-party verification and signing in CI/CD pipelines. This guide maps the mitigation to the 22 active techniques ATT&CK links it to, shows which enforcement point covers each, explains the gaps, and treats the signing keys themselves as non-human identity credentials. It is for platform, endpoint and DevSecOps engineers and detection teams.

Key takeaways

  • Signing without enforcement is not M1045. Every ATT&CK mapping depends on a verifier: PowerShell execution policy, driver signing, App Control, container admission, ESXi or network device image checks.
  • The mapping spans five tactics. Execution, Persistence, Privilege Escalation, Stealth and Defense Impairment techniques are all in scope, from T1059.001 PowerShell to T1505.006 vSphere Installation Bundles.
  • Some verifiers are defence in depth only. Microsoft states that PowerShell execution policy is not a security boundary, so enforcement for T1059.001 needs application control as well.
  • Stolen keys turn the control against you. Malware signed with leaked certificates passes signature checks, so key protection and revocation planning are part of the mitigation.
  • Signing keys are non-human identities. They need an owner, an inventory, hardware protection, scoped access for pipelines and a tested compromise playbook.

What M1045 asks a team to implement

ATT&CK v20 measureEnforcement pointExample setting or feature
Enforce signed code executionOperating system application controlApp Control for Business (WDAC) signer rules, AppLocker publisher rules, Secure Boot on Linux
Vendor-signed driver enforcementKernel-mode code signingWindows 10 1607 and later will not load new kernel drivers not signed through the Windows Hardware Dev Center portal (with documented exceptions)
Certificate revocation managementRevocation checkingOCSP and CRLs; explicit deny rules for compromised signers in application control
Third-party software verificationSoftware intakeSignature and publisher verification before packaging and deployment
Script integrity in CI/CDBuild and release pipelineSign artefacts in the pipeline and verify before production release

For the signing process itself (certificate types, timestamping, HSMs, signing services) see the Code Signing Security Guide; this page stays on the ATT&CK mapping.

Techniques M1045 mitigates in ATT&CK v20

ATT&CK v20 has 22 active techniques and sub-techniques with a "mitigates" relationship from M1045. They are grouped below by tactic, with the substance of ATT&CK's usage text and the verifier that does the work.

TacticTechniqueATT&CK guidanceVerifier
ExecutionT1059 Command and Scripting InterpreterWhere possible, only permit execution of signed scriptsScript host policy plus application control
ExecutionT1059.001 PowerShellSet execution policy to run only signed scriptsPowerShell execution policy (AllSigned), App Control
ExecutionT1059.002 AppleScriptRequire AppleScript to be signed by a trusted developer ID, subjecting it to GatekeepermacOS Gatekeeper
ExecutionT1204.003 Malicious ImageUse a trust model such as Docker Content Trust to verify integrity and publisher of image tagsRegistry and runtime image verification
Stealth, ExecutionT1127.002 ClickOnceEnforce digital signature verification to prevent untrusted code runningAuthenticode, application control
PersistenceT1525 Implant Internal ImageUse cloud provider content trust models that require images signed by trusted sourcesRegistry and admission policy
PersistenceT1554 Compromise Host Software BinaryEnsure application binaries are signed by the correct developersApplication control, integrity checks
PersistenceT1505 Server Software Component, T1505.001 SQL Stored Procedures, T1505.002 Transport AgentEnsure application component binaries are signed by the correct developersServer application control
PersistenceT1505.004 IIS ComponentsEnsure IIS DLLs and binaries are signed by the correct developersApp Control on web servers
PersistenceT1505.006 vSphere Installation BundlesEnable execInstalledOnly so unsigned binaries cannot run on ESXi hostsESXi host setting
Persistence, Privilege EscalationT1543 Create or Modify System Process, T1543.003 Windows ServiceEnforce registration and execution of only legitimately signed service driversKernel-mode code signing, App Control
Persistence, Privilege EscalationT1546.013 PowerShell ProfileRun only signed PowerShell scripts and sign profiles so changes are detectableExecution policy, App Control
Persistence, Privilege EscalationT1546.006 LC_LOAD_DYLIB AdditionEnforce that binaries are signed by the correct Apple Developer IDsmacOS code signature validation
StealthT1036 Masquerading, T1036.001 Invalid Code SignatureRequire signed binariesApplication control signer rules
StealthT1036.005 Match Legitimate Resource Name or LocationRequire signed binaries and imagesSigner rather than path based rules
Defense ImpairmentT1601 Modify System Image, T1601.001 Patch System Image, T1601.002 Downgrade System ImageUse vendor digitally signed operating system images to prevent or detect image tamperingNetwork device image verification

Linked technique guides: T1059 Command and Scripting Interpreter Defensive Guide, T1036 Masquerading Defensive Guide, T1505 Server Software Component Defensive Guide, T1543 Create or Modify System Process Defensive Guide, MITRE ATT&CK T1525 Implant Internal Image and T1204 User Execution.

Enforcement points in detail

Windows scripts and binaries

  • PowerShell execution policy: AllSigned requires all scripts and configuration files to be signed by a trusted publisher; RemoteSigned requires signatures only for scripts downloaded from the internet. Microsoft describes execution policy as defence in depth rather than a security boundary, because users can bypass it, for example by pasting script contents. Set it through Group Policy so local changes are overridden, and rely on App Control for real enforcement. See App Control for Business (WDAC).
  • Signer rules over path rules: for T1036.005, path-based allow rules trust anything placed in the right folder; signer-based rules require the expected publisher.

Drivers and services

Microsoft's kernel-mode code signing policy says that from Windows 10 version 1607 new kernel-mode drivers must be signed through the Windows Hardware Dev Center portal, with exceptions for cross-signed drivers when Secure Boot is off, the PC was upgraded from an earlier release, or the driver was signed with an end-entity certificate issued before 29 July 2015. Those exceptions are why signature enforcement alone does not stop vulnerable or stolen-certificate drivers; pair it with a driver blocklist and the controls in the Bring Your Own Vulnerable Driver and EDR Killers Guide.

Containers and images

ATT&CK cites Docker Content Trust for T1204.003 and T1525. Docker's documentation now carries a notice that Docker Content Trust is being retired and that the Notary v1 service at notary.docker.io will shut down on 8 December 2026 (checked 12 November 2026). Teams relying on it should move to an alternative signature and admission approach, such as Sigstore-based signing with verification at admission. See the Sigstore Guide and SLSA and Build Provenance Guide.

Hypervisors and network devices

  • ESXi (T1505.006): ATT&CK recommends enabling the execInstalledOnly feature, which prevents unsigned binaries from running on ESXi hosts.
  • Network operating systems (T1601): use the vendor's signed image verification features at upgrade and at boot, and alert on verification failures.

Where identity fits: signing keys as non-human credentials

A code signing private key is a credential that lets its holder speak as the organisation to every verifier that trusts it. The NVIDIA code signing certificate theft in 2022 shows the failure mode: two expired certificates and their private keys were leaked, malware signed with them appeared within days, and Windows still accepted them for driver signing because of the pre-2015 certificate exception. M1045 enforcement worked as designed and still let the malware through. NHI Mgmt Group recommends:

  • Keep keys non-exportable: HSM or managed signing service, never files on build hosts or shares.
  • Give pipelines scoped signing rights: only approved release jobs, authenticated with workload identity rather than long-lived secrets, can request a signature.
  • Log and review every signing event against releases; an unmatched signature is an incident.
  • Plan revocation in advance: separate certificates per product line and timestamp signatures so one key can be revoked without breaking past releases. See the Compromised Code Signing Certificate Playbook.

More cases are collected in Signing keys and certificates in breaches.

Gaps: what M1045 does not stop

GapWhyPair with
Malware signed with stolen or fraudulently issued certificatesSignature is valid; T1553.002 Code Signing describes this abuseKey protection, revocation, explicit deny rules for known bad signers, reputation
Signed but abused tools and driversLegitimate signed binaries can be misused or vulnerableDriver blocklists, behaviour prevention (M1040), execution prevention (M1038)
Interactive or in-memory script contentExecution policy is bypassable and not a security boundaryConstrained language mode via App Control, script block logging
Compromised build pipelineThe real key signs the attacker's artefactBuild provenance, isolated signing, two-person release approval
Revocation that is not checkedOffline verifiers and some driver paths do not consult revocationApplication control deny rules distributed by policy

See MITRE ATT&CK T1553 Subvert Trust Controls for the attacker side of these gaps.

Implementation priorities

The order and timings below are NHI Mgmt Group recommendations.

  1. Inventory verifiers: list every place a signature is or could be checked (endpoints, servers, ESXi, container platforms, network devices) and whether it is enforcing, auditing or off.
  2. Quick wins: enable execInstalledOnly on ESXi, signed image verification on network devices, and AllSigned or RemoteSigned via Group Policy for PowerShell.
  3. Application control in audit: deploy signer-based App Control or AppLocker policies in audit mode on pilot rings, review blocks for two to four weeks, then enforce on servers that run few applications (web, SQL, Exchange-style transport roles) first.
  4. Container admission: require signed images from approved builders at admission; replace Docker Content Trust where it is in use.
  5. Protect the keys: move signing keys into HSM or a managed signing service, restrict callers to pipeline identities, and test the compromise playbook.
  6. Rollback: keep the last known good policy versioned, use supplemental or exception policies with owners and expiry dates, and never disable enforcement estate-wide to fix one application.

Detection and measurement

  • Policy blocks and audits: CodeIntegrity and AppLocker event logs for blocked or would-be-blocked unsigned files.
  • Signer anomalies: files signed by certificates known to be compromised, or by your own certificate outside a release.
  • Policy tampering: changes to execution policy GPOs, App Control policies, ESXi execInstalledOnly or admission controller configuration.
MetricTarget (NHI Mgmt Group judgement)
Servers with signer-based application control enforcedAll tier 0 and internet-facing servers
ESXi hosts with execInstalledOnly enabled100%
Production images admitted with a verified signature100%
Signing keys held in HSM or managed signing service100%
Signing events without a matching release recordZero
Time to deploy a deny rule for a compromised signerUnder 24 hours
FrameworkItemRelationship
MITRE D3FENDD3-DLIC Driver Load Integrity CheckingRelated to M1045 in the D3FEND ontology: verify drivers before load
MITRE D3FENDD3-EAL Executable AllowlistingRelated to M1045 in the D3FEND ontology: signer-based allowlists
MITRE D3FENDD3-SBV Service Binary VerificationRelated to M1045 in the D3FEND ontology: verify service binaries
MITRE ATT&CKM1038 Execution Prevention, M1044 Restrict Library LoadingRelated mitigations that consume signatures as policy input

Common failure patterns

  • Signing everything, enforcing nothing: releases are signed but no endpoint, cluster or host rejects unsigned code.
  • Trusting execution policy as a control: RemoteSigned is treated as script control even though Microsoft describes it as defence in depth only.
  • Publisher rules that are too broad: trusting a whole vendor certificate also trusts that vendor's signed but abusable utilities.
  • Keys on build hosts: exportable keys on runners or shares turn a CI compromise into signed malware, as the NVIDIA case shows.
  • No revocation path: one certificate signs every product, so revoking it after a leak would break legitimate software.
  • Retired trust services left in place: verification depends on a service that is being shut down.

Practitioner checklist

  • List every signature verifier and its mode (enforce, audit, off).
  • Enable execInstalledOnly on all ESXi hosts.
  • Set PowerShell execution policy by Group Policy and back it with App Control.
  • Deploy signer-based application control on servers, audit first.
  • Require signed images at Kubernetes or registry admission; plan the move off Docker Content Trust.
  • Store signing keys in HSM or a managed signing service with pipeline-only access.
  • Reconcile signing logs against releases weekly.
  • Pre-build deny rules and a playbook for a compromised signing certificate.

Standards and references

Related NHI Mgmt Group resources: Code Signing Security Guide · Compromised Code Signing Certificate Playbook · App Control for Business (WDAC) · M1043 Credential Access Protection · M1044 Restrict Library Loading

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 12 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org