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-detections — Suricata rules + CI-proven regression suite for the php2shell PHP RCE chain (CVE-2026-109619 / CVE-2026-109618) | Kitploit
Tools/GitHubGitHub/solidevil14/php2shell-detections
Defensive ToolsVulnerability AnalysisExploitationWeb SecurityFuzzingNetwork SecurityThreat IntelligenceIntrusion DetectionIncident Response
Share
GitHubsolidevil14/php2shell-detections

php2shell-detections

Suricata rules + CI-proven regression suite for the php2shell PHP RCE chain (CVE-2026-109619 / CVE-2026-109618)

View Repository
24 days agoNot yet reviewed

php2shell-detections

rules-regression suricata license

Suricata signature set for detecting php2shell — the unauthenticated PHP RCE chain targeting session.upload_progress (CVE-2026-109619 / CVE-2026-109618, CVSS 9.2) — shipped with a reproducible test harness that proves detection coverage and false-positive behavior on every commit.

Every signature is derived from the toolkit's own request/response builders (lib/chain.py, lib/oomprobe.py, lib/memprobe.py, lib/detect.py) — auditable, versioned against an upstream pin, and regression-tested in CI against byte-exact exploit traffic and the real CLI end-to-end.

Scope. This is defensive tooling (blue/purple team). The harness only ever talks to a local mock target. Pointing php2shell at systems you do not own or lack written authorization for is a crime (CFAA, UU ITE, etc.).


Detection coverage

TierSIDsWhat it catches
A — exploit chain1100001–1100006the full 3-stage RCE chain: heap-groom requests, forged-boundary multiparts, leaked PHPSESSID heap pointers in responses
B — active scanner1100007–1100010detect/preflight probes: nested-62 array keys, tool boundaries, transport quirks
C — target state1100012–1100014vulnerable-server responses: OOM-fatal inside the multipart parser, worker-abort correlation, probe field-pairing

Validated matrix (Suricata 7.0.10, CI-asserted):

attack.pcap  (11 streams, full chain)   -> 28 alerts, 13/13 alert rules
attack-real (real CLI, 32 conns)        -> 63 alerts, 13/13 alert rules
benign.pcap  (FP regression set)        ->  0 alerts
Per-SID breakdown
SIDSignalHits (synthetic / real CLI)
1100001chain groom request — boundary S×173 / 6
1100002chain forge request — boundary B×10 + PHPSESSID form-data3 / 7
1100003worker-rotate request — boundary BNDRY123451 / 3
1100004heap-leak response — Set-Cookie: PHPSESSID= ≥990B2 / 1
1100005leaked cookie carrying %7F-encoded pointer (libphp-base leak)2 / 2
1100006oversized multipart (>10MB) + upload_progress (flowbit pair)1 / 4
1100007nested-62 array key a[b][b]… (active OOM scanner)2 / 6
1100008detect probe — boundary ----php2shellprobe1 / 3
1100009memory_limit probe — P2SMEMPROBE / p2smem1 / 1
1100010quoted single-char boundary (boundary="x")2 / 6
1100012OOM fatal inside the multipart parser (Unknown location)¹1 / 1
1100013worker-abort 5xx differential (xbits correlation)4 / 10
1100014PHP_SESSION_UPLOAD_PROGRESS + PHPSESSID form-field pairing5 / 13
1100015flowbit setter p2s_bigpost (state only, no alert)– / –

¹ threshold limit 1/60s by_dst — a 3-probe scanner burst yields one alert.

Counts are from the CI-validated baseline (Suricata 7.0.10). Synthetic-pcap counts are deterministic; real-CLI counts vary by ±1–2 per run (the toolkit jitters timing and retries stages) — the CI suite asserts minimums, not exact equality.

False-positive guards. The benign regression set (normal browser uploads using the legitimate session.upload_progress feature, normal PHPSESSID cookies, application-level OOM fatals with real file paths, 11MB uploads without upload-progress) produces zero alerts. Discriminators are documented per-SID in docs/SIGNALS.md.


MITRE ATT&CK mapping

Every rule carries native mitre_attack_phase metadata (ET-Open convention), so SIEM/EDR correlation engines can consume the mappings directly:

TierTechniques
A — exploit chain (1100001–1100006)T1190 Exploit Public-Facing Application; T1059.004 Unix Shell on the forge requests (stage-3 carries the system() payload)
B — active scanner (1100007–1100010, 1100014)T1595.002 Vulnerability Scanning
C — target state (1100012–1100013)T1190 (server-side evidence of exploitation)

Per-SID mappings are in the SID registry.


How the harness works

┌───────────────────────────────────────────────────────────────────────┐
│  synthetic suite                                                      │
│                                                                       │
│  lib.chain / lib.oomprobe (upstream, pinned commit)                   │
│        │  byte-exact request builders                                 │
│        ▼                                                              │
│  gen_traffic.py ──► attack.pcap ──┐   benign.pcap ──┐                 │
│                                   ▼                 ▼                │
│                     suricata -r (offline, 7.0.10)                     │
│                                   │                 │                │
│                                   ▼                 ▼                │
│                     assert 13/13 SIDs      assert 0 alerts           │
└───────────────────────────────────────────────────────────────────────┘

┌───────────────────────────────────────────────────────────────────────┐
│  real-tool end-to-end                                                 │
│                                                                       │
│  php2shell CLI (detect → preflight → exploit)                         │
│        │  plain HTTP, wire-exact                                      │
│        ▼                                                              │
│  mock_target.py (vulnerable-state replica: OOM-fatal parser,          │
│                  heap-leak cookies, proof channel)                    │
│        ▼                                                              │
│  tee_proxy.py ──► recorded wire bytes ──► attack-real.pcap ──►        │
│  suricata -r ──► assert every alert SID ≥ 1                           │
└───────────────────────────────────────────────────────────────────────┘

The synthetic path guarantees byte-identical traffic (it imports the upstream builders); the real-tool path proves the whole pipeline against the actual CLI — including retry loops, jittered timing, and the final PROOF: uid=33(www-data) in the mock.


Quick start

Requirements: python3 (≥3.10), git, Suricata ≥ 7.0.10.

# 1) fetch the upstream reference (read-only consumer, used to build pcaps)
git clone --depth 1 https://github.com/aarsaputra/php2shell.git /tmp/php2shell

# 2) synthetic + benign regression (fast, ~30s)
P2S_REPO=/tmp/php2shell python3 lab/test_matrix.py --skip-real

# 3) full suite incl. the real CLI end-to-end
python3 -m venv /tmp/php2shell/.venv
/tmp/php2shell/.venv/bin/pip install -r /tmp/php2shell/requirements.txt
P2S_REPO=/tmp/php2shell python3 lab/test_matrix.py

Expected:

[attack] alerts-by-sid: {1100001: 3, 1100002: 3, ...} total: 28
[benign] alerts-by-sid: {} total: 0
[PASS] test_matrix: attack coverage complete, benign clean, real-tool end-to-end ok

Environment knobs: SURICATA_BIN, SURICATA_CONF, P2S_REPO, P2S_PY, OUT_DIR — see the headers of the lab/ scripts.


Production deployment

Install the rules and apply the mandatory libhtp tuning:

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    903
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    842
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    446
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    429
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    397

Explore all tools

Browse our collection of tools

View all tools →