Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
php2shell-scanner — Non-destructive scanner for CVE-2026-109618 / CVE-2026-109619 (PHP core RCE). Subdomain recon via crt.sh + subfinder, robust banner grabbing, version-based detection. | Kitploit
Tools/GitHubGitHub/joasasantos/php2shell-scanner
OSINT (Open Source Intelligence)ReconnaissanceVulnerability ScannersWeb Vulnerability ScannersNetwork MappingVulnerability AnalysisInformation GatheringWeb SecurityPenetration TestingSubdomain Enumeration
GitHub
6923181 day agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
joasasantos/php2shell-scanner

php2shell-scanner

Non-destructive scanner for CVE-2026-109618 / CVE-2026-109619 (PHP core RCE). Subdomain recon via crt.sh + subfinder, robust banner grabbing, version-based detection.

View Repository

php2shell-scanner

Non-destructive scanner (with opt-in probe) for CVE-2026-109618 (RCE via OOM corruption) and CVE-2026-109619 (RCE via stale global state) — core PHP bugs fixed in 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12.

✅ Verified against the official php-src advisories (2026-10-21, Critical). The CVE IDs and the fixed-version table below match upstream exactly.

  • CVE-2026-109618 — GHSA-w8hw-w9fx-j79w
  • CVE-2026-109619 — GHSA-6wmf-4rv5-p3rp

Affected / fixed versions

BranchAffectedFixed
8.2< 8.2.358.2.35
8.3< 8.3.368.3.36
8.4< 8.4.278.4.27
8.5< 8.5.128.5.12
< 8.2EOL — no upstream patchcheck distro/OSV backport

Strategies

ModeWhat it does
LOCALphp -r for exact runtime version, SAPI, memory_limit, post_max_size
REMOTEVersion fingerprint via X-Powered-By / Server headers and exposed phpinfo()
PRESENCEPHP detection without version (PHPSESSID, .php refs, redirects)
BANNERRobust raw-socket banner grab — HEAD/GET/OPTIONS + malformed probe, http/https, error-page disclosure
RECONSubdomain enumeration via crt.sh (Certificate Transparency) with subfinder fallback/merge, then fan-out scan resolving hosts
PROBE(opt-in) Large multipart requests to observe worker instability — may cause DoS

Install

git clone https://github.com/JoasASantos/php2shell-scanner.git
cd php2shell-scanner
# stdlib only — no pip deps.
# Optional recon fallback: ProjectDiscovery subfinder
#   brew install subfinder   (or: go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest)

Usage

# Local runtime check
python3 php2shell_scan.py --local

# Single remote target, look for exposed phpinfo()
python3 php2shell_scan.py https://example.com --phpinfo-paths

# Subdomain recon (crt.sh + subfinder) then scan, 10 threads, JSON out
python3 php2shell_scan.py example.com --recon --threads 10 -o out.json

# Recon only, no scanning
python3 php2shell_scan.py example.com --recon-only

# Target list + forced robust banner grab
python3 php2shell_scan.py -f targets.txt --banner

# OPT-IN load probe (authorized use only — DoS risk)
python3 php2shell_scan.py https://example.com --probe --probe-count 5

Flags

FlagMeaning
--localLocal scan via the php binary
--reconExpand each domain into subdomains (crt.sh + subfinder), then scan resolving hosts
--recon-onlyEnumerate subdomains only, no scanning
--bannerForce robust raw-socket banner grab on every target
--phpinfo-pathsProbe common exposed phpinfo() paths
--deep-versionExtra version techniques: PHP easter eggs + version-leak files (composer.json, .env, …)
--origin-scanReach the PHP origin behind Cloudflare/WAF — direct-to-IP request with the real Host header
--shodan-keyShodan API key for origin intel (or env SHODAN_API_KEY); implies --origin-scan
--censys-id / --censys-secretCensys API creds (or env CENSYS_API_ID / CENSYS_API_SECRET); imply --origin-scan
--probeMultipart load probe — DoS risk, authorized only
--probe-count NNumber of probe requests (default 5)
--threads N / --timeout NConcurrency / per-request timeout
--insecureDo not validate TLS
-o FILE / --csv FILESave JSON / CSV report

Passive enrichment

Beyond the version check, each target is enriched with passive signals (from normal responses) that refine the verdict and cut false positives:

  • SAPI / worker model — persistent workers (fpm, mod_php) reuse request state → exposed to CVE-2026-109619; plain cgi far less.
  • CDN / WAF / proxy (Cloudflare, Akamai, Fastly, Sucuri…) — banner may be the edge, not the origin → confidence lowered.
  • Distro build (ubuntu, +deb, .el8…) — backport may fix without a version bump → confidence lowered, "verify the changelog" note.
  • Deep phpinfo (when exposed) — Server API, post_max_size / max_input_vars (OOM surface for CVE-2026-109618), disable_functions.

More version techniques (--deep-version)

When no banner version: PHP easter eggs (?=PHPE9568F34-... → GIF/credits on expose_php=On) and version-leak files (composer.json, .env, …; .env PHP_VERSION = exact, a "php": ">=8.2" constraint only narrows branch).

Origin / WAF bypass (--origin-scan)

CDNs hide the origin, so a header read only shows the edge. --origin-scan:

  1. resolves apex, www, non-proxied prefixes (origin.*, cpanel.*, mail.*…) and recon subdomains;
  2. drops IPs in Cloudflare / Imperva / Sucuri edge ranges (IPv4 + IPv6);
  3. requests each remaining origin IP directly with the real Host + SNI, reading Server / X-Powered-By / error pages straight from the origin.

A direct request to an already-exposed IP. Authorized targets only.

Credentialed intel adds IPs DNS never exposes, plus a PHP version from the indexed banner (flagged intel — may be stale):

  • --shodan-key / env SHODAN_API_KEY — hosts by hostname:<domain>.
  • --censys-id + --censys-secret / env CENSYS_API_ID + CENSYS_API_SECRET — hosts by TLS-cert / DNS name.
  • Any credential auto-enables --origin-scan.
export SHODAN_API_KEY=xxx CENSYS_API_ID=xxx CENSYS_API_SECRET=xxx
python3 php2shell_scan.py hackersec.com --origin-scan

Confidence grade

ConfidenceMeaning
HIGHversion from exposed phpinfo() or a PHP error page
MEDIUMversion from an HTTP banner (expose_php=On)
LOWinference only, or behind a proxy, or a distro backport may apply

The consolidated output groups targets by severity, sorts VULNERABLE by confidence (HIGH first), and flags LOW/MEDIUM results to re-check before reporting.

Detection logic

Version comparison per branch against the FIXED table:

  • < fixed on a supported branch → VULNERABLE
  • >= fixed → PATCHED
  • < 8.2 (EOL) → VULNERABLE_EOL (no upstream patch; check distro/OSV backport)
  • branch above advisory range or no version → UNKNOWN / SUSPECTED

Authorization

Run only against assets you own or are explicitly permitted to test. The --probe mode can disrupt fragile workers. You are responsible for your use.

License

MIT

Download Tool