Life-Is-Nothing/threat-hunting-playbooks

GitHub: Life-Is-Nothing/threat-hunting-playbooks

一套面向蓝队 SOC 分析师的开源威胁狩猎 playbook,提供涵盖多种攻击场景的检测规则、调查步骤与响应操作指南。

Stars: 0 | Forks: 0

# 🎯 威胁狩猎 Playbooks ![Category](https://img.shields.io/badge/Category-Blue_Team-0078D6?style=flat-square) ![SIEM](https://img.shields.io/badge/SIEM-Wazuh%20%7C%20Splunk%20%7C%20ELK-005571?style=flat-square) ![Author](https://img.shields.io/badge/Author-ibramoha2-CC0000?style=flat-square) ## 📚 可用 Playbooks | # | 威胁 | 状态 | |---|--------|--------| | 01 | [SSH 暴力破解](#01---brute-force-ssh) | ✅ 可用 | | 02 | [Linux 提权](#02---privilege-escalation-linux) | ✅ 可用 | | 03 | [横向移动](#03---lateral-movement) | ✅ 可用 | | 04 | [可疑 Cron Jobs](#04---suspicious-cron-jobs) | ✅ 可用 | | 05 | [Web Shell 检测](#05---web-shell-detection) | 🔄 进行中 | ## 01 - SSH 暴力破解 ### 🔍 检测 ``` # Wazuh rule ID: 5710, 5711 # Splunk 查询: index=linux sourcetype=auth failed AND "sshd" | stats count by src_ip | where count > 10 ``` ### 📋 调查 1. 识别源 IP 2. 检查该 IP 是否在已知威胁列表中 (AbuseIPDB, VirusTotal) 3. 分析尝试的时间规律 4. 检查在失败尝试后是否有成功连接 ### 🚨 响应 ``` # 使用 UFW 阻止 IP sudo ufw deny from # 或使用 iptables sudo iptables -A INPUT -s -j DROP # 检查活动连接 who last -n 20 ``` ## 02 - Linux 提权 ### 🔍 检测 ``` # 需监控的可疑命令 sudo -l # Enumération sudo find / -perm /4000 # Recherche SUID cat /etc/passwd # Lecture sensible id && whoami # Vérification identité # Wazuh:监控规则 5400-5410 # 需监控的 Log:/var/log/auth.log grep "sudo:" /var/log/auth.log | grep -v "session opened" ``` ### 📋 调查 1. 识别执行该命令的用户 2. 检查 bash 历史记录 (`~/.bash_history`) 3. 如果安装了 `auditd`,分析其日志 4. 检查最近修改的 cron 任务 ### 🚨 响应 ``` # 检查活动会话 w who -a # 终止可疑会话 pkill -KILL -u # 锁定账户 sudo passwd -l ``` ## 03 - 横向移动 ### 🔍 检测 ``` # 异常内部 SSH 连接 grep "Accepted" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -rn # 可疑文件传输 (SCP/SFTP) grep "sftp\|scp" /var/log/auth.log # 内部 hosts 之间的新连接 netstat -tnp | grep ESTABLISHED ``` ### 📋 调查 1. 绘制内部网络连接映射图 2. 识别用于移动的账户 3. 检查传输的文件 4. 分析事件时间线 ## 04 - 可疑 Cron Jobs ### 🔍 检测 ``` # 列出所有 crons crontab -l cat /etc/crontab ls -la /etc/cron.* cat /var/spool/cron/crontabs/* # 最近创建/修改的 crons find /etc/cron* /var/spool/cron -newer /etc/passwd -ls 2>/dev/null ``` ### 📋 调查 1. 识别被可疑 cron 调用的脚本 2. 分析脚本内容 3. 检查文件权限 4. 与已知基线进行对比 ## 🛠️ 推荐工具 ``` Wazuh — SIEM & HIDS open source TheHive — Case management pour incident response MISP — Threat intelligence platform Velociraptor — Endpoint visibility & forensics CyberChef — Analyse et décodage de données ``` ## 📖 资源 - [MITRE ATT&CK 框架](https://attack.mitre.org) - [Sigma 规则](https://github.com/SigmaHQ/sigma) - [Wazuh 文档](https://documentation.wazuh.com) **作者:** [@ibramoha2](https://github.com/ibramoha2) | 网络安全学生 — 尼日尔 🇳🇪
标签:Burp Suite 替代, PE 加载器, SOC分析, Web报告查看器, 库, 应急响应, 检测规则, 网络资产发现