Skip to content

Releases

Download Toolkit

Choose a tag to compare

@tc4dy tc4dy released this 19 Nov 12:09
2b03e32
java4shell

[</>] Tools

Tool Purpose Intended User
exploit.py Red team toolkit. Environment check, bounded probe, crash test, mitigation control, experimental remote probe. Single command with --mode or direct flags. Red teams, blue teams, authorized pentesters
--mode check Local JDK version and CPU flag inspection. Reports CANDIDATE or LIKELY_SAFE. Blue teams, auditors
--mode detect Compiles and runs the bounded Base64Trigger.java against the local JVM. Reports REPRODUCED or NOT_REPRODUCED. Red teams, blue teams
--mode crash Runs the same trigger without a safety bound to provoke a SIGSEGV in the JVM. Confirms the overflow reached adjacent heap. Red teams (Prob)
--mode control Runs the trigger with -XX:-UseBASE64Intrinsics. Confirms the mitigation disables the vulnerable path. Blue teams
--mode exec Experimental remote probe. Does not implement a working RCE chain. Red teams (Experimental)
scanner.py Non-intrusive remote scanner. Reads Java version hints from Server, X-Powered-By, X-Application-Context, Via. Never sends a trigger. Blue teams, auditors
poc.py Safe local proof. Compiles and runs Base64Trigger.java with a 4096-byte destination. Reports REPRODUCED, NOT_REPRODUCED, or INCONCLUSIVE. Researchers, blue teams
--json Save the run to JSON. Chosen by output file extension in scanner.py. Red teams, blue teams

Reliability labels

Label Meaning
(unlabelled) Deterministic. Same input, same output.
(Prob) Outcome can vary between runs. The tool repeats attempts for a bounded duration.
(Partial) Depends on correct input. The tool works when a valid pcap, a matching System.map, or a reachable target is provided.
(Experimental) The mode does not implement the primitive it is named after. It probes for a hypothetical interface only.

[>] Feature Matrix

Feature Status Note
Local JDK version check Deterministic Reads java -version, parses version, compares to VULN_RANGES.
CPU flag check Deterministic Reads /proc/cpuinfo on Linux, sysctl on macOS, wmic on Windows.
Bounded local probe (poc.py) Deterministic Compiles and runs Base64Trigger.java with a 4096-byte destination.
Crash test (--mode crash) Deterministic Runs the trigger without the safety bound. Looks for SIGSEGV or hs_err_pid*.log.
Mitigation control (--mode control) Deterministic Runs the trigger with -XX:-UseBASE64Intrinsics. Expects NOT_REPRODUCED.
Remote version probe Deterministic Reads Server, X-Powered-By, X-Application-Context, Via.
Remote RCE chain (Experimental) Does not implement a chain. Sends a JSON body to / and reports the HTTP status.
Heap grooming Not implemented Target-specific. Requires per-target profiles not shipped here.
Heap leak ("JavaBleed") Not implemented Target-specific. Requires heap grooming and a controlled reader.
JIT code cache overwrite Not implemented Target-specific. Requires a controlled write primitive.
Mass scan Deterministic scanner.py --file targets.txt --threads N.
JSON report Deterministic --json or -o out.json.
CSV report Deterministic scanner.py -o audit.csv.
Proxy / Tor / jitter Deterministic Applied to every network operation.
tool