
Spring4Shell (CVE-2022-22965) DFIR lab with exploit simulation, Python WAF, IOC-based detection, and PCAP analysis.
A comprehensive Digital Forensics & Incident Response (DFIR) project that simulates, detects, and investigates the Spring4Shell (CVE-2022-22965) critical vulnerability. This project demonstrates the complete incident response lifecycle from initial compromise through detection, mitigation, and forensic analysis.
Attack Simulation → Network Capture → Log Analysis → IOC Detection → Firewall Mitigation → Forensic Investigation
Built as a blue team / SOC analyst portfolio project showcasing practical defensive security skills.
This lab environment provides hands-on experience with real-world incident response techniques by recreating a controlled Spring4Shell exploitation scenario. The project encompasses both offensive and defensive perspectives, allowing security professionals to understand attack vectors while implementing detection and mitigation strategies.
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
The attack simulator sends a specially crafted HTTP POST request exploiting Spring Framework's data binding vulnerability:
Payload: class.module.classLoader.resources.context.parent.pipeline.first
Target: /tomcatwar.jsp
Method: HTTP POST with malicious parameters
This mimics real-world exploitation attempts against vulnerable Spring applications.
A custom Python-based Web Application Firewall intercepts and analyzes incoming HTTP requests:
HTTP 403 Forbidden for blocked requestsThe IOC-based detection system scans logs using structured threat intelligence:
Source: iocs/spring4shell.json
Each detection includes:
Traffic analysis workflow:
tcpdump during attack simulationCaptured artifacts include:
While memory dumps are not included in the repository, comprehensive documentation covers:
See memory/README.md for the complete methodology.
Visual evidence of the complete attack and defense workflow:
The Python-based firewall initialized and listening for incoming requests
Real-time interception of the Spring4Shell exploit attempt
Detailed logging of the malicious request with payload signatures
IOC-based detection engine identifying the Spring4Shell attack
Network-level proof of the exploit attempt and firewall response
This project showcases proficiency in:
Two IOC profiles are provided for different use cases:
spring4shell.json (Lightweight)Compact detection rules optimized for real-time scanning with minimal false positives.
spring4shell_full.json (Comprehensive)Extended threat profile including:
# 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
Detailed setup instructions are available in each module's subdirectory.
This project is strictly for educational purposes and authorized security research only.
Suyesh R K
Security & DFIR Enthusiast
Contributions are welcome! Please feel free to submit issues or pull requests for:
If you find this project helpful, please consider giving it a star!
| Component | Technology |
|---|
| Language | Python 3.x |
| Network Capture | tcpdump, Wireshark |
| Memory Analysis | Volatility3 (documented) |
| Version Control | Git |
| Platform | Linux (Arch-based) |
| Web Framework | Simulated vulnerable HTTP service (Spring4Shell behavior) |