Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/sykeops/cve-2026-115560
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityRemote Access ToolPayload DevelopmentLabs & Practice
GitHubsykeops/cve-2026-115560

CVE-2026-115560

Two Python PoCs for PHP session upload progress RCE: session-file LFI code execution and php_binary-to-php serializer object injection, with lab setup scripts.

View Repository
827 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    594
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    387
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    322
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    308
  • 6

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    275

Explore all tools

Browse our collection of tools

View all tools →
Share

PHP Session Upload Progress RCE PoC

PoC LFI RCE #1

https://github.com/user-attachments/assets/7d25d259-ec00-4e3a-810c-09098f0afb5f

PoC php-binary RCE #2

https://github.com/user-attachments/assets/00a0d3e7-bd78-4bdb-992f-0110fc580746

This repository contains two lab PoCs for PHP session upload progress. The upload progress handler writes an attacker-controlled field into the session file before application code runs:

  • Session-file LFI (poc.py): the handler stores a filename or progress value containing PHP code. If an authorized LFI includes the session file, that code executes.
  • Serializer switch (poc-php-binary.py): the progress record is written with php_binary, then the application switches to the php serializer and calls session_start(). The php decoder unserializes the attacker's progress value, proving an object-injection primitive without any LFI.

Use these only against systems you own or are explicitly authorized to test. The generated ?file= endpoint is intentionally unsafe and must stay in a lab.

Contents

FilePurpose
poc.pyMultipart upload PoC with --filename / --progress / --field-name injection and optional LFI polling
poc-php-binary.pyNo-LFI php_binary -> php serialization PoC
setup.shDeploys the session-file LFI lab on port 80 (installs Apache/PHP if missing)
setup-php-binary.shThe same script as setup.sh; differs only in the deployed index.php and in scoping session.serialize_handler=php_binary
poc.mp4Demo: session-file LFI
poc-php-binary.mp4Demo: php_binary serializer switch

Lab 1: session-file LFI

Setup

setup.sh detects the distribution, installs the web server and PHP packages if they are missing, clears /var/www/html, writes only index.php, and reloads the web server. Run it as a user with sudo rights; the script calls sudo itself, so there is no need to prefix the whole invocation:

bash setup.sh

When it finishes it prints [+] Deployed: /var/www/html/index.php and the URL to test.

Fedora / RHEL family

Installs httpd, php, and php-fpm. Because mod_php is no longer packaged there, the script also writes /etc/httpd/conf.d/php.conf to route .php requests to the php-fpm socket, then starts php-fpm and httpd. The page is served on the normal Apache port:

http://<host>/index.php

Ubuntu / Debian

Installs apache2, php, and libapache2-mod-php (mod_php), and enables the PHP module if it is not already loaded. The page is served on the normal Apache port:

http://<host>/index.php

The setup does not set session-related PHP INI values. It uses the system PHP configuration.

The generated page:

<?php
declare(strict_types=1);

if (isset($_GET['file']) && $_GET['file'] !== '') {
    header('Content-Type: text/plain; charset=utf-8');
    include $_GET['file'];
} else {
    echo "hello, world\n";
}

Check it:

curl http://192.168.122.170/index.php
# hello, world

setup.sh clears /var/www/html; do not run it on a host with a real site there.

Run poc.py

The PoC asks for confirmation before sending. --duration is the number of one-second upload chunks; the default is 45. Choose exactly one injection mode:

  • --filename puts the PHP payload in the multipart filename.
  • --progress puts it in the PHP_SESSION_UPLOAD_PROGRESS value (the payload cannot contain |).
  • --field-name puts it in the file part's field name, which the handler stores raw in files[].field_name (ext/session/session.c:3321) without input filtering. The payload cannot contain ", [ or ] (the multipart parser reads the field name up to the closing quote and rejects unbalanced brackets).

--lfi requires one of --fedora, --ubuntu, or --tmp so the PoC polls the session file for the right platform. On Ubuntu:

python3 poc.py \
  --remote 'http://192.168.122.170/index.php' \
  --filename \
  --lfi 'http://192.168.122.170/index.php?file={file}' \
  --ubuntu

On Fedora / RHEL:

python3 poc.py \
  --remote 'http://192.168.122.170/index.php' \
  --filename \
  --lfi 'http://192.168.122.170/index.php?file={file}' \
  --fedora

The PoC waits eight seconds, then polls the LFI once per second while the upload is still running. It stops as soon as it sees executed-payload output (RCE <version>), aborts the remaining upload, and exits 0. If the upload ends without a match it exits 1. Durations below 20 seconds are raised to 20 when polling is enabled, because PHP needs roughly ten seconds to write the progress entry.

Without --lfi, the platform flags are optional; the PoC only sends the upload and you can inspect the session file manually.

Session file paths

The platform flag selects the file to watch:

--fedora  /var/lib/php/session/sess_pwnd00000000000001
--ubuntu  /var/lib/php/sessions/sess_pwnd00000000000001
--tmp     /tmp/sess_pwnd00000000000001

Lab 2: php_binary -> php serializer switch

Setup

setup-php-binary.sh is the same script as setup.sh — the two files are byte-identical except for one lab-specific configuration block (the index.php that gets deployed and the serializer the lab runs under). It installs packages if needed, clears /var/www/html, writes its index.php, and reloads Apache, and it additionally scopes session.serialize_handler=php_binary to the lab: Fedora/RHEL use a dedicated php-fpm pool wired through /etc/httpd/conf.d/php.conf; Ubuntu/Debian use a php_value in an Apache conf snippet. Re-running setup.sh removes that scoping and restores the stock LFI lab, so the two scripts switch the shared /var/www/html lab back and forth.

bash setup-php-binary.sh

The endpoint starts with session.serialize_handler=php_binary, switches to php at runtime, and calls session_start():

<?php
declare(strict_types=1);

class Gadget {
    public function __wakeup()   { echo "SERIALIZED_WAKEUP\n"; }
    public function __destruct() { echo "SERIALIZED_DESTRUCT\n"; }
}

ini_set('session.serialize_handler', 'php');
session_start();

echo "hello, world\n";

Run poc-php-binary.py

python3 poc-php-binary.py \
  --remote 'http://192.168.122.170/index.php'

The script is serialize-only; there is no LFI mode. It sends the progress value x|O:6:"Gadget":0:{} (or the class named by --gadget) plus a normal file part. --duration defaults to 45 and is raised to at least 20. After eight seconds it polls the same URL with the same PHPSESSID every second, prints each response, and exits 0 as soon as SERIALIZED_WAKEUP or SERIALIZED_DESTRUCT appears. If the upload ends without a match it exits 1.

The x| prefix supplies the delimiter that php_binary does not write, so the php decoder sees the serialized object as the progress value.

How it works

Session-file LFI

  1. poc.py sends a multipart POST with PHP_SESSION_UPLOAD_PROGRESS and a file part.
  2. PHP processes upload progress before the application script runs and writes the progress data, including the injected payload, into the session file.
  3. The upload is dripped so the session file exists while the request is in flight, even with session.upload_progress.cleanup=1.
  4. The optional --lfi polls the generated include endpoint for the session file.
  5. PHP includes the session file and executes the <?php bytes.

The target PHP script does not need upload handling. A progress field without a file part does not trigger the progress record; a file part is required.

Serializer switch

Download Tool