Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

Source
Associated Vulnerability
Title:Apache Struts 2 输入验证错误漏洞 (CVE-2017-5638)
Description:The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content-Type header containing a #cmd= string.
Description
Strutsy - Mass exploitation of Apache Struts (CVE-2017-5638) vulnerability
Readme
# Strutsy
Strutsy - Mass exploitation of Apache Struts (CVE-2017-5638) vulnerability. Includes **blind** and **time based code injection** techniques which significantly reduces false negatives. Other features include mass URL imports to scan multiple targets in one go.

## Usage: 
### python strutsy.py *urls.txt windows/linux/default ip-address*

*All parameters are required.*

1. urls.txt - file containing the urls that are to be tested.
2. platform - should include either windows/linux/default. Use default if you are not sure if it's a windows or linux enviornment.
3. ip-address - public facing ip-address required to test blind injection. Please note apache should be installed and the apache log files should be readable in-order to read the http request. If you donot wish to test against this feature input an arbitary ip-address.  

urls.txt:
1. Search for vulnerable struts application from Google dork: 
Google Dork syntax: inurl:"struts" filetype:action 
   I used pagodo (https://github.com/opsdisk/pagodo)to save the output: 
   python pagodo.py  -g dork.txt -l 200 -s -e 35.0 -j 1.1 >> urls.txt

2. Import URLs from Burp Suite after crawling your target.

3. Include the URL you wish to scan by manually including it in url.txt file.

This module exploits vulnerable Apache Struts (CVE-2017-5638) which fails to validate Content-Type HTTP headers resulting in arbitrary command execution. 
The original exploit (https://www.exploit-db.com/exploits/41570/) has been modified to include blind and time based blind command injection for windows and linux platforms. 
Please note the tool actively exploits the remote system hence please ensure you have permission to scan the target first before using this tool. 
 
Vulnerable Apache struts versions:  2.3.5 through 2.3.31 and 2.5 through 2.5.10.

Tested on Windows 2008 and linux platforms.
File Snapshot

[4.0K] /data/pocs/ec15eea819665bf032f030d994d985ee3e762902 ├── [1.0K] LICENSE ├── [1.8K] README.md ├── [4.6K] strutsy.py └── [4.0K] ThreatDragonModels └── [4.0K] sample Threat model └── [ 15K] sample Threat model.json 2 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →