Exploit databaseDownload repository ZIP
GH-298f3309a4d1116b060c0d5964397cfd
joshuarosato/php2shell-poc
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files15
joshuarosato/php2shell-pocRevision 3f462191c939
- ↑..Parent directory
- gadget/
- README.md
- build_gadget.sh
- build_vuln_php.sh
- consumer.php
- fpm.conf
- gdb_stale_state.cmd
- index.php
- lab.ini
- php.ini
- producer.php
- run_lab.sh
- run_root_lab.sh
- start.sh
- verify_patched.sh
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lab/build_gadget.sh
Shell · 787 bytes#!/usr/bin/env bash
# Build the lab "gadget" extension.
#
# It provides a class whose __wakeup() executes a command. It stands in for
# the gadget classes that real applications expose (framework classes such as
# Symfony/Guzzle/Monolog handlers). The point of the PoC is *when* __wakeup()
# runs - during request startup, before any application code - not the gadget
# itself.
set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
PHP_PREFIX="${PHP_PREFIX:-/tmp/php-vuln85}"
BUILD="${BUILD:-/tmp/opencode/scratchpad/ext-pwn}"
rm -rf "$BUILD"
mkdir -p "$BUILD"
cp "$HERE/gadget/pwn.c" "$HERE/gadget/config.m4" "$BUILD/"
cd "$BUILD"
"$PHP_PREFIX/bin/phpize"
./configure --with-php-config="$PHP_PREFIX/bin/php-config"
make -j"$(nproc)"
echo "gadget extension: $BUILD/modules/pwn.so"