shrouqobaid/Threat-Hunting-Detection-Lab

GitHub: shrouqobaid/Threat-Hunting-Detection-Lab

一个综合性的威胁狩猎与检测工程实验室,通过模拟真实攻击场景并基于 Splunk 等工具进行日志分析和检测规则开发,帮助安全从业者提升主动防御能力。

Stars: 1 | Forks: 0

### 威胁狩猎与检测实验室 (Threat Hunting & Detection Lab) 本仓库记录了我在检测工程 (Detection Engineering) 和网络威胁狩猎方面的历程。通过这个实验室,我模拟了真实的攻击场景,分析了日志 (Logs),并开发了有效的检测规则来监控可疑活动。 ### 主 IOC 表 (Master IOC Table) 此表总结了已执行的调查操作及针对其采取的措施: ### Master IOC 表 | Case | Timestamp | Source IP | Destination IP | IOC Type | Technique / Tool | Action Taken | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | #1 | 5/29/26 12:01 AM | 127.0.0.1(local) | DESKTOP-HE83QAGO | Event ID 4625 | Brute Force | Disabled Account | | #2 | 5/31/26 21:13 PM | DESKTOP-HE83QAGO | Internal | ScriptBlock | PowerShell (Encoded) | Terminated Process | | #3 | 5/31/26 10:57:22 PM | 192.168.88.1 | 192.168.88.138 | Domain / Query | DNS Tunneling | Isolated Host | | #4 | 06/01/2026 18:32 | 192.168.8.237 | 192.168.88.138 | IP / Port | C2 Beaconing | Blocked C2 Traffic | ### 工具与工作环境 (Lab Environment) 我构建了一个完整的实验室环境来模拟真实的企业网络,包含以下系统和工具: 1.系统环境 (Endpoints): * Windows 11 & Windows 10:用作用户设备以生成事件日志 (Event Logs) * Kali Linux:用作攻击平台以执行入侵场景并模拟可疑连接。 2.网络分析 (Network Analysis): * Zeek (Bro):用于分析流量 (Network Metadata) 并提取妥协指标 (IOC) * Wireshark:用于精确检查和分析数据包 (PCAP) 3.与分析 (SIEM) **Splunk:用于从所有设备收集和分析日志的集中式平台。** * 参考框架:依赖 MITRE ATT&CK 对检测到的战术和技术进行分类。 ### 调查与结果详情 1/ 检测暴力破解攻击 (Brute Force) 描述:通过 Windows 事件日志 (Event ID 4625) 监控未经授权的登录尝试。 - 查询 (SPL): ``` index=windows EventCode=4625 | bin _time span=5m | stats count by IpAddress, TargetUserName, WorkstationName | where count > 5 | sort - count ``` 2/ 分析可疑的 PowerShell 命令 - 描述:审查包含 `-EncodedCommand` 或 `-bypass` 等可疑标志的命令,攻击者利用这些标志来执行隐藏的脚本。 * 查询 (SPL): ``` index=windows (EventCode=4688 OR EventCode=1) | search CommandLine="*powershell*" AND (CommandLine="*-e*" OR CommandLine="*-enc*" OR CommandLine="*bypass*") | table _time, ComputerName, User, CommandLine ``` 3/ 检测 DNS 数据泄露 * 描述:监控对 DNS 协议的利用以进行数据传输。 - 查询 (SPL): ``` index=network sourcetype=dns | stats count by query, src_ip | where len(query) > 50 OR count > 100 | sort - count ``` 4/ 监控命令与控制 (C2) 连接 - 描述: 使用 Zeek 日志分析受感染系统与 C2 服务器之间的周期性通信模式 (Periodicity)。 * 查询 (SPL): ``` index=network sourcetype=zeek_conn | stats count, avg(duration) as avg_duration, stdev(duration) as interval_stdev by src_ip, dest_ip | where interval_stdev < 1 | sort - count ``` ### 证据文档 (Evidence) 您可以通过以下链接查看每个案例的详细结果: * **Case 1:** [查看报告](https://github.com/shrouqobaid/Threat-Hunting-Detection-Lab/issues/2) * **Case 2:** [查看报告](https://github.com/shrouqobaid/Threat-Hunting-Detection-Lab/issues/3) * **Case 3:** [查看报告](https://github.com/shrouqobaid/Threat-Hunting-Detection-Lab/issues/5) * **Case 4:** [查看报告](https://github.com/shrouqobaid/Threat-Hunting-Detection-Lab/issues/4) ### 最终关联报告 (Case 5: Correlation & Incident Report) 此报告代表了关联从先前案例中提取的所有证据和安全指标 (IOC) 的最终阶段: * **Case 5:** [下载事件报告 (PDF)](https://github.com/shrouqobaid/Threat-Hunting-Detection-Lab/blob/main/docs/Incident_Correlation_Report.pdf) ### 仓库结构 (Repository Structure)
  • data/ : 包含威胁模拟数据和脚本文件
  • docs/ : 威胁狩猎过程的附加详细文档
  • screenshots/ : 包含调查结果的视觉证据
**该实验室旨在提升网络主动防御技能。**
标签:FOFA, IP 地址批量处理, 实验室环境, 红队行动