Builds structured SOC playbook for ransomware incident response, including SIEM detection queries for Splunk/Elastic, EDR isolation via CrowdStrike/Defender, decision trees, and NIST/MITRE-compliant phases. For SOC teams standardizing processes.
npx claudepluginhub killvxk/cybersecurity-skills-zhThis skill uses the workspace's default tool permissions.
以下情况使用本技能:
Builds structured SOC incident response playbook for ransomware covering detection with SIEM queries, containment, eradication, recovery phases aligned to NIST SP 800-61 and MITRE ATT&CK. For SOC teams standardizing procedures.
Builds SOC incident response playbook for ransomware covering detection with SIEM queries, containment, eradication, and recovery phases aligned to NIST SP 800-61 and MITRE ATT&CK. For standardizing SOC procedures.
Guides structured ransomware incident response from detection and containment to forensics, decryption assessment, recovery, and hardening. Covers negotiations, backups, regulations. For ransomware attacks.
Share bugs, ideas, or general feedback.
以下情况使用本技能:
不适用于将本手册作为活跃勒索软件事件的唯一响应指南——在事件发生前必须提前测试和演练预构建的手册。
创建针对早期勒索软件指标的 SIEM 检测规则:
批量文件加密检测(Splunk):
index=sysmon EventCode=11
| bin _time span=1m
| stats dc(TargetFilename) AS unique_files, values(TargetFilename) AS sample_files by Computer, Image, _time
| where unique_files > 100
| eval suspicious_extensions = if(match(mvjoin(sample_files, ","), "\.(encrypted|locked|crypt|enc|ransom)"), "YES", "NO")
| where suspicious_extensions="YES" OR unique_files > 500
| sort - unique_files
卷影副本删除(T1490):
index=wineventlog sourcetype="WinEventLog:Security" OR index=sysmon EventCode=1
(CommandLine="*vssadmin*delete*shadows*" OR CommandLine="*wmic*shadowcopy*delete*"
OR CommandLine="*bcdedit*/set*recoveryenabled*no*" OR CommandLine="*wbadmin*delete*catalog*")
| table _time, Computer, User, ParentImage, Image, CommandLine
勒索软件说明文件创建:
index=sysmon EventCode=11
TargetFilename IN ("*README*.txt", "*DECRYPT*.txt", "*RANSOM*.txt", "*RECOVER*.html", "*HOW_TO*.txt")
| stats count by Computer, Image, TargetFilename
| where count > 5
Elastic Security EQL 变体:
sequence by host.name with maxspan=2m
[process where event.type == "start" and
process.args : ("*vssadmin*", "*delete*", "*shadows*")]
[file where event.type == "creation" and
file.name : ("*README*DECRYPT*", "*RANSOM*", "*HOW_TO_RECOVER*")]
勒索软件告警分诊
│
├── 加密是否正在进行?
│ ├── 是 → 立即:从网络隔离主机(步骤 3)
│ │ 不要关机(保留内存用于取证)
│ └── 否 → 这是加密前的指标吗?
│ ├── 卷影副本删除 → 高优先级:隔离并调查
│ ├── 已知勒索软件哈希 → 高优先级:封锁哈希,全企业扫描
│ └── 可疑进程行为 → 中优先级:调查,准备隔离
│
├── 受影响主机数量?
│ ├── 单台主机 → 已控制事件,执行主机隔离流程
│ ├── 多台主机(2-10 台)→ 升级至二级,启动全企业扫描
│ └── 全企业(>10 台)→ 启动完整 IR 团队,联系外部顾问
│
└── 数据外泄是否已确认?
├── 是 → 双重勒索场景,联系法务进行泄露通知
└── 否/未知 → 检查 Cobalt Strike/C2 信标,审查出站传输
通过 EDR 进行网络隔离(CrowdStrike Falcon):
# 使用 CrowdStrike Falcon API 隔离主机
curl -X POST "https://api.crowdstrike.com/devices/entities/devices-actions/v2?action_name=contain" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"ids": ["device_id_here"]}'
通过 Microsoft Defender for Endpoint 进行网络隔离:
# 通过 MDE API 隔离机器
$headers = @{Authorization = "Bearer $token"}
$body = @{Comment = "Ransomware containment - IR-2024-0500"; IsolationType = "Full"} | ConvertTo-Json
Invoke-RestMethod -Uri "https://api.securitycenter.microsoft.com/api/machines/$machineId/isolate" `
-Method Post -Headers $headers -Body $body -ContentType "application/json"
防火墙紧急规则:
# Palo Alto — 阻止 SMB 横向扩散
set rulebase security rules RansomwareContainment from Trust to Trust
set rulebase security rules RansomwareContainment application ms-ds-smb
set rulebase security rules RansomwareContainment action deny
set rulebase security rules RansomwareContainment disabled no
commit
Active Directory 紧急操作:
# 禁用被攻陷账号
Disable-ADAccount -Identity "compromised_user"
# 重置 Kerberos TGT(如果域管理员被攻陷)
# 警告:这将重置 krbtgt,需要间隔 12 小时以上重置两次
Reset-KrbtgtKeys -Server "DC-PRIMARY" -Force
# 通过禁用远程服务阻止横向移动
Set-Service -Name "RemoteRegistry" -StartupType Disabled -Status Stopped
在修复之前采集取证证据:
# 捕获运行中的进程和网络连接
Get-Process | Export-Csv "C:\IR\processes_$(hostname).csv"
Get-NetTCPConnection | Export-Csv "C:\IR\netstat_$(hostname).csv"
# 捕获内存转储(如果主机仍在运行)
winpmem_mini_x64.exe C:\IR\memory_$(hostname).raw
# 采集勒索软件证据
Copy-Item "C:\Users\*\Desktop\*README*" "C:\IR\ransom_notes\" -Recurse
Copy-Item "C:\Users\*\Desktop\*.encrypted" "C:\IR\encrypted_samples\" -Force
# 捕获事件日志
wevtutil epl Security "C:\IR\Security_$(hostname).evtx"
wevtutil epl System "C:\IR\System_$(hostname).evtx"
wevtutil epl "Microsoft-Windows-Sysmon/Operational" "C:\IR\Sysmon_$(hostname).evtx"
识别勒索软件变体:
在 Splunk 中进行全企业 IOC 扫描:
index=sysmon (EventCode=1 OR EventCode=11 OR EventCode=3)
(TargetFilename="*ransomware_binary_name*" OR sha256="KNOWN_HASH"
OR DestinationIp="C2_IP_ADDRESS" OR CommandLine="*malicious_command*")
| stats count by Computer, EventCode, Image, CommandLine
| sort - count
从备份恢复:
以经验教训结构化手册结论:
事后复盘模板
1. 事件时间线(从检测到完全恢复)
2. 初始入侵向量识别
3. 驻留时间分析(从初始入侵到加密的时间)
4. 已识别的检测差距
5. 响应效率指标(MTTD、MTTC、MTTR)
6. 建议的手册改进措施
7. 已部署的新检测规则
8. 备份和恢复流程更新
| 术语 | 定义 |
|---|---|
| 双重勒索(Double Extortion) | 将数据加密与数据窃取相结合的勒索软件策略,威胁若不支付赎金则公开数据 |
| 驻留时间(Dwell Time) | 从初始入侵到检测之间的时长——勒索软件运营者平均在加密前潜伏 5-9 天 |
| MTTC | 平均遏制时间——从检测到成功隔离受影响系统的时间 |
| 杀伤链(Kill Chain) | 勒索软件攻击进程:初始访问 -> 执行 -> 持久化 -> 权限提升 -> 横向移动 -> 数据收集 -> 外泄 -> 影响 |
| 不可变备份(Immutable Backup) | 在规定保留期内无法修改或删除的备份存储(WORM 存储) |
| RTO/RPO | 恢复时间目标/恢复点目标——最大可接受的停机时间和数据丢失阈值 |
勒索软件手册执行 — IR-2024-0500
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
阶段 1 - 检测:
告警: FILESERVER-03 检测到批量文件加密
变体: LockBit 3.0(通过 ID Ransomware 确认)
MTTD: 从首次加密到 SOC 告警 12 分钟
阶段 2 - 遏制:
[完成] FILESERVER-03 于 14:35 UTC 通过 CrowdStrike 完成隔离
[完成] 通过防火墙紧急规则全企业封锁 SMB
[完成] 被攻陷服务账号在 AD 中已禁用
MTTC: 23 分钟
阶段 3 - 根除:
[完成] 发现并隔离 3 台额外的 C2 信标主机
[完成] Cobalt Strike C2 域名(c2[.]evil[.]com)已被沉洞处理
[完成] 全企业 IOC 扫描完成——无其他感染
阶段 4 - 恢复:
[完成] FILESERVER-03 从黄金镜像重建
[完成] 从不可变 Veeam 备份恢复数据(RPO:4 小时)
[完成] 系统监控 72 小时——无再次感染
MTTR: 18 小时
受影响总数:1 台服务器,3 台工作站
数据丢失: 4 小时的文件修改(备份 RPO)
数据外泄: 未发现数据外泄证据