This module leverages a flaw in `runc` to escape a Docker container and get command execution on the host as root. This vulnerability is identified as CVE-2019-5736. It overwrites the `runc` binary with the payload and wait for someone to use `docker exec` to get into the container. This will trigger the payload execution. Note that executing this exploit carries important risks regarding the Docker installation integrity on the target and inside the container ('Side Effects' section in the documentation).
Exploit database
Vulnerability
CVE-2018-5736
Vulnerability details
- Score
- 5.3
- Severity
- medium
CVSS 3.0 · NVD
Vector string
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HDescription
An error in zone database reference counting can lead to an assertion failure if a server which is running an affected version of BIND attempts several transfers of a slave zone in quick succession. This defect could be deliberately exercised by an attacker who is permitted to cause a vulnerable server to initiate zone transfers (for example: by sending valid NOTIFY messages), causing the named process to exit after failing the assertion test. Affects BIND 9.12.0 and 9.12.1.
CVE ProgramExploit source choices
1 sourceDocker Container Escape Via runC Overwrite
2019-01-01docker_runc_escape.rb