docker-escape-tool
Version, currently 0.2.9-beta.625 versions
- 0.2.9latestDec 20, 2021
- 0.2.9-beta.20not indexedDec 21, 2022
- 0.2.9-beta.19not indexedDec 21, 2022
- 0.2.9-beta.18not indexedDec 21, 2022
- 0.2.9-beta.17not indexedDec 21, 2022
- 0.2.9-beta.16not indexedDec 21, 2022
- 0.2.9-beta.15not indexedDec 21, 2022
- 0.2.9-beta.14not indexedDec 21, 2022
- 0.2.9-beta.13not indexedDec 21, 2022
- 0.2.9-beta.12not indexedDec 21, 2022
- 0.2.9-beta.11not indexedDec 21, 2022
- 0.2.9-beta.10not indexedDec 21, 2022
- 0.2.9-beta.9not indexedDec 21, 2022
- 0.2.9-beta.8not indexedDec 21, 2022
- 0.2.9-beta.7not indexedDec 21, 2022
- 0.2.9-beta.6not indexedDec 21, 2022
- 0.2.9-beta.5not indexedDec 21, 2022
- 0.2.9-beta.4not indexedDec 21, 2022
- 0.2.9-beta.3not indexedDec 21, 2022
- 0.2.9-beta.2not indexedDec 21, 2022
- 0.2.9-beta.1not indexedDec 21, 2022
- 0.2.8not indexedDec 21, 2022
- 0.2.7not indexedDec 21, 2022
- 0.2.6not indexedDec 21, 2022
- 0.2.5not indexedDec 21, 2022
github.com/PercussiveElbow/docker-escape-tool
Tool to test if you're in a Docker container and attempt simple breakouts
Nothing has been indexed for 0.2.9-beta.6 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
docker-escape-tool:
github: PercussiveElbow/docker-escape-tool
version: ~> 0.2.9-beta.6Then run:
shards installshard.yml
No shard.yml has been indexed for 0.2.9-beta.6. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# Docker Escape Tool
[](https://github.com/PercussiveElbow/docker-escape-tool/actions)
*Work In Progress*
This tool will help identify if you're in a Docker container and try some quick escape techniques to help assess the security of your containers.
This tool is focused specifically on Docker escapes though some of the logic may apply to other container runtimes.
I intend to follow this up with a blog post on helping secure your Docker containers, but for some quick advice please see [this checklist](https://github.com/PercussiveElbow/docker-security-checklist).
## Breakout techniques
* Mounted Docker UNIX socket.
* Reachable Docker network socket (on both default port 2375/2376).
* Mountable devices (e.g. host / disk)
* CVE-2019-5736
Additionally, if the tool will conduct a quick port scan of available interfaces if the container appears to share the host network namespace.
#### To add:
* CVE-2019-14271
* CVE-2020–15257
* Capability based breakouts (CAP_SYS_ADMIN,CAP_SYS_MODULE etc.)
* Ability to enumerate containers within the same Docker network to pivot.
## Building
Use a prebuilt binary from [Releases]("https://github.com/PercussiveElbow/docker-escape-tool/releases") or compile yourself using the supplied Dockerfile using latest Crystal on Alpine.
```
shards install
crystal build --static src/docker-escape.cr
```
## Usage
```
.\docker_escape Display usage information.
Checks:
.\docker_escape check Determine if the environment is a Docker container.
Automatic escape:
.\docker_escape auto Attempt automatic escape. If successful this starts a privileged container with the host drive mounted at /hostOS.
Manual escape techniques:
.\docker_escape unix Attempt an escape using a mounted Docker UNIX socket located at /var/run/docker.sock
.\docker_escape network Attempt to escape via Docker TCP socket if found on any interfaces. Port scans if network namespace shared with host.
.\docker_escape device Attempt to mount and chroot host OS filesystem. (i.e. if container uses --privileged or --device)
.\docker_escape cve-2019-5736 <payload> Attempt CVE-2019-5736 (runC escape). If successful, this will trigger when a user runs an EXEC command and will corrupt the host runC binary.
```
## Contributing
Apologies for the messy codebase, if you feel like there's something to contribute feel free to open an issue.
## License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.9-beta.6- Tagged
- Dec 21, 2022
- Commit
62b5eedfd0bf- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/PercussiveElbow/docker-escape-tool
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 25