Skip to content

Commit 54a6297

Browse files
author
Brent Cook
committed
update versions and add quick module docs
1 parent 978fdb0 commit 54a6297

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
`struts2_rest_xstream` is a module that exploits Apache Struts 2's REST plugin, using the XStream handler to deserialise XML requests perform arbitrary code execution.
2+
3+
## Vulnerable Application
4+
5+
Apache Struts versions 2.1.2 - 2.3.33 and Struts 2.5 - Struts 2.5.12
6+
7+
You can download these versions here with any version of Apache Tomcat:
8+
9+
http://archive.apache.org/dist/struts/
10+
11+
You will also need to install a Struts 2 showcase application, which can be found here:
12+
13+
https://mvnrepository.com/artifact/org.apache.struts/struts2-rest-showcase
14+
15+
## Options
16+
17+
**TARGETURI**
18+
19+
The path to a struts application action
20+
21+
**VHOST**
22+
23+
The HTTP server virtual host. You will probably need to configure this as well, even though it is set as optional.
24+
25+
## Demonstration
26+
27+
**The Check Command**
28+
29+
The `struts2_rest_xstream` module comes with a check command that can effectively check if the remote host is vulnerable or not. To use this, configure the msfconsole similar to the following:
30+
31+
```
32+
set VERBOSE true
33+
set RHOST [IP]
34+
set TARGETURI [path to the Struts app with an action]
35+
```
36+
37+
When the module is in verbose mode, the `check` command will try to tell you the OS information, and whether or not the machine is vulnerable. Like this:
38+
39+
```
40+
msf exploit(struts2_rest_xstream) > check
41+
42+
[+] 10.1.11.11:8080 The target appears to be vulnerable.
43+
```
44+
45+
**Exploiting the Host**
46+
47+
After identifying the vulnerability on the target machine, you can try to exploit it. Be sure to set TARGETURI to the correct URI for your application, and the TARGET variable for the appropriate host OS.

modules/exploits/multi/http/struts2_rest_xstream.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ def initialize(info = {})
1515
super(update_info(info,
1616
'Name' => 'Apache Struts 2 REST Plugin XStream RCE',
1717
'Description' => %q{
18-
Apache Struts versions 2.5 through 2.5.12 using the REST plugin are
19-
vulnerable to a Java deserialization attack in the XStream library.
18+
Apache Struts versions 2.1.2 - 2.3.33 and Struts 2.5 - Struts 2.5.12,
19+
using the REST plugin, are vulnerable to a Java deserialization attack
20+
in the XStream library.
2021
},
2122
'Author' => [
2223
'Man Yue Mo', # Vulnerability discovery

0 commit comments

Comments
 (0)