jndi-injection

Detect and exploit JNDI injection in Java applications via RMI and LDAP.

120|8|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/Prohao42/aimy-skill --skill jndi-injection-prohao42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jndi-injection
Source: https://github.com/Prohao42/aimy-skill/tree/main/ai-mian/hack-skills/skills/jndi-injection
Command: npx skills add https://github.com/Prohao42/aimy-skill --skill jndi-injection-prohao42

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires marshalsec, ysoserial, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expert-level JNDI injection techniques, clarifying the distinct attack surface for Java applications vulnerable to JNDI lookups with attacker-controlled names.

Core Features & Use Cases

  • JNDI Lookup Mechanism Abuse: Covers lookup mechanism abuse, RMI/LDAP class loading, JDK version constraints, and Log4Shell (CVE-2021-44228) bypass.
  • Attack Vectors: RMI, LDAP, DNS, and post-8u191 bypass via deserialization gadgets.
  • Tooling: marshalsec, JNDI-Injection-Exploit, and Rogue JNDI for testing and exploitation.
  • Log4Shell (CVE-2021-44228): Detection payloads, WAF bypass variants, and real-world case studies.

Quick Start

Use the jndi-injection skill to test for JNDI injection vulnerabilities in a Java application.

Frequently Asked Questions about jndi-injection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does JNDI injection differ from Java deserialization exploits?

JNDI injection targets the Java Naming and Directory Interface lookup mechanism with attacker-controlled names to load remote classes via RMI or LDAP, which is a distinct attack surface from base deserialization vulnerabilities despite sharing similar gadget chains.

How do I exploit Log4Shell CVE-2021-44228 bypasses in Java applications?

Log4Shell bypass involves using detection payloads and WAF evasion variants that abuse JNDI lookups via RMI, LDAP, or DNS, often requiring tools like marshalsec or Rogue JNDI to serve malicious classes to the vulnerable Java application.

Do I need marshalsec and ysoserial to perform JNDI injection testing?

Yes, marshalsec and ysoserial are required dependencies for JNDI injection exploitation, providing the necessary gadget chains and rogue directory services to achieve remote code execution through RMI, LDAP, and post-8u191 bypass vectors.

What are the JDK version constraints for RMI and LDAP JNDI injection?

JDK version constraints restrict direct remote class loading via RMI and LDAP in Java versions post-8u191, requiring attackers to bypass these limitations using deserialization gadgets from ysoserial to achieve remote code execution.

Can I use JNDI-Injection-Exploit with DNS lookups for WAF bypass?

Yes, JNDI-Injection-Exploit and Rogue JNDI support RMI, LDAP, and DNS vectors for testing JNDI injection, providing WAF bypass variants and detection payloads to validate vulnerabilities in Java applications.