POC详情: d9d7836440413c2ddd327ff98a00cf8c01cccd88

来源
关联漏洞
标题: Apache Struts 2 输入验证错误漏洞 (CVE-2017-5638)
描述:Apache Struts是美国阿帕奇(Apache)软件基金会的一个开源项目,是一套用于创建企业级Java Web应用的开源MVC框架,主要提供两个版本框架产品,Struts 1和Struts 2。 Apache Struts 2 2.3.32之前的2 2.3.x版本和2.5.10.1之前的2.5.x版本中的Jakarta Multipart解析器存在安全漏洞,该漏洞源于程序没有正确处理文件上传。远程攻击者可借助带有#cmd=字符串的特制Content-Type HTTP头利用该漏洞执行任意命令。
描述
Exploitable target to CVE-2017-5638
介绍
## Exploit Demo for CVE-2017-5638
[![DepShield Badge](https://depshield.sonatype.org/badges/Iletee/struts2-rce/depshield.svg)](https://depshield.github.io)

Completely based on https://github.com/piesecurity/apache-struts2-CVE-2017-5638

### Usage:
Pre-requisites: have python, docker, maven and a jdk installed

1. clone this repo
1. run mvn clean package in project root
1. run docker build -t hack \.
1. run docker run -d -p 8080:8080 hack
1. once container comes online - verify by running in browser

To begin testing RCE - run the exploit.py file. 

1. python exploit.py http://myserver:8080/orders/3 "CMD" 

Try with different CMDs like
* pwd - where are we?
* whomai - what user are we running this?
* ls -la - what's in my directory?
* ls / - what's my machine
* ls /etc - what else we can find?




README.txt - Rest Showcase Webapp

Rest Showcase is a simple example of REST app build with the REST plugin.

For more on getting started with Struts, see 

* http://cwiki.apache.org/WW/home.html

I18N:
=====
Please note that this project was created with the assumption that it will be run
in an environment where the default locale is set to English. This means that
the default messages defined in package.properties are in English. If the default
locale for your server is different, then rename package.properties to package_en.properties
and create a new package.properties with proper values for your default locale.
文件快照

[4.0K] /data/pocs/d9d7836440413c2ddd327ff98a00cf8c01cccd88 ├── [ 316] Dockerfile ├── [2.0K] exploit.py ├── [2.4K] Jenkinsfile ├── [9.9K] LICENSE.txt ├── [5.3K] pom.xml ├── [1.4K] README.md └── [4.0K] src ├── [4.0K] main │   ├── [4.0K] java │   │   └── [4.0K] org │   │   └── [4.0K] demo │   │   └── [4.0K] rest │   │   └── [4.0K] example │   │   ├── [ 414] IndexController.java │   │   ├── [1.8K] Order.java │   │   ├── [2.6K] OrdersController.java │   │   └── [ 794] OrdersService.java │   ├── [4.0K] resources │   │   ├── [ 533] log4j2.xml │   │   ├── [1.6K] struts.xml │   │   └── [ 73] velocity.properties │   └── [4.0K] webapp │   ├── [4.0K] css │   │   ├── [ 90] app.css │   │   ├── [138K] bootstrap.css │   │   ├── [372K] bootstrap.css.map │   │   ├── [115K] bootstrap.min.css │   │   ├── [ 22K] bootstrap-theme.css │   │   ├── [ 42K] bootstrap-theme.css.map │   │   └── [ 19K] bootstrap-theme.min.css │   ├── [4.0K] fonts │   │   ├── [ 20K] glyphicons-halflings-regular.eot │   │   ├── [106K] glyphicons-halflings-regular.svg │   │   ├── [ 44K] glyphicons-halflings-regular.ttf │   │   ├── [ 23K] glyphicons-halflings-regular.woff │   │   └── [ 18K] glyphicons-halflings-regular.woff2 │   └── [4.0K] WEB-INF │   ├── [4.0K] content │   │   ├── [1.7K] orders-deleteConfirm.jsp │   │   ├── [2.9K] orders-edit.jsp │   │   ├── [2.5K] orders-editNew.jsp │   │   ├── [2.3K] orders-index.jsp │   │   └── [1.8K] orders-show.jsp │   └── [1.5K] web.xml └── [4.0K] test └── [4.0K] java └── [4.0K] it └── [4.0K] org └── [4.0K] apache └── [4.0K] struts2 └── [4.0K] rest └── [4.0K] example ├── [ 786] GetOrdersTest.java ├── [1.1K] ListOrdersTest.java ├── [ 310] ParameterUtils.java └── [4.5K] PostOrderTest.java 21 directories, 35 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。