implementing-memory-protection-with-dep-aslr

实施内存保护机制,包括 DEP(数据执行防护)、ASLR(地址空间布局随机化)、 CFG(控制流防护)和其他漏洞利用缓解措施,以防御内存损坏攻击。适用于加固端点 以抵御缓冲区溢出利用、ROP 链和代码注入的场景。适用于涉及内存保护、漏洞利用缓解、 DEP、ASLR 或 CFG 配置的请求。

9 stars

Best use case

implementing-memory-protection-with-dep-aslr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

实施内存保护机制,包括 DEP(数据执行防护)、ASLR(地址空间布局随机化)、 CFG(控制流防护)和其他漏洞利用缓解措施,以防御内存损坏攻击。适用于加固端点 以抵御缓冲区溢出利用、ROP 链和代码注入的场景。适用于涉及内存保护、漏洞利用缓解、 DEP、ASLR 或 CFG 配置的请求。

Teams using implementing-memory-protection-with-dep-aslr should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/implementing-memory-protection-with-dep-aslr/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/implementing-memory-protection-with-dep-aslr/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/implementing-memory-protection-with-dep-aslr/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How implementing-memory-protection-with-dep-aslr Compares

Feature / Agentimplementing-memory-protection-with-dep-aslrStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

实施内存保护机制,包括 DEP(数据执行防护)、ASLR(地址空间布局随机化)、 CFG(控制流防护)和其他漏洞利用缓解措施,以防御内存损坏攻击。适用于加固端点 以抵御缓冲区溢出利用、ROP 链和代码注入的场景。适用于涉及内存保护、漏洞利用缓解、 DEP、ASLR 或 CFG 配置的请求。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 使用 DEP 和 ASLR 实施内存保护

## 使用场景

在加固端点以抵御基于内存的漏洞利用时使用本技能,通过配置 DEP、ASLR、CFG 和 Windows Exploit Protection 实施系统级和应用程序级缓解措施。

## 操作流程

### 步骤 1:配置系统级缓解措施

```powershell
# 启用系统范围的 DEP(数据执行防护)
# 引导配置:OptIn(默认)、OptOut(推荐)、AlwaysOn
bcdedit /set nx AlwaysOn

# 验证 ASLR 状态(现代 Windows 默认启用)
Get-ProcessMitigation -System
# MandatoryASLR、BottomUpASLR、HighEntropyASLR 应为 ON

# 启用所有系统级缓解措施
Set-ProcessMitigation -System -Enable DEP,SEHOP,ForceRelocateImages,BottomUp,HighEntropy
```

### 步骤 2:配置应用程序级缓解措施

```powershell
# 加固高风险应用程序(浏览器、Office、PDF 阅读器)
Set-ProcessMitigation -Name "WINWORD.EXE" -Enable DEP,SEHOP,ForceRelocateImages,CFG,StrictHandle
Set-ProcessMitigation -Name "EXCEL.EXE" -Enable DEP,SEHOP,ForceRelocateImages,CFG,StrictHandle
Set-ProcessMitigation -Name "AcroRd32.exe" -Enable DEP,SEHOP,ForceRelocateImages,CFG
Set-ProcessMitigation -Name "chrome.exe" -Enable DEP,CFG,ForceRelocateImages
Set-ProcessMitigation -Name "msedge.exe" -Enable DEP,CFG,ForceRelocateImages

# 导出配置以供部署
Get-ProcessMitigation -RegistryConfigFilePath "C:\exploit_protection.xml"
# 通过 Intune 或 GPO 部署
```

### 步骤 3:通过 Intune/GPO 部署

```
Intune:端点安全 → 攻击面减少 → Exploit Protection
  导入 exploit_protection.xml 模板

GPO:计算机配置 → 管理模板 → Windows 组件
  → Windows Defender Exploit Guard → Exploit Protection
  → "使用通用的 Exploit Protection 设置" → 已启用
  → 指向网络共享上的 XML 文件
```

## 关键概念

| 术语 | 定义 |
|------|------|
| **DEP** | 将内存页面标记为不可执行,防止在数据区域执行 shellcode |
| **ASLR** | 随机化已加载模块的内存地址,以挫败硬编码的 ROP 小工具 |
| **CFG** | 在运行时验证间接调用目标,防止控制流劫持 |
| **SEHOP** | 验证 SEH 链完整性,防止基于 SEH 的漏洞利用 |

## 工具与系统
- **Windows Exploit Protection**:内置的逐进程缓解管理
- **EMET(旧版)**:增强缓解体验工具包(前身,现已弃用)
- **ProcessMitigations PowerShell**:Get/Set-ProcessMitigation cmdlet

