implementing-memory-protection-with-dep-aslr

Configures DEP, ASLR, CFG, and SEHOP exploit mitigations on Windows endpoints via PowerShell and GPO.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-memory-protection-with-dep-aslr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-memory-protection-with-dep-aslr
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/endpoint-security/implementing-memory-protection-with-dep-aslr
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-memory-protection-with-dep-aslr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Endpoints left with default memory protection settings (such as DEP OptIn or per-application ASLR opt-outs) remain vulnerable to buffer overflows, ROP chains, and code injection, and administrators lack a verified workflow to enforce and confirm mitigations.

Core Features & Use Cases

  • System-Level Mitigation Configuration: Enables DEP AlwaysOn, BottomUp ASLR, HighEntropyASLR, and SEHOP using bcdedit and Set-ProcessMitigation.
  • Per-Application Hardening: Applies exploit mitigations to high-risk targets like browsers, Office, and PDF readers, with XML export for deployment.
  • Enterprise Deployment & Verification: Distributes settings via Intune or Group Policy and verifies applied mitigations with Get-ProcessMitigation.
  • Use Case: A security engineer hardens a Windows 11 fleet against memory corruption exploits by enforcing system-wide DEP and ASLR, hardening WINWORD.EXE and chrome.exe, exporting the configuration XML, and deploying it through Intune.

Quick Start

Harden this Windows endpoint by enabling system-wide DEP, ASLR, and SEHOP, then apply exploit mitigations to Microsoft Office and browsers and verify the results.

Frequently Asked Questions about implementing-memory-protection-with-dep-aslr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable DEP and ASLR on Windows system-wide?

Enable DEP with bcdedit /set nx AlwaysOn, then run Set-ProcessMitigation -System -Enable DEP,SEHOP,ForceRelocateImages,BottomUp,HighEntropy to enforce ASLR and related mitigations. Verify the result with Get-ProcessMitigation -System.

How to apply exploit protection settings to specific applications?

Use Set-ProcessMitigation -Name "app.exe" -Enable with flags like DEP, SEHOP, ForceRelocateImages, CFG, and StrictHandle. Export the configuration with Get-ProcessMitigation -RegistryConfigFilePath to create an XML for deployment.

Does CFG protect all applications on Windows?

CFG only protects binaries compiled with the /guard:cf flag and cannot be retrofitted to legacy DLLs. Get-ProcessMitigation may show CFG as ON while the loaded module lacks CFG metadata, leaving it unprotected.

Why do applications crash after enabling mandatory ASLR or DEP AlwaysOn?

Legacy 32-bit applications may be incompatible with DEP AlwaysOn, and some apps are not ASLR-compatible, causing crashes under ForceRelocateImages. Use DEP OptOut with documented exceptions and test compatibility before enforcing mandatory ASLR.

How do I deploy exploit protection settings across an enterprise?

Export settings to an XML file and deploy via Intune under Endpoint Security > Attack Surface Reduction > Exploit Protection, or via GPO under Windows Defender Exploit Guard pointing to the XML on a network share.