Spring4Shell (CVE-2022-22965) DFIR实验室,包含漏洞利用模拟、Python WAF、基于IOC的检测和PCAP分析。
一个全面的数字取证与事件响应 (DFIR) 项目,用于模拟、检测并调查 Spring4Shell (CVE-2022-22965) 严重漏洞。本项目展示了从初始失陷到检测、缓解及取证分析的完整事件响应生命周期。
攻击模拟 → 网络捕获 → 日志分析 → IOC 检测 → 防火墙缓解 → 取证调查
作为一个蓝队 / SOC 分析师作品集项目构建,展示实用的防御性安全技能。
该实验室环境通过重现受控的 Spring4Shell 利用场景,提供真实世界事件响应技术的实操经验。项目涵盖攻击与防御双重视角,使安全专业人员能够在实施检测与缓解策略的同时理解攻击向量。
dfir-malware-investigation/
│
├── analysis/ # Detection scripts and PCAP analysis documentation
├── firewall/ # Custom WAF implementation and configuration
├── iocs/ # IOC definitions and threat intelligence profiles
├── tools/ # Attack simulator and vulnerable web application
├── screenshots/ # Visual demonstration and evidence
├── pcaps/ # Network traffic captures
├── logs/ # Application and firewall logs
└── memory/ # Memory forensics methodology and documentation
攻击模拟器发送一个特制的 HTTP POST 请求,利用 Spring 框架的数据绑定漏洞:
Payload: class.module.classLoader.resources.context.parent.pipeline.first
Target: /tomcatwar.jsp
Method: HTTP POST with malicious parameters
这模拟了针对易受攻击的 Spring 应用的真实世界利用尝试。
一个基于 Python 的自定义 Web 应用防火墙拦截并分析传入的 HTTP 请求:
HTTP 403 Forbidden基于 IOC 的检测系统使用结构化威胁情报扫描日志:
Source: iocs/spring4shell.json
每次检测包括:
流量分析工作流:
tcpdump 捕获数据包捕获的工件包括:
虽然仓库中不包含内存转储,但全面的文档涵盖:
完整方法请参阅 memory/README.md。
攻击与防御完整工作流的可视化证据:
基于 Python 的防火墙已初始化并正在监听传入请求
实时拦截 Spring4Shell 漏洞利用尝试
带有载荷签名的恶意请求详细日志
基于 IOC 的检测引擎识别 Spring4Shell 攻击
漏洞利用尝试与防火墙响应的网络级证据
本项目展示了以下方面的专业能力:
提供两个适用于不同使用场景的 IOC 配置文件:
spring4shell.json(轻量级)紧凑的检测规则,针对实时扫描优化,误报率极低。
spring4shell_full.json(全面版)扩展威胁配置文件,包括:
# Ensure tcpdump is available for network capture
sudo apt install tcpdump # Debian/Ubuntu
sudo pacman -S tcpdump # Arch Linux
# 1. Clone the repository
git clone https://github.com/suyash-R-K/dfir-malware-investigation.git
cd dfir-malware-investigation
# 2. Start the firewall
cd firewall
python firewall_rule.py
# 3. In another terminal, run the attack simulator
cd tools
python spring4shell_simulator.py
# 4. Analyze the results
cd ../analysis
python detect_spring4shell.py
每个模块的子目录中都提供了详细的设置说明。
本项目严格仅用于教育目的和经授权的安全研究。
Suyesh R K
安全与 DFIR 爱好者
欢迎贡献!请随时为以下方面提交 issue 或 pull request:
如果您觉得本项目有帮助,请考虑给它一个 star!
| 组件 | 技术 |
|---|
| 语言 | Python 3.x |
| 网络捕获 | tcpdump, Wireshark |
| 内存分析 | Volatility3(已文档化) |
| 版本控制 | Git |
| 平台 | Linux(基于 Arch) |
| Web 框架 | 模拟的易受攻击 HTTP 服务(Spring4Shell 行为) |