## 常见误区
- **DEP 兼容性**:旧版 32 位应用程序在 DEP AlwaysOn 下可能崩溃。对例外情况使用 OptOut。
- **强制 ASLR 破坏应用程序**:某些应用程序不兼容 ASLR。在强制执行 ForceRelocateImages 前进行测试。
- **CFG 仅限编译时支持**:CFG 仅适用于使用 /guard:cf 编译的应用程序,无法追溯应用。

Related Skills

performing-memory-forensics-with-volatility3

9
from killvxk/cybersecurity-skills-zh

使用 Volatility 3 分析易失性内存转储,以提取运行中的进程、网络连接、加载的模块以及恶意活动的证据。

performing-memory-forensics-with-volatility3-plugins

9
from killvxk/cybersecurity-skills-zh

使用 Volatility3 插件分析内存转储,检测 Windows、Linux 和 macOS 内存镜像中的注入代码、Rootkit、凭据窃取和恶意软件痕迹。

implementing-zero-trust-with-hashicorp-boundary

9
from killvxk/cybersecurity-skills-zh

使用 HashiCorp Boundary 实现具备动态凭据代理、会话录制和 Vault 集成的身份感知零信任基础设施访问管理。

implementing-zero-trust-with-beyondcorp

9
from killvxk/cybersecurity-skills-zh

使用身份感知代理(IAP,Identity-Aware Proxy)、上下文感知访问策略、设备信任验证和 Access Context Manager,部署 Google BeyondCorp Enterprise 零信任访问控制,对 GCP 资源和内部应用强制执行基于身份和安全态势的访问。

implementing-zero-trust-network-access

9
from killvxk/cybersecurity-skills-zh

通过配置身份感知代理、微分段、基于条件访问策略的持续验证,以及在 AWS、Azure 和 GCP 环境中以 BeyondCorp 风格的架构替代传统 VPN 访问,在云环境中实施零信任网络访问(ZTNA)。

implementing-zero-trust-network-access-with-zscaler

9
from killvxk/cybersecurity-skills-zh

使用 Zscaler 实施零信任网络访问(Zero Trust Network Access,ZTNA),通过 Zscaler Private Access(ZPA)配置应用分段、访问策略和连接器,替代传统 VPN 架构

implementing-zero-trust-in-cloud

9
from killvxk/cybersecurity-skills-zh

本技能指导组织按照 NIST SP 800-207 和 Google BeyondCorp 原则在云环境中实施零信任(Zero Trust)架构,涵盖以身份为中心的访问控制、微分段(Micro-Segmentation)、持续验证、设备信任评估,以及部署身份感知代理(Identity-Aware Proxy)以消除 AWS、Azure 和 GCP 环境中的隐式网络信任。

implementing-zero-trust-for-saas-applications

9
from killvxk/cybersecurity-skills-zh

使用 CASB、SSPM、条件访问策略、OAuth 应用治理和会话控制,为 SaaS 应用实施零信任访问控制, 对云托管服务强制执行身份验证、设备合规性检查和数据保护。

implementing-zero-trust-dns-with-nextdns

9
from killvxk/cybersecurity-skills-zh

将 NextDNS 实施为零信任 DNS 过滤层,提供加密解析、威胁情报阻断、隐私保护,以及跨所有端点的组织策略执行。

implementing-zero-standing-privilege-with-cyberark

9
from killvxk/cybersecurity-skills-zh

部署 CyberArk Secure Cloud Access,通过基于时间、权限和审批控制的即时访问,在混合云和多云环境中消除常设权限。

implementing-zero-knowledge-proof-for-authentication

9
from killvxk/cybersecurity-skills-zh

零知识证明(ZKP)允许证明者在不泄露秘密本身的情况下证明对某个秘密(如密码或私钥)的了解。本技能实现 Schnorr 身份识别协议和使用离散对数问题的简化 ZKPP,使服务器永远不需要获取用户密码即可完成认证。

implementing-web-application-logging-with-modsecurity

9
from killvxk/cybersecurity-skills-zh

配置带有 OWASP 核心规则集(CRS)的 ModSecurity WAF,实现 Web 应用程序日志记录, 调整规则以减少误报,分析审计日志进行攻击检测,并为应用程序特定威胁实现自定义 SecRules。 分析师配置 SecRuleEngine、SecAuditEngine 和 CRS 偏执级别,以在安全覆盖范围和运营稳定性之间取得平衡。 适用于涉及 WAF 配置、ModSecurity 规则调整、Web 应用审计日志或 CRS 部署的场景。