php2shell lab target

Deliberately vulnerable PHP build. Lab use only — never expose this to an untrusted network.

role: vuln PHP 8.4.26 apache2handler unpatched — 8.4 branch needs 8.4.27

Endpoints

MethodPathWhat it doesClient call
GET hello.php Plain text, no JSON. If you see HALO, the request reached this app. curl -s http://HOST/hello.php
GET healthz.php Liveness + identity. Returns role, version and patch state as JSON. curl -s http://HOST/healthz.php
GET info.php Full config dump: version, SAPI and the INI keys that matter here. curl -s http://HOST/info.php
POST echo.php Accepts a raw body, returns byte count + SHA-256 + 4 KB preview. curl -s -X POST --data-binary @file.bin -H "Content-Type: application/octet-stream" http://HOST/echo.php
GET reflect.php Reflects ?q= back verbatim. Use to check whether a string survives the path. curl -s "http://HOST/reflect.php?q=hello"
POST upload.php Multipart handler. Reports session id and the posted PHP_SESSION_UPLOAD_PROGRESS value. Files are discarded, never stored. curl -s -F "PHP_SESSION_UPLOAD_PROGRESS=lab" -F "file=@tiny.bin" http://HOST/upload.php

Current configuration

session.upload_progress.enabled 1
memory_limit 512M
post_max_size 64M
upload_max_filesize 64M
max_execution_time 30
session.save_path /tmp
This container is intentionally vulnerable. PHP 8.4.26 on apache2handler. It exists so clients and firewalls have something realistic to probe. It does not contain exploit code, and every uploaded file is discarded by PHP at the end of the request — the document root is mounted read-only.