Skip to content

morphuslabs/sudocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sudocker

sudocker can be used to become root by being on the docker group.

Copyright (C) 2018 Morphus Labs. Released under the GPLv3.

This script leverages the fact that anyone in the docker group is root equivalent:

A lot of Docker tutorials skip this fact.

Usage

user$ wget "https://raw.githubusercontent.com/morphuslabs/sudocker/master/sudocker"
user$ chmod +x sudocker
user$ ./sudocker
... wait a dozen seconds ...
root#

You'll need to have Docker installed, the Docker daemon must be running and your user must be on the docker group.

Remember to delete /sudocker-su afterwards:

$ rm /sudocker-su

FAQ

  • Is this a bug in Docker?

    No. This is an intended feature.

  • Does this mean programs can escape from my Docker containers?

    No. Unless you use the --privileged parameter, your docker containers should be safe (at least with regards to this feature).

  • What can I do avoid passwordless privilege escalation using Docker?

    Don't add your user to the docker group. Use sudo whenever you call docker run.

Bugs

Report bugs in sudocker's issue tracker on GitHub.

Known bug: this README is longer than the code.

Disclaimer

Escalating privileges without consent is illegal. It is the user's responsibility to obey applicable laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.

About

become root by being on the docker group

Resources

License

Stars

6 stars

Watchers

3 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages