Skip to content
SantoshKumar-20Public

About

This repo run you through detailed lab setup on understanding the PHP2Shell on kali Linux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

PHP2Shell Lab Simulation & Case Study (CVE-2026-109618 & CVE-2026-109619)

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.


Repository Structure

.
├── 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

Quick Start (Kali Linux / Debian)

1. Automated Deployment

Clone the repository and run the management script:

chmod +x deploy_lab.sh
./deploy_lab.sh deploy

Once 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

2. Diagnostic Testing

Run safe non-destructive tests:

./deploy_lab.sh test

3. Log Inspection

Stream real-time FastCGI and Nginx logs:

./deploy_lab.sh logs

4. Patch Remediation

Upgrade the container from php:8.3.35-fpm to the patched php:8.3.36-fpm release:

./deploy_lab.sh patch

5. Teardown

Cleanly stop and remove containers:

./deploy_lab.sh down

Full Technical Case Study

For 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.


Disclaimer

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.

About

This repo run you through detailed lab setup on understanding the PHP2Shell on kali Linux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages