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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2017-9805 PoC — Apache Struts 代码问题漏洞

Source
Associated Vulnerability
Title:Apache Struts 代码问题漏洞 (CVE-2017-9805)
Description:The REST Plugin in Apache Struts 2.1.1 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for deserialization without any type filtering, which can lead to Remote Code Execution when deserializing XML payloads.
Description
Better Exploit Code For CVE 2017 9805 apache struts
Readme
# CVE-2017-9805.py
1. Better Exploit Code For CVE 2017 9805 apache struts
2. Should be mostly error proof

# Why Recode?
Found that most of the exploit code online simply used string concatenation to insert user supplied commands and insert into an XML string. This isnt very reliable as XML requires certain special characters use encoding. As such, it will trip an error cause those scripts dont account for this. Additionally, properly encoded xml may cause errors in getting proper command execution. This script solves those issues.

# What's different?
1. I added in proper argument parsing
2. Regex checking of proper argument formatting.
3. xml as an object instead of just a string
4. Encoding of commands to prevent errors with special characters in user supplied payload.
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 →