9bie/php2shell-bypass-aslr-exp

A php2shell exploit that requires no modifications to the official version, and does not require display_errors or limit_memory.

Open original source ↗

Older snapshot: check the original source for current information.

From the publisher

README & documentation

Source preview

Read the project’s overview, installation instructions and usage examples. The original README is the source of truth.

中文 | English | 日本語 官方 prefork 配置(MaxRequestWorkers=150)下,在完全远程、只用 HTTP、目标页面只有 、不写目标侧 PHP 的约束下,一条命令拿到 RCE: 理论上只要你计算出所有php版本的偏移,然后利用这些偏移批量去fuzz,总有一条fuzz是能rce的。反正worker崩了也会重启,不怕目标打挂。 关于 worker:官方 prefork 的 MaxRequestWorkers=150 也已打通。脚本先占住 149 个 worker 的未完成请求,再把 A1/B1/A2/B2 固定到剩下的同一个 child;单 worker 只是早期的调试形态(--workers 1 仍可复现)。 不编译 PHP/Apache、不 build 镜像、不挂 gdb、不改目标 ini。 pure/runpure.sh 默认容器 p2s-pure-18110、端口 18110,默认使用 官方 prefork 配置(MaxRequestWorkers=150),起完会打印实际架构、ini 和 MPM 值;--single 才挂非官方的单 worker 覆盖 pure/docker/apache-single-worker.conf(配合 --workers 1)。docker/apache.conf 只是给旧 harness 保留的兼容软链,指向同一个文件。 Linux 上没有 docker 组权限时脚本会自动改用 sudo docker,也可以显式 DOCKER="sudo docker" ./pure/runpure.sh;--dbg 仅用于换成带符号的 同一构建做离线标定。 常用参数: --retries 默认 3;如果某次越界窗口里最常见的指针不是 zvalptrdtor,脚本会用 libphp-main 的合理区间检查丢弃这次泄漏, 整条链重来。 目标页面只有 ,攻击流量只有 chunked multipart 和普通 GET/POST: 一半 body 的 POST 占住其它 child,A1/B1/A2/B2 就都会落到剩下的同一个 child,跨请求的悬空指针才有效。 contentlength=0,rfc1867posthandler 开头的检查被跳过, 可以发送远大于 8M 的 body 做堆整形。 PHPSESSIONUPLOADPROGRESS,在 END cleanup 的 phpurlencode 里 OOM;bailout 留下悬空的 PS(id) / PS(moddata),sendcookie=1。 zendstring 头(len=0xC8000,data 含 /),Set-Cookie 把 id chunk 之后 800KB 内存编码出来。窗口里同时有: (main+0x7D720);B2 用 384B…

9bie/php2shell-bypass-aslr-exp on GitHub A short preview, not the full document.

Read the full README ↗ · Preview checked 2026-10-27T16:34:28.291Z

Inside the original README — Document outline
  1. php2shell - 官方环境 无需displayerrors,不修改memorylimit
  2. 通用利用
  3. 快速开始(官方 php.ini-production / displayerrors=Off / 128M)
  4. 这条纯 HTTP 链
  5. 证据
  6. 旧线(legacy,非本目标)
  7. 复现声明

Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.

Links from the README

References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.

Documentation belongs to its respective authors. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.

What this repository does

A php2shell exploit that requires no modifications to the official version, and does not require display_errors or limit_memory.

Repository facts

Owner
9bie
Primary language
Python
Stars
1,504
Forks
440
Open issues + pull requests
6
License
Not reported — inspect the license file
Archived
No
Default branch
main
Created
2026-10-21T11:11:57.000Z
Last push
2026-10-23T20:40:43.000Z

Topics and intended use

No topics were included in the latest source metadata.

Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.

Evaluate before installing

Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.

README and project files

Issues and maintenance discussion

Releases and changelog

Source and freshness

Source: GitHub. Metadata observed 2026-10-28T12:14:58.607Z. Daily imports are snapshots, not real-time monitoring.

Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.

Open original source

Related repositories

public-apis/public-apis

EbookFoundation/free-programming-books

donnemartin/system-design-primer

vinta/awesome-python

practical-tutorials/project-based-learning

NousResearch/hermes-agent