Skip to content
errorfoPublic

About

PHP2Shell Sentinel is an open-source defensive security tool for PHP administrators to assess runtime patch status, review logs, identify suspicious file changes, and investigate potential exploitation indicators related to CVE-2026-109618 and CVE-2026-109619. Built with Bash for authorized, read-only security triage.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

PHP2Shell Sentinel

A defensive, read-only triage helper for administrators investigating PHP runtime exposure and possible post-exploitation indicators.

Status: Early prototype. Review and test on systems you administer before relying on its output.

PHP2Shell Sentinel checks local PHP CLI/FPM version signals, selected PHP error logs, common Linux web access logs, selected web-root integrity clues, and a few persistence indicators. It does not send network requests, execute exploit payloads, or attempt to prove remote exploitability.

Features

  • Checks PHP CLI/FPM binaries found in common Linux locations.
  • Compares detected upstream versions against configurable fixed-version thresholds included in the script.
  • Reviews common PHP/FPM logs for memory-related errors.
  • Summarizes POST request counts in common Nginx/Apache logs.
  • Optionally checks a supplied web root for Git working-tree changes and PHP files in commonly writable directories.
  • Reviews selected cron and SSH authorized-key locations.
  • Prints findings, warnings, skipped checks, and limitations.

Important limitations

  • This is a Linux-oriented local triage script, not a remote website scanner.
  • It is not designed for Windows/IIS/Plesk hosts.
  • It does not prove that PHP2Shell is present or that exploitation occurred.
  • Memory errors, POST requests, changed files, cron entries, and SSH keys can all have legitimate explanations. Treat them as leads to investigate, not proof.
  • Upstream version comparisons can produce false positives when Linux distributions or hosting vendors backport security fixes. Check the vendor advisory and package changelog.
  • It does not comprehensively inspect every log source, container, PHP SAPI, or persistence mechanism.
  • A clean report does not prove that a host is uncompromised.

Requirements

  • Bash 4+ recommended
  • Linux
  • Standard utilities such as grep, find, sort, awk, sed
  • Optional: dpkg for Debian-style version comparison and git for working-tree review

Usage

Clone the repository:

git clone https://github.com/YOUR_GITHUB_USERNAME/php2shell-sentinel.git
cd php2shell-sentinel

Run against the local server you administer:

bash scripts/php2shell-sentinel.sh

Pass a web root to inspect:

sudo bash scripts/php2shell-sentinel.sh /var/www/example

The script reads local files and logs. Root access may expose more logs, but only run it on a server where you have authorization. Review the source before using sudo.

Recommended workflow

  1. Confirm the host and application are within your authorized scope.
  2. Preserve relevant logs and snapshots if you suspect a compromise.
  3. Run the script on the server that actually hosts PHP—not on your laptop when the target is remote.
  4. Validate version findings against the operating-system or hosting vendor's security advisory and package changelog.
  5. Investigate each warning manually and document benign explanations.
  6. If compromise is suspected, follow your incident-response process and rotate secrets from a trusted administrative environment.

Reporting bugs

Please include:

  • OS and version
  • Bash version (bash --version)
  • PHP package/runtime information (redact secrets)
  • The relevant output section
  • Steps to reproduce on a system you administer

Do not post session cookies, credentials, API keys, private IP information, or unredacted logs.

Disclaimer

This project is intended for defensive administration and authorized incident response. You are responsible for ensuring you have permission to inspect the system. The tool is provided “as is”, without warranty, and is not a substitute for vendor guidance, forensic analysis, or a professional incident-response process.

License

MIT. See LICENSE.

About

PHP2Shell Sentinel is an open-source defensive security tool for PHP administrators to assess runtime patch status, review logs, identify suspicious file changes, and investigate potential exploitation indicators related to CVE-2026-109618 and CVE-2026-109619. Built with Bash for authorized, read-only security triage.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages