重要提示:本站仅作 Skill 资源导航与收录,正文以 GitHub 原仓库为准,版权归原项目所有。
以下为摘要预览,完整内容请查看 GitHub 原文。
Hunting for Persistence Mechanisms in Windows
When to Use
- During periodic proactive threat hunts for dormant backdoors
- After an incident to identify all persistence mechanisms an attacker planted
- When investigating unusual services, scheduled tasks, or startup entries
- When threat intel reports describe new persistence techniques in the wild
- During security posture assessments to identify unauthorized persistent software
Prerequisites
- Sysmon deployed with Event IDs 12/13/14 (Registry), 19/20/21 (WMI), 1 (Process Creation)
- Windows Security Event forwarding for 4697 (Service Install), 4698 (Scheduled Task)
- EDR with registry and file monitoring capabilities
- PowerShell script block logging enabled (Event ID 4104)
- Autoruns or equivalent baseline of legitimate persistent entries
Workflow
- Enumerate Known Persistence Locations: Build a comprehensive list of Windows persistence points (Run keys, services, scheduled tasks, WMI, startup folder, DLL search order, COM hijacks, AppInit DLLs, Image File Execution Options).
- Collect Endpoint Data: Use EDR, Sysmon, or Velociraptor to collect current persistence artifacts from endpoints across the env…
以下为摘要预览,完整内容请查看 GitHub 原文。
Hunting for Persistence Mechanisms in Windows
何时使用
- 在周期性的主动威胁狩猎中搜寻休眠的后门
- 在事件发生后,识别攻击者植入的所有持久化机制
- 在调查异常的服务、计划任务或启动项时
- 当威胁情报报告描述了在野出现的新型持久化技术时
- 在进行安全态势评估时,识别未授权的持久化软件
前置条件
- 已部署 Sysmon,并启用事件 ID 12/13/14(注册表)、19/20/21(WMI)、1(进程创建)
- Windows 安全事件转发,覆盖 4697(服务安装)、4698(计划任务)
- 具有注册表和文件监控能力的 EDR
- 已启用 PowerShell 脚本块日志记录(事件 ID 4104)
- 拥有 Autoruns 或等效的合法持久化项基线
工作流
- 枚举已知的持久化位置:构建一份全面的 Windows 持久化点列表(Run 键、服务、计划任务、WMI、启动文件夹、DLL 搜索顺序、COM 劫持、AppInit DLL、映像劫持选项)。
- 收集端点数据:使用 EDR、Sysmon 或 Velociraptor 从环境中的端点收集当前的持久化痕迹。
- 基线化合法持久化项:将收集到的数据与已知良好的基线进行比对(Autoruns 快照、通过 GPO 部署的项、SCCM 配置)。
- 识别异常:标记持久化位置中偏离基线的新增、未签名或未知项。
- 调查可疑项:针对每个异常,检查其所指向的二进制文件、数字签名、文件哈希和创建时间戳。
- 与进程活动关联:将持久化项与进程执行、网络活动和用户登录事件进行关联。
- 记录与修复:记录发现,移除恶意持久化机制,并更新检测规则。
关键概念
| 概念 | 描述 |
|---|
| T1547.001 | 注册表 Run 键 / 启动文件夹 |
| T1543.003 | Windows 服务(创建或修改) |
| T1053.005 | 计划任务 |
| T1546.003 | WMI 事件订阅 |
| T1546.015 | 组件对象模型(COM)劫持 |
| T1546.012 | 映像劫持选项注入 |
| T1546.010 | AppInit DLL |
| T1547.004 | Winlogon Helper DLL |
| T1547.005 | 安全支持提供程序 |
| T1574.001 | DLL 搜索顺序劫持 |
| TA0003 | 持久化战术 |
| Autoruns | 用于显示持久化项的 Sysinternals 工具 |
工具与系统
| 工具 | 用途 |
|-…