An isolated Docker-based simulation and defensive case study examining PHP2Shell (CVE-2026-109618 and CVE-2026-109619)—two critical vulnerabilities in the core PHP Zend Engine disclosed in October 2026.
This repository provides an automated testbed, diagnostic scripts, blue team telemetry analysis, and patch remediation procedures.
.
├── CASE_STUDY.md # In-depth architectural analysis and vulnerability report
├── deploy_lab.sh # Bash automation script for Kali Linux / Debian
├── docker-compose.yml # Orchestrates Nginx reverse proxy and PHP-FPM runtime
├── nginx/
│ └── default.conf # Nginx FastCGI configuration and access/error logging
├── php/
│ └── php.ini # PHP configuration (memory limits, error reporting)
└── src/
├── index.php # Lab overview dashboard and runtime info
├── worker_inspect.php # Worker state and persistent PID inspector
└── diagnostic_oom.php # Safe memory ceiling and longjmp() lifecycle test
Clone the repository and run the management script:
chmod +x deploy_lab.sh
./deploy_lab.sh deployOnce deployed, the lab dashboard is available at:
- Dashboard:
http://localhost:8080/ - Worker Inspector:
http://localhost:8080/worker_inspect.php - OOM Diagnostics:
http://localhost:8080/diagnostic_oom.php?mb=256
Run safe non-destructive tests:
./deploy_lab.sh testStream real-time FastCGI and Nginx logs:
./deploy_lab.sh logsUpgrade the container from php:8.3.35-fpm to the patched php:8.3.36-fpm release:
./deploy_lab.sh patchCleanly stop and remove containers:
./deploy_lab.sh downFor deep-dive analysis on the Zend Memory Manager (Zend MM), setjmp/longjmp control flow mechanics, SIEM/telemetry detection rules, and defense-in-depth mitigations, see CASE_STUDY.md.
This project is developed for authorized educational, defensive research, and lab simulation purposes only. It demonstrates runtime memory management and telemetry logging without containing weaponized exploit payloads or malicious automation.