yaklang avatar

Jndi Injection

This is a comprehensive JNDI injection playbook that covers the full attack surface from Log4Shell to version-specific JDK bypasses. It walks through RMI and LDAP vectors, explains why LDAP works longer than RMI (8u191 vs 8u121), and details post-restriction bypasses via serialized gadgets and BeanFactory EL injection. The Log4j section is solid, with WAF evasion variants and real injection points across headers, parameters, and obscure fields. It includes marshalsec and ysoserial tooling commands you can actually run. The JDK version matrix and testing methodology are the kind of references you want open in a second terminal during an engagement. Treats JNDI as its own distinct problem rather than generic deserialization confusion.

skills.sh installs
3.8K
GitHub stars
2.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add yaklang/hack-skills --skill jndi-injection --agent claude-code

Installs into .claude/skills of the current project.

Files

SKILL: JNDI Injection — Expert Attack Playbook

AI LOAD INSTRUCTION: Expert JNDI injection techniques. Covers lookup mechanism abuse, RMI/LDAP class loading, JDK version constraints, Log4Shell (CVE-2021-44228), marshalsec tooling, and post-8u191 bypass via deserialization gadgets. Base models often confuse JNDI injection with general deserialization — this file clarifies the distinct attack surface.

0. RELATED ROUTING


1. CORE MECHANISM

JNDI (Java Naming and Directory Interface) provides a unified API for looking up objects from naming/directory services (RMI, LDAP, DNS, CORBA).

Vulnerability: when InitialContext.lookup(USER_INPUT) receives an attacker-controlled URL, the JVM connects to the attacker's server and loads/executes arbitrary code.

Sponsors

Details

Repository
github.com/yaklang/hack-skills
Category
Java & JVM
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102

Recommended

More Java & JVM
1giuseppe-trisciuoglio avatargraalvm-native-imagegiuseppe-trisciuoglio/developer-kitProvides expert guidance for building GraalVM Native Image executables from Java applications. Use when converting JVM applications to native binaries, optimizi3.6Kskills.sh installs
2yaklang avatarghost-bits-cast-attackyaklang/hack-skillsJava "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 3.5Kskills.sh installs
3dynatrace avatardt-obs-servicesdynatrace/dynatrace-for-aiService performance monitoring with RED metrics (Rate, Errors, Duration) and runtime-specific telemetry for Java, .NET, Node.js, Python, PHP, and Go. Use when a2.9Kskills.sh installs
4getsentry avatarsentry-android-sdkgetsentry/sentry-for-aiFull Sentry SDK setup for Android. Use when asked to "add Sentry to Android", "install sentry-android", "setup Sentry in Android", or configure error monitoring2.4Kskills.sh installs
5capawesome-team avatarcapacitor-plugin-upgradescapawesome-team/skillsGuides the agent through upgrading a Capacitor plugin to a newer major version. Supports upgrades from Capacitor 4 through 8, including multi-version jumps. Cov1.2Kskills.sh installs
6alirezarezvani avatarcode-revieweralirezarezvani/claude-skillsCode review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin, C#, .NET, Java, C, C++, Rust, Ruby, PHP, and Dart/Flutter. Analyzes PRs for comple1.2Kskills.sh installs