Find web-facing services.
Check TCP ports 80, 443, 8080 and 8443, then make a bounded HTTP request. Configure additional ports, timeouts and concurrency for your environment.
PHP SECURITY / READ-ONLY AUDIT
Turn PHP2Shell uncertainty into a clear inventory. Discover PHP services, collect version evidence and prepare your next remediation step.
CVE-2026-109618 CVE-2026-109619
Two scripts. Linux + Windows. Reports stay on your machine.
$ bash php_audit.sh '192.168.1.0/24' en
SCOPE Authorized IPv4 targets
OUTPUT report.html + report.csv
↳ Review evidence. Prioritize remediation.
BUILT FOR THE FIRST RESPONSE
Run from one machine inside an authorized network. No central infrastructure or Ansible required.
Check TCP ports 80, 443, 8080 and 8443, then make a bounded HTTP request. Configure additional ports, timeouts and concurrency for your environment.
Look for PHP and application hints. With existing, authorized SSH or WinRM access, collect runtime, package and service evidence, subject to permissions.
Open a local HTML report with expandable evidence and recommendations. Use the CSV for follow-up. Choose English or Portuguese when you run the script.
WordPress · Nextcloud · Joomla · Drupal · Laravel · Magento · MediaWiki · phpBB · WHMCS
Fingerprints are indicators, not proof of an installation or a vulnerability.THE PHP2SHELL VULNERABILITIES
PHP2Shell refers to two critical PHP vulnerabilities that can allow unauthenticated remote code execution. Updating a PHP application alone does not establish that its underlying PHP runtime is fixed.
Read the PHP security advisory| PHP branch | First fixed release |
|---|---|
| 8.2 | 8.2.35 ↗ |
| 8.3 | 8.3.36 ↗ |
| 8.4 | 8.4.27 ↗ |
| 8.5 | 8.5.12 ↗ |
Use these releases or newer stable releases in the same branch. For PHP 8.1 and earlier, verify vendor support and backports or migrate to a supported branch.
Debian, Ubuntu and RHEL packages may include backported fixes. Confirm coverage for both CVEs against your vendor's advisory and the web runtime actually serving requests.
QUICK START
Download the script for your operating system, review it, then open a terminal in its folder. No code editing required.
Bash script
RUN WITH YOUR AUTHORIZED TARGETS
bash php_audit.sh '192.168.1.0/24' enReplace 192.168.1.0/24 with your scope. Use pt for a Portuguese report. Without arguments, the script asks for both.
Bash 3.2+, curl 7.21+ with HTTPS, coreutils (including timeout and mktemp), awk, grep and sed.
For optional Linux inventory, use an existing SSH key or agent and verified host keys:
bash php_audit.sh '192.168.1.10' en --ssh-user auditorNo sudo or password prompts. Insufficient access leaves missing evidence inconclusive.
PowerShell script
RUN WITH YOUR AUTHORIZED TARGETS
.\PHP-Audit.ps1 '192.168.1.0/24' enOr open the script in PowerShell ISE and press F5. Enter your targets and choose en or pt when prompted.
Windows PowerShell 5.1 with .NET Framework 4.7.2+, or PowerShell 7 on Windows. Follow your organization's script execution policy.
For optional Windows inventory, use existing authorized PowerShell Remoting:
.\PHP-Audit.ps1 '192.168.1.10' en -Credential (Get-Credential) -UseSSLThe script does not change WinRM, firewall rules or TrustedHosts.
Use IPv4 addresses you are authorized to audit.
192.168.1.10'192.168.1.10,192.168.1.20''192.168.1.10-30''192.168.1.0/24'report.html.The printed output path points to reports/<timestamp>/ beside your script. A CSV is saved there too. Keep reports and target lists private.
The built-in self-test checks version and classification logic, then generates clearly marked simulated reports. It makes no network requests.
bash php_audit.sh --self-test en.\PHP-Audit.ps1 -SelfTest -Language enREAD THE RESULT CORRECTLY
No PHP detected does not mean no vulnerability. A CLI version or HTTP banner alone never proves that a website is fixed.
An older PHP version needs review. Check vendor backports and confirm the web runtime before drawing a conclusion.
Missing versions, unreachable hosts and CLI-only findings remain inconclusive. A fixed-looking banner is insufficient too.
Confirmed states require reviewed, matching web-runtime evidence for both CVEs. The tool does not automatically certify vendor backports or an entire server.
Coverage limits: name-based/SNI virtual hosts, proxies, hidden installations, other paths and restricted containers may be missed. Public exposure can be declared by the technician; it is not tested from the Internet.
A FEW IMPORTANT DETAILS
No. It inventories services and collects evidence to support remediation decisions. It does not install, update, restart or change target servers. Plan and validate updates separately with your vendor.
No. Network discovery uses TCP checks and a bounded GET request to the root path. There are no exploits, DoS tests or WAF bypass attempts. Optional SSH and WinRM collection uses existing authorized access.
No credentials are needed for web discovery. Remote Linux inventory uses SSH keys or an agent; remote Windows inventory uses existing WinRM access. Passwords are not written to the reports or logs.
Yes. Defaults are 80, 443, 8080 and 8443, with eight concurrent workers and a limit of 4,096 IPv4 addresses. Use Bash --ports / --concurrency or PowerShell -Ports / -Concurrency. Consult the README for TLS ports and timeouts.
MAKE THE NEXT STEP AN INFORMED ONE
Review the code. Audit your authorized scope. Plan the fix.