AI Agent 指南
我的产品或网站受影响吗?用 AI Agent 自查
很多网站并不直接用 PHP,而是通过 XAMPP、主机面板、NAS、Docker 镜像或厂商设备间接带上了 PHP。下面的只读提示词让 AI agent 找出每一个 PHP 运行环境,与修复版本对比并给出判定表,全程不改动任何东西。
最近更新
提示词会让 agent 做什么
- 盘点系统 PHP、集成环境(XAMPP、MAMP、Laragon)、主机面板、容器、NAS 和设备。
- 记录每一项的版本、安装来源和是否对外暴露。
- 把厂商管理的产品对应到受影响产品页面。
- 输出判定表:已修复 / 有漏洞 / 不确定 / 由厂商负责。
安全使用 Agent
- 批准前逐条看清每个命令,让 agent 保持「执行命令前先询问」的模式。
- 先在测试环境或副本上做;动生产环境前先备份或打快照。
- 不要在生产服务器上给 agent 无人值守的 sudo/root 权限,特权命令逐条批准。
- 绝不要把密码、API 密钥、令牌或 .env 内容贴进提示词,查 PHP 版本用不着这些。
- 不要让 agent 写攻击代码或「测试载荷」,验证靠的是查版本、更新日志和服务器日志。
- agent 也会出错,最终版本请你自己在线上的 PHP-FPM 或 mod_php 上确认。
一键复制提示词
提示词用英文写,各家 agent 都能稳定执行;最后一行会要求 agent 用中文汇报。事实均来自本站页面。
Audit this machine for PHP2Shell exposure. This is a READ-ONLY audit.
Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".
Rules for you (the agent):
- Read-only: do not install, upgrade, delete, restart or change any file or service. Do not use sudo unless I approve a specific read-only command.
- Do not write, download or run exploit code, and do not probe other hosts.
- Do not print secrets you see; redact them.
- Show each command before you run it.
Find every PHP runtime, including bundled ones:
1. System PHP: php -v, php-fpm*, mod_php, every binary named php* on PATH and under /usr, /opt, /usr/local.
2. Bundled stacks: XAMPP (/opt/lampp, C:\xampp), MAMP (/Applications/MAMP), WampServer, Laragon, Local, Herd, Valet.
3. Hosting panels: cPanel ea-php, Plesk plesk-php, aaPanel/宝塔 /www/server/php, DirectAdmin, CyberPanel lsphp, HestiaCP.
4. Containers: docker ps / docker images / kubectl, and php -v inside each running container.
5. Apps that run on PHP (WordPress, Magento, Drupal, Joomla, Moodle, Nextcloud, phpMyAdmin, GLPI ...) and which PHP each one uses.
6. If this is a NAS or vendor appliance (Synology, QNAP, Unraid, pfSense, OPNsense, FreePBX ...), report the product and firmware version only; such PHP is updated by the vendor firmware.
For each item record: product/location, PHP version, how it is installed (distro package / vendor bundle / container / custom build), whether it is internet-facing, and whether the version is >= the fixed release on its branch or has a distro backport.
Output a verdict table with columns: Item | PHP version | Source | Exposed? | Verdict (Fixed / Vulnerable / Unknown / Vendor-managed) | Next step. Then list the matching product pages from https://phpvulnerabilities.app/affected-products/ for anything vendor-managed.
Write your report in Simplified Chinese.I run [PRODUCT NAME AND VERSION]. Tell me whether it is affected by PHP2Shell. This is research and a READ-ONLY check.
Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".
Rules: do not write or run exploit code; do not change anything; never ask for or print credentials.
Steps:
1. Find out whether this product bundles its own PHP or uses the system PHP, and which PHP version the version I named ships with.
2. Look for the vendor's official advisory, changelog or knowledge-base article about CVE-2026-109618 / CVE-2026-109619, and the matching page under https://phpvulnerabilities.app/affected-products/. Cite each source with its URL and date; if you find none, say so instead of guessing.
3. If I can give you shell access, list the read-only commands that would confirm the runtime version, and wait for me to run them or approve them.
Output a verdict table: Product | Version | Bundled PHP | Vendor status | Verdict (Fixed / Vulnerable / Unknown) | Fix path (vendor update, upgrade host PHP, or mitigate) | Sources.
Write your report in Simplified Chinese.Audit this repository (and any inventory files it contains) for PHP2Shell exposure. READ-ONLY: do not edit files, open pull requests or connect to servers unless I approve.
Context: PHP2Shell is CVE-2026-109618 and CVE-2026-109619, two critical unauthenticated remote-code-execution bugs in the PHP runtime (advisory published 21 October 2026). Fixed upstream releases: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 (or later on the same branch). PHP 8.1 and earlier get no upstream fix. Linux distributions may ship backported fixes under an older version string, so check the distro's security tracker / package changelog for CVE-2026-109618 and CVE-2026-109619, not only "php -v".
Rules: no exploit code, no scanning of hosts, redact secrets.
1. Search Dockerfiles, compose files, Helm charts, Terraform/Ansible/Puppet/Chef code, CI workflows, .tool-versions, composer.json "config.platform.php" and "require.php" for PHP versions and base images.
2. List every place a PHP version or image is pinned, and resolve tags like php:8.3-fpm to the patch level they currently point to if you can.
3. Mark each as Fixed / Vulnerable / Unknown against 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 (or a distro backport), and flag PHP 8.1 or older.
Output a verdict table: File | Line | Image or package | PHP version | Verdict | Suggested change. Do not apply the changes; list them for my review.
Write your report in Simplified Chinese.常见 AI 编程 Agent
列表不分先后,本站与这些产品均无关联。
| OpenAI Codex CLI | 在项目目录或服务器上运行 codex,粘贴提示词;保持「执行前询问」的审批模式。 |
|---|---|
| Claude Code | 在终端运行 claude 并粘贴提示词;默认会在执行命令前请求许可。 |
| Cursor (Agent) | 打开项目或 Remote-SSH 会话,粘贴到 Agent 对话框,逐条审核终端命令。 |
| Cursor Cloud Agents | 适合 Docker 和代码库类提示词:在分支上改动,你审核 diff;它连不到你的服务器。 |
| Grok Build (xAI CLI) | xAI 的终端编程 agent,在项目或服务器上启动后粘贴提示词。没有终端权限时,可贴到 grok.com 对话里,自己执行它给出的只读命令。 |
| GitHub Copilot coding agent | 把含有 Docker/代码库提示词的 issue 指派给 Copilot,它会提交 PR 供你审核。 |
| Gemini CLI | 在终端运行 gemini 并粘贴提示词,逐条确认它提出的命令。 |
| Windsurf (Cascade) | 粘贴到编辑器里的 Cascade;windsurf.com 目前会跳转到 Devin Desktop。 |
| Cline | VS Code 插件,粘贴到 Cline 面板,逐条批准命令和文件改动。 |
| Aider | 最适合 Docker/代码库提示词:在仓库里运行 aider,粘贴提示词并审核它的提交。 |
常见问题
怎么知道我的网站是否受 PHP2Shell 影响?
找出网站实际使用的 PHP 版本(不只是 php -v),与 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 或发行版的回移包对比。盘点提示词会让 agent 对每个运行环境都做一遍。
审计会改动我的系统吗?
不会。提示词要求 agent 只读,任何需要 sudo 的命令都要先问你。
我的 PHP 在 NAS、面板或设备里怎么办?
这类 PHP 由厂商更新。到受影响产品列表里找对应产品页,安装厂商的更新。