abdul4rehman215/Incident-Response-and-Adversary-Emulation

GitHub: abdul4rehman215/Incident-Response-and-Adversary-Emulation

一套包含 20 个实操实验的 SOC 与 DFIR 安全工程项目,覆盖事件响应、数字取证、检测工程、攻防模拟与 SOAR 自动化的端到端流程。

Stars: 0 | Forks: 0

# 🛡 事件响应与对手模拟 – SOC 工程作品集 ### 一个完整的 20 个实验的安全工程实操系列,模拟真实的安全运营中心 (SOC) 环境 —— 涵盖数字取证与网络检测,乃至对手模拟及完整的事件生命周期执行。
![OS](https://img.shields.io/badge/OS-Ubuntu%2024.04-orange?style=for-the-badge&logo=ubuntu) ![Linux](https://img.shields.io/badge/Linux-Security-black?style=for-the-badge&logo=linux) ![Windows](https://img.shields.io/badge/Windows-Defense-0078D6?style=for-the-badge&logo=windows) ![Python](https://img.shields.io/badge/Python-3.x-3776AB?style=for-the-badge&logo=python) ![Bash](https://img.shields.io/badge/Bash-Scripting-4EAA25?style=for-the-badge&logo=gnu-bash) ![PowerShell](https://img.shields.io/badge/PowerShell-Core-5391FE?style=for-the-badge&logo=powershell) ![Docker](https://img.shields.io/badge/Docker-SOC%20Stack-2496ED?style=for-the-badge&logo=docker) ![Focus](https://img.shields.io/badge/Focus-SOC%20Operations-red?style=for-the-badge) ![BlueTeam](https://img.shields.io/badge/Defense-Blue%20Team-1f6feb?style=for-the-badge) ![DFIR](https://img.shields.io/badge/DFIR-Digital%20Forensics-purple?style=for-the-badge) ![SIEM](https://img.shields.io/badge/SIEM-Wazuh-005571?style=for-the-badge) ![Zeek](https://img.shields.io/badge/Network-Zeek-black?style=for-the-badge) ![Suricata](https://img.shields.io/badge/IDS-Suricata-EF3B2D?style=for-the-badge) ![MITRE](https://img.shields.io/badge/MITRE-ATT%26CK-red?style=for-the-badge) ![Detection](https://img.shields.io/badge/Detection-Engineering-critical?style=for-the-badge) ![IncidentResponse](https://img.shields.io/badge/Incident-Response-blueviolet?style=for-the-badge) ![ThreatHunting](https://img.shields.io/badge/Threat-Hunting-darkred?style=for-the-badge) ![C2](https://img.shields.io/badge/C2-Behavioral%20Detection-black?style=for-the-badge) ![SOAR](https://img.shields.io/badge/SOAR-TheHive%20%7C%20Cortex-orange?style=for-the-badge) ![Labs](https://img.shields.io/badge/Labs-20%20Hands--On-brightgreen?style=for-the-badge) ![Level](https://img.shields.io/badge/Level-Intermediate%20→%20Advanced-blueviolet?style=for-the-badge) ![Status](https://img.shields.io/badge/Status-Completed-success?style=for-the-badge) ![Repo Size](https://img.shields.io/github/repo-size/abdul4rehman215/Incident-Response-and-Adversary-Emulation?style=for-the-badge) ![Stars](https://img.shields.io/github/stars/abdul4rehman215/Incident-Response-and-Adversary-Emulation?style=for-the-badge) ![Forks](https://img.shields.io/github/forks/abdul4rehman215/Incident-Response-and-Adversary-Emulation?style=for-the-badge) ![Last Commit](https://img.shields.io/github/last-commit/abdul4rehman215/Incident-Response-and-Adversary-Emulation?style=for-the-badge)
## 🎯 执行摘要 本代码库展示了以下方面的实践能力: - ✅ 数字取证与事件响应 (DFIR) - ✅ 检测工程 (Zeek, Suricata, Wazuh) - ✅ SOC 运营与日志关联 - ✅ 对手模拟 (安全模拟) - ✅ 凭据攻击分析 - ✅ C2 行为检测概念 - ✅ SOAR 自动化 (TheHive + Cortex) - ✅ 端到端事件生命周期执行 这**不是纯理论内容**。 每个实验均包含: - 执行的命令 - 检测逻辑 - 自动化脚本 - 结构化报告 - 截图与验证输出 - 故障排除文档 本作品集模拟了真实的 SOC Tier 1 → Tier 2 → 检测工程工作流。 # 📌 关于本代码库 一个结构化的 **20 个实验 SOC 工程**项目,模拟了: - 真实的安全运营中心工作流 - 蓝队检测工程 - 事件响应生命周期执行 - 数字取证调查 - 从攻到防的对手模拟 - 安全自动化与 SOAR 集成 所有实验均在受控的 Ubuntu 24.04 实验环境中使用开源工具执行。 每个实验都以实操为核心,并包含: - 命令执行 - 检测逻辑实现 - 结构化取证报告 - 自动化脚本 - 截图与验证输出 - 故障排除文档 # 📚 实验索引 (1–20) ## 🗂 实验分类概览 # 🔐 第 1 部分:数字取证与事件响应 (实验 1–6)
![Category](https://img.shields.io/badge/Category-DFIR-purple?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-Incident%20Response-blueviolet?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-Memory%20%26%20Network%20Forensics-6f42c1?style=for-the-badge) ![Focus](https://img.shields.io/badge/Detection-IDS%20Engineering-EF3B2D?style=for-the-badge)
| 实验 | 标题 | 重点领域 | |-----|-------|------------| | 01 | [事件响应生命周期](./lab01-incident-response-lifecycle) | NIST IR 框架实施 | | 02 | [实时系统分析 (Linux)](./lab02-live-system-analysis-linux) | auditd 与日志关联 | | 03 | [使用 Volatility 进行内存取证](./lab03-memory-forensics-with-volatility) | 内存转储分析与 Rootkit 检测 | | 04 | [使用 Zeek 进行网络取证](./lab04-network-forensics-with-zeek) | 流量分析与检测脚本 | | 05 | [使用 Suricata 进行事件检测](./lab05-incident-detection-with-suricata) | IDS 规则工程 | | 06 | [分析 DNS 流量](./lab06-analyzing-dns-traffic) | DGA 与隧道检测 | ### 🧠 展示技能 - 证据保全 - Rootkit 调查与隐藏进程检测 - 网络流量重构 - IDS 规则工程 - DNS 隧道检测 - 时间线重构 - 自动化取证报告 # 🔍 第 2 部分:攻防安全与 Web 漏洞利用 (实验 7–14)
![Category](https://img.shields.io/badge/Category-Offensive%20Security-darkred?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-OSINT-critical?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-Enumeration-ff8800?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-Web%20Exploitation-cc0000?style=for-the-badge) ![Defense](https://img.shields.io/badge/Defense-Validation-success?style=for-the-badge)
| 实验 | 标题 | 重点领域 | |-----|-------|------------| | 07 | [使用 theHarvester 进行 OSINT](./lab07-osint-with-theharvester) | 被动情报收集 | | 08 | [使用 Maltego 进行基础设施映射](./lab08-web-reconnaissance-with-maltego) | 攻击面可视化 | | 09 | [网络扫描与枚举 (Nmap)](./lab09-scanning-&-enumeration-with-nmap) | 服务与漏洞检测 | | 10 | [SMB 枚举 (Enum4Linux)](./lab10-smb-scanning-enum4linux) | 内部服务枚举 | | 11 | [密码破解 (Hashcat)](./lab11-password-cracking-hashcat) | 哈希分析与攻击优化 | | 12 | [暴力破解与凭据填充](./lab12-brute-force-and-credential-stuffing-attacks) | 身份验证攻击模拟 | | 13 | [使用 sqlmap 进行 SQL 注入](./lab13-exploiting-sql-injection-with-sqlmap) | 数据库漏洞利用与修复 | | 14 | [使用 XSStrike 进行 XSS 漏洞利用](./lab14-exploiting-xss-vulnerabilities-with-xsstrike) | 客户端漏洞利用与检测 | ### 🧠 展示技能 - OSINT 方法论与自动化 - Nmap 扫描框架 - 凭据攻击工程 - SQL 注入漏洞利用与安全编码修复 - XSS payload 分析与自动化脚本 - 防御性验证与加固 - 结构化漏洞报告 所有操作均在受控的实验环境中进行。 # 🛡 第 3 部分:高级安全运营与对手模拟 (实验 15–20)
![Category](https://img.shields.io/badge/Category-Advanced%20SOC-005571?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-Lateral%20Movement-black?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-C2%20Behavioral%20Detection-111111?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-SOAR%20Automation-orange?style=for-the-badge) ![Focus](https://img.shields.io/badge/Focus-SIEM%20Engineering-1f6feb?style=for-the-badge)
| 实验 | 标题 | 重点领域 | |-----|-------|------------| | 15 | [Web Shell 持久化与检测](./lab15-web-shell-persistence-and-detection) | Web 服务器失陷检测 | | 16 | [权限提升模拟 (Mimikatz)](./lab16-privilege-escalation-mimikatz) | Windows 凭据分析 | | 17 | [横向移动与枢纽模拟](./lab17-lateral-movement-simulation) | 失陷后的网络移动 | | 18 | [C2 规避模拟](./lab18-c2-evasion-simulation) | Beacon 行为与流量分析 | | 19 | [使用 SOAR 的事件恢复手册](./lab19-incident-recovery-playbooks-with-soar) | 自动化案例编排 | | 20 | [完整 SOC 事件响应实验](./lab20-incident-response-lab) | 端到端检测与响应 | ### 🧠 展示技能 - Web shell 检测工程与自动化 - 凭据窃取分析概念 - C2 流量行为检查 - 横向移动检测模式 - SSH 枢纽模拟 - SOAR 剧本开发 - 多向量攻击模拟 - 多工具日志关联 (Wazuh, Zeek, Suricata) - 高管级别的事件报告 - 证据保全 - 完整的 SOC 事件生命周期执行 ## 🏁 最终实验 – 端到端 SOC 生命周期执行
**使用的集成技术栈:** - Wazuh (SIEM) - Suricata (IDS) - Zeek (网络监控) - Python 检测引擎 - iptables 遏制 - 结构化高管报告 本实验模拟了完整的企业级 SOC 运营工作流,涵盖从检测到事件后验证的全过程。 ## 🗂 代码库结构 ``` incident-response-and-adversary-emulation/ ├── 🔹 digital-forensics-&-incident-response (Labs 1–6) ├── 🔹 offensive-security-&-web-exploitation (Labs 7–14) ├── 🔹 advanced-security-operations-&-adversary-emulation (Labs 15–20) └── README.md ``` ### 🧱 标准实验文件夹结构 每个实验都遵循专业、一致的结构: ``` labXX-name/ ├── README.md ├── commands.sh ├── output.txt ├── scripts/ ├── reports/ ├── interview_qna.md ├── troubleshooting.md ``` 这确保了: - ✅ 可重复性 - ✅ 结构化文档 - ✅ 面试准备就绪 - ✅ 符合真实的 SOC 工作流 # 🛠 整个代码库中使用的工具与技术
点击展开 ### 🖥 操作系统 - Ubuntu 24.04 - Windows (模拟防御测试) ### 🔎 DFIR 与监控 - auditd - AIDE - chkrootkit - rkhunter - Volatility - LiME - tcpdump ### 🌐 网络安全 - Zeek - Suricata - Nmap - Enum4Linux - dig - Scapy ### 🔐 攻防安全 - theHarvester - Maltego - Hashcat - - sqlmap - XSStrike - DVWA ### 🧠 SOC 技术栈 - Wazuh (SIEM) - Suricata (IDS) - Zeek (NSM) - TheHive - Cortex - Elasticsearch - Docker & Docker Compose ### ⚙ 自动化与脚本 - Bash - Python 3.x - PowerShell Core - JSON 解析 - jq
# 🎓 20 个实验的学习成果 完成这 20 个实验系列后,本作品集展示了以下能力: - 执行完全符合 NIST 标准的事件响应生命周期 (检测 → 遏制 → 恢复 → 报告) - 执行实时的 Linux 取证调查和内存分析 - 使用 Suricata 和 Zeek 设计 IDS 检测逻辑 - 关联多源日志 (auditd, Zeek, Wazuh, 系统日志) - 检测 DNS 隧道、Beacon 通信和异常流量行为 - 分析凭据攻击模式和身份验证滥用 - 识别横向移动和失陷后技术 - 检查模拟的 C2 式通信模式 - 部署和操作开源 SOC 技术栈 (Wazuh + Suricata + Zeek) - 使用 TheHive 和 Cortex 设计并自动化 SOAR 剧本 - 撰写结构化的技术和高管级别事件报告 这是以实操驱动的安全工程——而非理论研究。 # 📊 职业相关性 本作品集反映了: - SOC Tier 1 → Tier 2 运营能力 - 具备规则调优和日志分析的检测工程思维 - 使用行为指标的威胁狩猎方法论 - 蓝队自动化开发 (Bash / Python / SIEM 集成) - 结构化取证文档规范 - 企业级事件响应模拟 - 安全配置验证与防御性加固意识 它符合以下职位方向: - SOC 分析师 (Tier 1 / Tier 2) - 检测工程师 - DFIR 分析师 - 安全自动化工程师 - 蓝队工程师 # 🌍 真实世界契合度 这些实验模拟了真实的企业安全工作流,包括: - 告警分流与优先级排序 - 跨主机和网络层的日志关联 - 检测工程与规则验证 - IDS 调优与误报减少 - 威胁情报集成概念 - 证据保全与监管链意识 - 高管和利益相关者报告 - 事后审查与经验教训流程 重点在于类似生产环境中的运营安全工程。 # 🧪 真实世界模拟模型 所有实验均在旨在模拟以下场景的受控实验环境中执行: - SOC 监控管道 - 主机与网络遥测分析 - 多向量攻击场景 (Web、凭据、网络) - 后渗透检测模式 - 自动化遏制逻辑 (iptables、fail2ban、脚本) - SIEM 告警富化与案例管理 - 端到端事件生命周期执行 本代码库代表的是实际实施——而非学术练习。 # 📊 安全技能热力图 此热力图反映了所有 20 个实验中结构化的实操实施,涵盖: 事件响应 • 数字取证 • 检测工程 • 对手模拟 • SOC 自动化 熟练度进度条代表了执行的深度——从基础实施到模拟 SOC 环境中完整的端到端运营部署。 | 技能领域 | 熟练度 | 实践深度 | 使用工具 | |-------------|----------------|----------------|------------| | 🛡 事件响应生命周期 | ██████████ 100% | 端到端执行 | NIST 框架, Bash 自动化 | | 🔍 日志关联与分析 | █████████░ 90% | 多源关联 | auditd, syslog, Zeek, Wazuh | | 🧠 数字取证 | █████████░ 90% | 实时与内存取证 | Volatility, LiME, AIDE | | 🌐 网络取证 | █████████░ 90% | 流量检查与检测 | Zeek, tcpdump | | 🚨 IDS / 检测工程 | █████████░ 90% | 自定义规则工程 | Suricata | | 🧬 DNS 威胁检测 | ████████░░ 80% | DGA 与隧道分析 | Scapy, Python | | 🔎 威胁狩猎 | █████████░ 90% | IOC 与行为检测 | Zeek, Bash, Python | | 🔐 凭据攻击分析 | ████████░░ 80% | 哈希与暴力破解测试 | Hashcat, Hydra | | 🌍 Web 漏洞利用分析 | ████████░░ 80% | SQLi 与 XSS 测试 | sqlmap, XSStrike | | 🛰 C2 行为分析 | ████████░░ 80% | Beacon 模式检测 | tcpdump, Python | | 🔁 横向移动概念 | ████████░░ 80% | SSH 枢纽模拟 | SSH, Bash | | 🤖 安全自动化 | █████████░ 90% | 检测与报告自动化 | Python, Bash | | ⚙ SOAR 剧本 | ████████░░ 80% | 案例自动化 | TheHive, Cortex | | 📊 SIEM 运营 | █████████░ 90% | 告警关联与监控 | Wazuh | | 📑 事件报告 | ██████████ 100% | 高管与技术报告 | 结构化文档 | ### 📌 熟练度等级 - ██████████ = 结合自动化实现端到端 - █████████░ = 高级实践实施 - ████████░░ = 熟练的可用性实施 - ██████░░░░ = 基础掌握 此热力图代表的是运营安全工程能力——而非孤立的脚本编写任务——涵盖: 检测 → 关联 → 调查 → 遏制 → 自动化 → 报告 它展示了在受控的企业级实验环境中,跨主机、网络和自动化层的实际 SOC 执行能力。 # 🚀 如何使用 ``` git clone https://github.com/abdul4rehman215/Incident-Response-and-Adversary-Emulation.git cd Incident-Response-and-Adversary-Emulation cd labXX-name ``` 每个实验都包含自己的 `README.md`,其中包含设置、执行步骤、脚本、报告和故障排除指南。 # 🔒 执行环境 所有实验均在旨在模拟真实 SOC 和检测工程工作流的独立 Linux 环境中执行。 ### 环境特征 - Ubuntu 22.04 / 24.04 LTS (基于云的实验室设置) - 用于攻击者/防御者模拟的隔离虚拟机 (视需要而定) - 受控且具有故意漏洞的测试系统 - 合成数据集与安全模拟构件 - 主机与网络遥测数据收集 (auditd, Zeek, Suricata, Wazuh) - 可重复的自动化管道 (Bash / Python / 基于 Docker 的服务) 输出结果通过结构化报告、日志和证据构件进行了验证,以反映生产级的安全工程质量。 # 🏢 预期用途 本代码库旨在支持: - SOC 运营培训 - 检测工程开发 - 数字取证与事件响应实践 - 威胁狩猎方法论 - 安全自动化与剧本工程 - SIEM 与 IDS 调优和验证 本作品集中模拟的对抗技术严格仅用于增强防御性检测和响应能力。 # ⚖ 道德与法律声明 所有研究、模拟和安全测试活动均在以下条件下进行: - 在受控实验环境中 - 针对具有故意漏洞或已获授权的系统 - 使用合成或自行配置的数据集 - 出于教育、防御和专业发展目的 未针对任何生产系统。 未测试任何未授权系统。 在合法批准的环境之外滥用本代码库中展示的技术可能是非法且违背道德的。 本代码库仅用于负责的安全工程、检测研究和防御性训练。 ## 🌐 LinkedIn 上的实验作品集帖子 我还在 LinkedIn 上分享了本实验系列作品集,包含简明的作品集摘要、核心亮点以及实施背景。 [![LinkedIn](https://img.shields.io/badge/LinkedIn-View%20Project%20Post-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/posts/abdul4rehman215_incident-responseadversary-emulation-labs-activity-7445855140487737344-1QgQ?) # ⭐ 结语 本代码库反映了**真实的安全工程实操工作**——而非理论笔记。 它展示了以下能力: 如果本代码库为您带来了价值,请考虑点亮星标 ⭐ 祝您构建与防御愉快 🛡🚀 ## 👨‍💻 作者 **Abdul Rehman** 攻防安全 • SOC • 检测工程 • DFIR • 安全自动化 ### 📧 联系方式 Follow