Configures Windows advanced audit policies, event logging sizes, command-line process auditing, and event forwarding for threat detection and SIEM integration. Useful for endpoint security monitoring of logins, processes, and privileges.
npx claudepluginhub killvxk/cybersecurity-skills-zhThis skill uses the workspace's default tool permissions.
在以下情况下使用本技能:
Configures Windows advanced audit policies via GPO and PowerShell for high-fidelity security events in threat detection, including logon, process creation with command lines, and privilege use for SIEM.
Configures Windows advanced audit policies via GPO and PowerShell for security events like logon, process creation with command line, and privilege use to support SIEM threat detection.
Extracts, parses, and analyzes Windows event logs (EVTX) using Chainsaw, Hayabusa, and EvtxECmd to detect lateral movement, persistence, and privilege escalation in forensics.
Share bugs, ideas, or general feedback.
在以下情况下使用本技能:
不适用于 Sysmon 配置(独立技能)或 Linux 审计日志。
计算机配置 → Windows 设置 → 安全设置
→ 高级审计策略配置 → 审计策略
推荐设置:
账户登录:
- 审计凭据验证:成功、失败
- 审计 Kerberos 认证:成功、失败
账户管理:
- 审计安全组管理:成功
- 审计用户账户管理:成功、失败
登录/注销:
- 审计登录:成功、失败
- 审计注销:成功
- 审计特殊登录:成功
- 审计其他登录/注销事件:成功、失败
对象访问:
- 审计文件共享:成功、失败
- 审计可移动存储:成功、失败
- 审计 SAM:成功
策略更改:
- 审计审计策略更改:成功、失败
- 审计身份验证策略更改:成功
权限使用:
- 审计敏感权限使用:成功、失败
详细跟踪:
- 审计进程创建:成功
- 审计 DPAPI 活动:成功、失败
# 注册表:在事件 4688 中启用命令行日志记录
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit" `
-Name ProcessCreationIncludeCmdLine_Enabled -Value 1 -PropertyType DWORD -Force
# GPO:计算机配置 → 管理模板 → 系统 → 审计进程创建
# "在进程创建事件中包含命令行" → 已启用
# 将安全日志增加到 1 GB(默认 20 MB 不够用)
wevtutil sl Security /ms:1073741824
# 增加 PowerShell Operational 日志
wevtutil sl "Microsoft-Windows-PowerShell/Operational" /ms:536870912
# 设置日志保留策略为按需覆盖
wevtutil sl Security /rt:false
# 通过 GPO 配置:
# 计算机配置 → 管理模板 → Windows 组件
# → 事件日志服务 → 安全
# 最大日志文件大小(KB):1048576
# 在收集器服务器上:
wecutil qc /q
# 为高价值事件创建订阅:
# 事件 ID:4624(登录)、4625(登录失败)、4688(进程创建)、
# 4672(特殊权限)、4720(创建用户)、4728(组成员变更)、
# 7045(安装服务)、1102(日志清除)
# 在源端点上(GPO):
# 配置 WinRM:winrm quickconfig
# 配置事件转发:计算机配置 → 管理模板
# → Windows 组件 → 事件转发
# 配置目标订阅管理器:Server=http://collector:5985/wsman/SubscriptionManager/WEC
认证事件:
4624 - 登录成功(类型 2=交互式, 3=网络, 10=远程交互式)
4625 - 登录失败
4648 - 使用显式凭据登录(RunAs、哈希传递指示器)
4672 - 分配特殊权限(管理员登录)
4776 - NTLM 凭据验证
进程事件:
4688 - 进程创建(启用后含命令行)
4689 - 进程终止
账户事件:
4720 - 创建用户账户
4722 - 启用用户账户
4724 - 尝试重置密码
4728 - 成员添加到安全组
4732 - 成员添加到本地组
4756 - 成员添加到通用组
服务/系统事件:
7045 - 安装新服务(持久化指示器)
1102 - 清除审计日志(证据篡改)
4697 - 在系统中安装服务
横向移动指示器:
4648 + 4624(类型 3) - 基于凭据的横向移动
5140 - 访问网络共享
5145 - 网络共享访问检查(详细文件共享)
| 术语 | 定义 |
|---|---|
| 高级审计策略 | 细粒度审计子类别(58 个子类别,对比基本的 9 个类别) |
| 事件 ID 4688 | 进程创建事件;对跟踪端点上的执行行为至关重要 |
| WEF | Windows 事件转发(Windows Event Forwarding),无需第三方代理即可集中收集日志 |
| 登录类型 | 表示认证方式的数字代码(2=交互式, 3=网络, 10=RDP) |