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

Goal: 1000 CNY · Raised: 1310 CNY

100%

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.
Readme
# CVE-2017-5638

## Table of Contents
1. [Overview](#section-features)
2. [Dependencies](#section-dependencies)
3. [Usage](#section-usage)

## [Overview](id:section-featuers)

This project is a prove-of-concept for the Apache Struts vulnerabilty.
The goal was to create software that can generate and test random IPs for the vulnerabilty described above.


Use this project on your own risk and for educational purpose only.

## [Dependencies](id:section:dependencies)

* cURL
  * cURL is used to send the crafted header to a certain IP address on a certain Port.
  
* Nmap
  * Nmap is used to create the random IP addresses that contains an open port 80 or 443.

## [Usage](id:section-usage)

**Generate random IPs and save them to a text file.**
```bash
./get_ip.sh [Number of hosts to scan] [What port to scan] [Filename to write output]
```

```bash
./get_ip.sh 10000 80 output.txt
```

**Check for vulnerability for a specific IP address.**
```bash
./struts_check.sh [ip address] [port]
```

```bash
./struts_check.sh 127.0.0.1 80
```

**Check for vulnerability for a list of IP addresses.**
```bash
./main.sh [Text file containing IP adresses] [Port]
```

```bash
./main.sh output.txt 443
```

**Execute a command on a server without the Apache struts vulnerability patch**
```bash
./struts_attack.sh [IP Adres] [Command]
```

```bash
./struts_attack.sh https://127.0.0.1 whoami
```
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →