Exploit mitigations are usually split between three groups who rarely talk: developers who set compiler flags, platform teams who set runtime mitigations, and administrators who harden application configuration. MITRE D3FEND brings all three under Application Hardening (D3-AH), a technique in the Harden tactic with nine descendant techniques, from stack canaries and address randomisation to control flow integrity and disabling remote access. This guide treats D3-AH as a single programme: what the family covers, who owns each child, how to sequence and verify them, and where they fail. It is written for application security engineers, build and platform owners, and security architects. Each child technique has its own deep guide on this site, linked below; this page does not repeat them. For the mitigations themselves see the Exploit Mitigations Guide, and for D3FEND see the MITRE D3FEND Guide.
Key takeaways
- Application Hardening targets a class of exploits, not a single bug. D3FEND defines it as making an executable more resilient to exploits that introduce new code or execute unwanted existing code, applied at compile time or on a binary.
- The nine children fall into three owner groups. Build-time memory protections, runtime platform mitigations, and application configuration hardening each need a named owner and their own evidence.
- Most memory protections are cheap and on by default somewhere. The work is confirming every binary you ship and run actually carries them, including third-party and legacy builds.
- Verify the binary, not the build script. Flags can be dropped by one linked library or one legacy project, so check the output files.
- The ATT&CK links are inferred. D3FEND labels its offensive mappings for D3-AH "inferred, experimental", so use them to plan tests, not to claim coverage.
What D3FEND means by Application Hardening
In the D3FEND ontology, Application Hardening (D3-AH) enables the Harden tactic. Its definition reads: "Application Hardening makes an executable application more resilient to a class of exploits which either introduce new code or execute unwanted existing code. These techniques may be applied at compile-time or on an application binary." The D3FEND site gives "Process Hardening" as a synonym. The parent carries no digital artefact relations of its own; the children name what they act on, such as process segments, stack frames, pointers, the call stack and shadow stack, and the application's configuration.
The family overlaps with two neighbours. Source code changes that remove whole bug classes sit under Source Code Hardening, and operating system wide settings sit under Platform Hardening. D3-AH is the layer in between: the protections attached to a specific application binary and its configuration.
The child techniques
The table lists every descendant of D3-AH in the D3FEND ontology, with D3FEND's purpose paraphrased and typical delivery examples. Delivery examples are illustrative, not recommendations.
| D3FEND technique | Purpose (from D3FEND) | Typical delivery | Owner group |
|---|---|---|---|
| Stack Frame Canary Validation (D3-SFCV) | Compare a stack frame value with a known good value to detect overwrites | GCC and Clang -fstack-protector-strong, MSVC /GS | Build |
| Process Segment Execution Prevention (D3-PSEP) | Prevent execution from memory other than the code segment | DEP and NX, non-executable stack linker settings | Build and platform |
| Segment Address Offset Randomization (D3-SAOR) | Randomise segment base addresses at process start | ASLR with position-independent executables, /DYNAMICBASE | Build and platform |
| Control Flow Integrity (D3-CFI) | Enforce legal control flow transfers during execution | Control Flow Guard, Clang CFI, -fcf-protection, hardware shadow stacks | Build and platform |
| Exception Handler Pointer Validation (D3-EHPV) | Validate that an exception handler pointer is a real handler | SafeSEH, SEHOP on Windows | Build and platform |
| Pointer Authentication (D3-PAN) | Check a cryptographic value derived from a pointer against the expected value | Arm pointer authentication, -mbranch-protection on AArch64 | Build and platform |
| Dead Code Elimination (D3-DCE) | Remove unreachable code from compiled output | Compiler optimisation, linker garbage collection of unused sections | Build |
| Application Configuration Hardening (D3-ACH) | Modify an application's configuration to reduce its attack surface | Vendor hardening guides, CIS Benchmarks, configuration as code | Application administrators |
| Disable Remote Access (D3-DRA), child of D3-ACH | Limit access not required through or from networks the organisation does not control | Turning off unused remote administration features and listeners | Application administrators |
Choosing, combining and sequencing
The children are complementary rather than alternatives: each defeats a different step of a memory corruption exploit, and configuration hardening shrinks the surface that exploits reach. The second table shows how they combine.
| Exploit step | Children that interfere | Practical note |
|---|---|---|
| Reach vulnerable code | D3-ACH, D3-DRA, D3-DCE | Features and listeners that are off cannot be attacked |
| Corrupt a return address or handler | D3-SFCV, D3-EHPV | Canaries and handler validation detect common overwrite patterns |
| Locate code and data | D3-SAOR | Only effective when every module is randomised; one fixed module gives attackers a known address |
| Run injected code | D3-PSEP | Pushes attackers towards reusing existing code |
| Reuse existing code | D3-CFI, D3-PAN | Constrains indirect calls and returns; granularity varies by implementation |
Decision guidance
- Software you build: make the memory protection flags part of the default build profile rather than a per-project choice. GCC documents a single -fhardened option that enables a set of hardening flags, including -D_FORTIFY_SOURCE=3 where glibc supports it; MSVC enables several protections through linker and compiler defaults. Record exceptions per project.
- Software you buy: you cannot change its build, so verify the binaries carry the protections, apply runtime enforcement where the platform allows, and own D3-ACH and D3-DRA through configuration.
- Legacy and 32-bit software: expect gaps. On Windows, Mandatory ASLR can force relocation of images that did not opt in, though Microsoft notes this rebasing has no entropy on its own and should be paired with Bottom-up ASLR.
- Just-in-time compilers: runtimes that generate code at run time conflict with strict execution prevention such as Arbitrary Code Guard; Microsoft's reference states ACG is incompatible with JIT compilers unless the JIT runs out of process.
- Small organisations: focus on D3-ACH and D3-DRA for internet-facing products, and confirm vendor binaries carry DEP and ASLR.
- Software vendors and large engineering organisations: enforce flags in CI, publish binary hardening status for shipped products, and move toward memory-safe languages for new components. See the Memory-Safe Languages Guide.
Implementation roadmap
- Inventory binaries and owners. List the applications you build and the third-party applications you run on exposed or privileged systems, with an owner for each of the three groups.
- Scan binary hardening status. For PE files, check the DLL characteristics (dynamic base, NX compatible, guard CF) with tools such as dumpbin; for ELF files, check for PIE, non-executable stack, RELRO and stack protector symbols with readelf or similar. This gives the baseline for D3-SFCV, D3-PSEP, D3-SAOR and D3-CFI.
- Set the build profile. Add the agreed compiler and linker flags to shared build templates, and add a CI gate that fails builds missing them. Allow per-project exceptions only with a recorded reason and expiry.
- Apply runtime mitigations in audit mode. Windows exploit protection offers audit mode for several mitigations, including Arbitrary Code Guard and hardware-enforced stack protection, but not for Control Flow Guard, Mandatory ASLR, Bottom-up ASLR or SEHOP, so pilot those on test systems instead.
- Harden configuration. Apply the vendor or CIS hardening baseline for each exposed application, turn off unused remote administration, and store the configuration as code so drift is visible.
- Roll out in rings with rollback. Pilot, then a business unit, then the estate. For build flags, rollback is reverting the build profile; for runtime mitigations, removing the per-application setting; for configuration, restoring the previous version from source control.
- Test. Re-scan binaries after every release, and in a test environment confirm that mitigation violations are logged.
ATT&CK techniques D3FEND relates to D3-AH
D3FEND relates offensive and defensive techniques through shared digital artefacts and labels its offensive list for D3-AH "inferred, experimental". The parent page names the techniques below. Where D3FEND still lists a retired Impair Defenses sub-technique, the ATT&CK v20 successor is shown.
| ATT&CK technique | Tactic (v20) | Where D3-AH meets it |
|---|---|---|
| T1190 Exploit Public-Facing Application | Initial Access | Memory protections and configuration hardening on exposed services |
| T1189 Drive-by Compromise | Initial Access | Browser and plug-in exploit mitigations |
| T1203 Exploitation for Client Execution | Execution | Document reader and office application mitigations |
| T1068 Exploitation for Privilege Escalation | Privilege Escalation | Mitigations on privileged services and drivers |
| T1210 Exploitation of Remote Services | Lateral Movement | D3-DRA and memory protections on network services |
| T1212 Exploitation for Credential Access | Credential Access | Mitigations on authentication components |
| T1211 Exploitation for Stealth | Stealth | Mitigations on security tooling itself |
| T1620 Reflective Code Loading, T1055.012 Process Hollowing, T1218.013 Mavinject | Stealth | Execution prevention and code integrity constraints |
| T1056.004 Credential API Hooking | Collection, Credential Access | Pointer and control flow integrity |
| T1114.003 Email Forwarding Rule, T1564.008 Email Hiding Rules | Collection, Stealth | Mail application configuration hardening |
| T1685.001 Disable or Modify Windows Event Log, T1690 Prevent Command History Logging | Defense Impairment | Configuration hardening of logging settings (v20 successors of retired entries) |
The last column is NHI Mgmt Group's reading, not a D3FEND field. See the T1190 Exploit Public-Facing Application Defensive Guide, MITRE ATT&CK T1203 Exploitation for Client Execution and T1068 Exploitation for Privilege Escalation guides.
Detection and measurement
Hardening is mostly preventive, but violations leave evidence. A process killed by a stack protector failure, a Control Flow Guard violation, or an Arbitrary Code Guard block (calls fail with STATUS_DYNAMIC_CODE_BLOCKED, per Microsoft) on an exposed service is worth an alert: it may be a bug, or an exploit attempt that the mitigation stopped. Windows exploit protection audit and block events, crash telemetry with mitigation-related exception codes, and Linux kernel messages for terminated processes are the main sources.
Metrics we suggest at NHI Mgmt Group (targets are examples, not standards):
- Binary coverage: percentage of shipped and deployed binaries carrying the agreed memory protections, by application.
- Build gate coverage: percentage of build pipelines that fail on missing hardening flags.
- Exception debt: number of open hardening exceptions and their median age.
- Configuration conformance: percentage of exposed applications matching their hardening baseline.
- Remote access exposure: number of application remote administration interfaces reachable from networks you do not control.
Framework mapping
| Framework | Reference | Link to D3-AH |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SI-16 Memory Protection, SA-15 Development Process, Standards, and Tools, CM-6 Configuration Settings, CM-7 Least Functionality | Memory protections, build standards and configuration hardening |
| NIST CSF 2.0 | PR.PS-01, PR.PS-06 | Configuration management; secure software development |
| MITRE ATT&CK mitigations | M1050 Exploit Protection | ATT&CK's mitigation view of runtime exploit protections |
See M1050 Exploit Protection and the Compiler and Toolchain Hardening Guide.
Common failure patterns
- Checking the build script, not the binary. A single legacy library or project built without the flags leaves a predictable module in an otherwise randomised process.
- Exceptions that never expire. A mitigation disabled for one compatibility problem stays off for years after the problem is fixed.
- Third-party binaries assumed hardened. Bought software is rarely scanned; ask vendors for hardening status and verify it.
- Memory protections without configuration hardening. A well-built binary with an exposed default admin interface is still reachable by simpler routes.
- Treating mitigations as fixes. Mitigations raise exploit cost; they do not replace patching the underlying vulnerability.
- Treating inferred mappings as coverage. A D3FEND link is a test idea, not evidence.
Practitioner checklist
- Name an owner for build-time protections, runtime mitigations and application configuration.
- Scan every built and deployed binary for DEP, ASLR, stack protection and control flow protection.
- Put hardening flags in shared build templates and gate CI on them.
- Record every exception with a reason, owner and expiry.
- Pilot runtime mitigations in audit mode where available, and on test systems where not.
- Apply a hardening baseline to every exposed application and disable unused remote administration.
- Alert on mitigation violations from exposed services.
- Re-scan binaries on every release and report coverage quarterly.
Standards and references
- MITRE D3FEND: Application Hardening
- MITRE D3FEND: Control Flow Integrity
- MITRE D3FEND: Application Configuration Hardening
- Microsoft Learn: Exploit protection reference
- GCC: Program Instrumentation Options
- NIST: SP 800-53 Rev. 5
- NIST: Cybersecurity Framework 2.0
- MITRE ATT&CK: Exploit Protection
Related NHI Mgmt Group resources: MITRE D3FEND Guide · Exploit Mitigations Guide · Compiler and Toolchain Hardening Guide · C and C++ Secure Coding Guide · Defence Evasion Techniques Guide