Join our Newsletter — 33% off our NHI Course
Home› Glossary› Architecture & Implementation› Code Integrity Guard (CIG)
Architecture & Implementation

Code Integrity Guard (CIG)

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Architecture & Implementation

Code Integrity Guard (CIG) is a Windows process mitigation policy that restricts a process to loading only binaries signed by Microsoft, with optional allowance for Microsoft Store and WHQL-signed ones. It blocks loading of unsigned or attacker-supplied DLLs in protected processes. Defenders must test compatibility, since third-party modules not signed this way will fail to load.

What Code Integrity Guard Changes About Process Loading

Code Integrity Guard is not a general hardening label, it is a process-level loading rule. The key effect is that a protected process can only load code that meets the policy’s signature requirements, which narrows the DLL surface available to an attacker and changes how compatibility must be tested before deployment.

In practice, CIG matters because many Windows attacks depend on placing code inside a trusted process through DLL loading, reflective techniques, or other forms of injected execution. A process that rejects unsigned or untrusted modules forces those techniques to work around the policy instead of blending into normal module loading.

Why CIG Matters for Exploit Resistance

CIG is best understood as an exploit-mitigation control, not a prevention guarantee. It raises the cost of tampering with a process’s code path by limiting what can be mapped as loadable code, but it does not by itself make a process invulnerable to memory corruption, logic abuse, or already-trusted signed code being misused.

That is why CIG is most effective when it is used alongside other controls that reduce the attacker’s room to manoeuvre, such as code loading restrictions, process hardening, and memory-protection measures. NHIMG’s Exploit Mitigations Guide is useful context for the broader mitigation family CIG sits within.

For defenders, the practical value is often in blocking opportunistic injection into sensitive or protected processes where module trust is a meaningful boundary. That is especially relevant when the process handles elevated privileges, sensitive data, or security enforcement duties.

Compatibility, Rollout, and Operational Trade-Offs

CIG is a classic security-versus-compatibility control. If a vendor component, plug-in, or custom module is not signed in a way the policy accepts, the process may fail to start or lose functionality. That means rollout should be validated against the real software estate, not just a lab image.

Organisations usually need to inventory which processes are candidates for CIG, confirm whether the application depends on third-party extensions, and then test whether those dependencies can survive the stricter loading policy. App Control for Business (WDAC) is a relevant companion because code integrity policy decisions often align with broader application control planning.

When compatibility problems appear, the issue is often not that CIG is “breaking” the application, but that the application architecture assumes unrestricted module loading. In those cases, the right response is usually to redesign the trust boundary or adjust the protected-process scope, not to disable the control wholesale.

How CIG Connects to Detection and Adversary Tradecraft

CIG is also useful as a detection and response clue. If a workload or security tool depends on loading unapproved code into a protected process, the policy may surface that attempt as a failed load rather than silent execution. That gives defenders a chance to notice suspicious module behaviour before it becomes persistent access.

It is particularly relevant where attackers use reflective loading, process tampering, or similar in-memory techniques to avoid disk-based scrutiny. NHIMG’s MITRE ATT&CK T1620 Reflective Code Loading guide shows the kind of in-memory loading behaviour that CIG is designed to frustrate.

Defenders should therefore treat repeated module load failures, unexpected compatibility errors in protected processes, and policy-related telemetry as signals worth review. A second useful reference point is D3-PCSV Process Code Segment Verification, which helps frame how integrity checks can be used to validate what code is actually present at runtime.

Risk and Threat Considerations

CIG reduces one of the easier paths for process injection, but the risk does not disappear if the protected process already trusts a weak signing chain, loads too many approved modules, or can be coerced into starting with an unsafe configuration. The main danger is a false sense of safety: a narrow loading rule helps, but it does not replace memory protection, patching, or privilege reduction.

Failure mechanism: Attackers may pivot to signed-but-abusable code, exploit a separate vulnerability to reach the process before the policy matters, or target processes where compatibility pressure leads teams to weaken the control.

Impact: If CIG is misapplied or too broadly relaxed, the protected process can still become a foothold for code execution, tampering, credential access, or lateral movement inside a high-value Windows environment.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8, NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-2 — Inventory and Control of Software AssetsCIG depends on knowing which software and modules must load in protected processes.
Recommendation — Inventory protected-process software and verify allowed loaders before enforcing CIG.
NIST SP 800-53 Rev 5SI-7 — Software, Firmware, and Information IntegrityCIG enforces runtime code integrity by restricting which binaries may load.
CM-7 — Least FunctionalityCIG limits a process to the minimum accepted code set, reducing attack surface.
Recommendation — Apply SI-7 to enforce integrity checks on executable code loading. Use CM-7 to restrict processes to only the code they genuinely require.
OWASP ASVSV15 — Secure Coding and ArchitectureCIG is an architectural hardening measure that constrains execution paths.
Recommendation — Build and review process trust boundaries so only approved code paths can execute.
MITRE ATT&CKT1620 — Reflective Code LoadingCIG directly affects in-memory code loading techniques used by attackers.
Recommendation — Map blocked load attempts to T1620 and investigate suspicious in-memory execution.

Practitioner Guidance

What to watch for: Treat CIG as a targeted control for sensitive processes, not a blanket endpoint setting. The best candidates are processes where module trust is central to security and where the dependency set is known and controlled.

Before enabling it, confirm which binaries the process legitimately needs, test for third-party module dependencies, and document any exceptions that would force a different hardening path. Windows Endpoint Hardening Guide is a useful broader reference when CIG is being rolled into a wider Windows hardening programme.

Practitioner takeaway: Use CIG where code-loading trust is part of the security model, then validate compatibility early so the control stays enforceable instead of becoming a paper policy.

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
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org