POC详情: fb2872e1d068fc2b6de492a45f193f46b3816028

来源
关联漏洞
标题: 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头利用该漏洞执行任意命令。
介绍
# CVE-2017-5638

This script is intended to validate Apache Struts 2 vulnerability (CVE-2017-5638), AKA Struts-Shock. This is a completely harmless as it does not inject any malicious payload, only inject an HTTP header named 'STRUTS2-VALIDATION' in order to be able to validate whether is vulnerable

Because of its multithread capability, it's able to run 2.5k+ applications spread around the globe in less than 10 minutes. So, it can be very handy to validate enterprise applications in large scale.


## Usage
There are two ways to run this script, with and without threading, the only difference will the execution time. To enable the threading feature, just need to pass the thread parameter.
The first parameter must be a TXT file containing all targeted URL, one per line. Please note that these URL should be complete, for example, ```https://target.com/admin/myStrutsPage.action```


Here is a usage example without threading:
```python
struts-shock-validation.py target_urls.txt
```

Now using threads capability:
```python
struts-shock-validation.py target_urls.txt thread
```


## Results
it will automatically create a folder called results, and on each execution will create a dated folder containing the execution outcome. If threading is enabled, it will create on file per thread named thread_<number>, which can be ignored because when it completes it will consolidate all threads result on single TXT file with the same name (date/timestamp) as its execution folder.
文件快照
 [4.0K]  /data/pocs/fb2872e1d068fc2b6de492a45f193f46b3816028
├── [1.5K]  README.md
└── [8.7K]  struts-shock-validation.py

0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。