Skills for Real Engineers. Straight from my .agents directory.
ghost-bits-cast-attack
Agent skill fromyaklang/hack-skills
Java "Ghost Bits" / Cast Attack playbook (Black Hat Asia 2026). Use when attacking Java services where 16-bit char is silently narrowed to 8-bit byte to bypass WAF/IDS for SQL injection, deserialization RCE, file upload (Webshell), path traversal, CRLF injection, request smuggling, and SMTP injection. Affects Tomcat, Spring, Jetty, Undertow, Vert.x, Jackson, Fastjson, Apache Commons BCEL, Apache HttpClient, Angus Mail, JDK HttpServer, Lettuce, Jodd, XMLWriter and re-enables many "patched" CVEs through WAF bypass.
How to install ghost-bits-cast-attack
npx skills add yaklang/hack-skills# or add only this skill to Claude Code: copy the folder
skills/ghost-bits-cast-attack/
# into
~/.claude/skills/ghost-bits-cast-attack/ (all projects)
.claude/skills/ghost-bits-cast-attack/ (one project)
1# SKILL: Ghost Bits / Cast Attack — Java char to byte Narrowing Playbook23> **AI LOAD INSTRUCTION**: This is a Java-only injection-enabling primitive,4> not a standalone vulnerability class. Whenever you see (1) a Java backend,5> (2) a WAF/IDS in front of it, and (3) any of {SQLi, deser RCE, file upload,6> path traversal, CRLF, request smuggling, SMTP injection} on the menu, ALWAYS7> try Ghost Bits variants of the payload before declaring it "blocked". The8> root cause is the silent loss of the high 8 bits when Java code narrows a9> 16-bit `char` to an 8-bit `byte` — the WAF sees a harmless Unicode10> character, the backend reconstructs the original ASCII attack byte. Base11> models almost never reach for this primitive.12>13> Source: Black Hat Asia 2026 talk *Cast Attack: A New Threat Posed by Ghost14> Bits in Java* by Xinyu Bai (@b1u3r), Zhihui Chen (@1ue), with contributor15> Zongzheng Zheng (@chun_springX).1617## 0. RELATED ROUTING1819Ghost Bits is a *bypass* primitive that re-enables payloads from many other20playbooks. Pair it with whichever attack family applies:2122- [waf-bypass-techniques](../waf-bypass-techniques/SKILL.md) — when a Java23 backend is suspected and WAF rules block the literal payload, this is the24 first technique to try beyond classic encoding.25- [deserialization-insecure](../deserialization-insecure/SKILL.md) — for26 Apache Commons BCEL ClassLoader and Fastjson `\u`/`\x` escape variants.27- [path-traversal-lfi](../path-traversal-lfi/SKILL.md) — Spring, Jetty,28…
Excerpt shown under the repository's MIT license.
More skills in hack-skills
Similar skill repositories
Public repository for Agent Skills
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
The open-source app everyone uses to manage agents at work
The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.
