
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-codeInstalls 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
- deserialization-insecure when JNDI leads to deserialization (post-8u191 bypass path)
- expression-language-injection when the JNDI sink is reached via SpEL or OGNL expression evaluation
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- Http2 Specific Attacks3.8K
- Saml Sso Assertion Attacks3.8K
- Arbitrary Write To Rce3.8K
- Active Directory Certificate Services3.8K
- Hash Attack Techniques3.8K
- Prototype Pollution3.8K
- Dns Rebinding Attacks3.8K
- Network Protocol Attacks3.8K
- Ai Ml Security3.8K
- Memory Forensics Volatility3.8K
- Dangling Markup Injection3.8K
- Windows Av Evasion3.8K
- Defi Attack Patterns3.8K
- Windows Privilege Escalation3.8K
- Email Header Injection3.8K
- Xslt Injection3.8K
- Type Juggling3.8K
- Linux Lateral Movement3.8K
- Container Escape Techniques3.8K
- Classical Cipher Analysis3.7K
- Linux Security Bypass3.7K
- Tunneling And Pivoting3.7K
- Prototype Pollution Advanced3.7K
- Steganography Techniques3.7K