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

Goal: 1000 CNY · Raised: 1336 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.
Description
Apache Struts version analyzer (Ansible) based on CVE-2017-5638
Readme
# check_struts

This project has been created following 2017 [Equifax exploit]( https://thehackernews.com/2017/09/equifax-apache-struts.html)

The **check_struts.sh** script aims at retrieving any Apache struts libraries version and location found and/or loaded on the system.
It can be run directly on a server, or with the provided Ansible playbook, to handle several servers.


## Possible Outputs:

- *"Libs path and versions loaded on the system:"*  

   The libraries found are currently running on the system, and could be accessible.

- *"Libs path and versions installed on the system:"* 

   The librairies are present on the filesystem, but not running.
   
 ## Example with Ansible Playbook:
 
 ```
 ➜  ansible-playbook git:(master) ✗ ansible-playbook play.yml -i inventory

PLAY [Check Struts] ***********************************************************************************************************************************************************************************************

TASK [ensure a list of packages installed] ************************************************************************************************************************************************************************
ok: [servername]

TASK [Upload script check-struts.sh] ******************************************************************************************************************************************************************************
ok: [servername]

TASK [Check if struts presence/version] ***************************************************************************************************************************************************************************
ok: [servername]

TASK [debug] ******************************************************************************************************************************************************************************************************
skipping: [servername]

TASK [Remove check-struts.sh] *************************************************************************************************************************************************************************************
ok: [servername]

PLAY RECAP ********************************************************************************************************************************************************************************************************
servername                 : ok=4    changed=0    unreachable=0    failed=0   

```   

[Apache Struts full CVEs](https://www.cvedetails.com/vulnerability-list/vendor_id-45/product_id-6117/Apache-Struts.html)
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 →