Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1020 CNY

100%

CVE-2017-5638 PoC — Apache Struts 2 输入验证错误漏洞

Source
Associated Vulnerability
Title:Apache Struts 2 输入验证错误漏洞 (CVE-2017-5638)
Description:The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content-Type header containing a #cmd= string.
Description
Real-time anomaly detection system for Apache Struts CVE-2017-5638 exploit using streaming analytics, 3-gram byte analysis, and Count-Min Sketch. Detects RCE attacks without signatures, with <5ms latency and <0.1% false positives. 
Readme
# 🚨 Real-Time Anomaly Detection for Apache Struts CVE-2017-5638

> **Deteksi Zero-Day Exploit Berbasis Analitik Streaming & Probabilistic Data Structures**

![Dashboard Screenshot](screenshots/dashboard.jpg)
![Dashboard Screenshot](screenshots/Evaluasi-Sistem-Deteksi.png)

## 📌 Keterangan Proyek

Proyek ini adalah **sistem deteksi anomali real-time** yang dirancang untuk **mendeteksi eksploitasi RCE (Remote Code Execution)** pada **Apache Struts melalui kerentanan CVE-2017-5638**, tanpa bergantung pada signature atau pola yang sudah diketahui.

CVE-2017-5638 adalah kerentanan kritis yang digunakan dalam **serangan Equifax 2017**, yang menyebabkan kebocoran data pribadi 147 juta orang. Serangan ini berhasil karena **kegagalan dalam manajemen patch dan deteksi dini**.

Sistem ini mengatasi kelemahan tersebut dengan:

- ✅ **Deteksi berbasis perilaku** (bukan signature)
- ✅ **Analisis byte-level 3-gram** dari seluruh request HTTP
- ✅ **Count-Min Sketch** untuk pelacakan frekuensi efisien
- ✅ **Divergensi KL** untuk mengukur penyimpangan dari pola normal
- ✅ **Threshold adaptif** (mean + 3σ) untuk deteksi real-time
- ✅ **Dashboard visual** dengan Streamlit

Tujuannya: **mendeteksi eksploitasi zero-day sebelum sistem dikompromikan**, bahkan jika payload belum pernah dilihat sebelumnya.

---

## 🎯 Tujuan Utama

- Mendeteksi eksploitasi Struts secara real-time dengan **latensi ≤ 5ms**
- Memori ≤ 1 GB meskipun throughput ≥ 50.000 request/detik
- Tingkat **positif palsu < 0,1%** pada data normal
- Tingkat **deteksi ≥ 95%** pada payload eksploitasi sintetik
- Sistem dapat di-deploy dan dimonitor secara real-time

## STEP menjalankan

- Jalankan simulator log (50k req/sec, 60 detik)
  python scripts/simulate_logs.py
- Jalankan sistem deteksi
  python src/main.py
- Buka dashboard real-time di terminal baru
  streamlit run scripts/dashboard.py
File Snapshot

[4.0K] /data/pocs/453a626f278169c4d7219e0d98f7ea5950620270 ├── [ 537] Dockerfile ├── [1.4K] Makefile ├── [1.8K] README.md ├── [ 27] requirements.txt ├── [4.0K] screenshots │   ├── [101K] dashboard.jpg │   └── [ 14K] Evaluasi-Sistem-Deteksi.png ├── [4.0K] scripts │   ├── [4.9K] dashboard.py │   ├── [2.3K] evaluate_performance.py │   └── [3.6K] simulate_logs.py ├── [4.0K] src │   ├── [4.0K] alerting │   │   ├── [1.1K] alert_engine.py │   │   └── [1.5K] metrics_eval.py │   ├── [4.0K] anomaly_detection │   │   ├── [1.2K] adaptive_threshold.py │   │   └── [1.4K] kl_divergence.py │   ├── [4.0K] data_ingest │   │   ├── [ 25] log_consumer.py │   │   └── [ 31] log_simulator.py │   ├── [4.0K] feature_extraction │   │   ├── [1.7K] count_min_sketch.py │   │   └── [ 496] ngram_extractor.py │   ├── [5.8K] main.py │   └── [4.0K] preprocessing │   ├── [1.5K] parser.py │   └── [1.7K] request_builder.py └── [4.0K] tests ├── [1.3K] test_alerting.py ├── [2.0K] test_detection.py ├── [ 952] test_parser.py └── [1005] test_sketch.py 9 directories, 24 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →