Docker Unauthorized Access Vulnerability
Last updated
Last updated
Malicious attackers can access Docker servers or containers without authorization. This can result in sensitive data leaks or allow attackers to perform unauthorized actions such as adding, modifying, or deleting containers.
Install docker
Modify the /usr/lib/systemd/system/docker.service
service to start the API interface.
Restart the docker service.
Entering ip:2375/version
will list basic information, the same effect as the docker version command.
Exploit Docker container to write a timed task to bounce a shell
We can use the unauthenticated Docker remote API to start a container and mount it to the root directory, thus giving us arbitrary read-write privileges. Then we write the reverse shell command into the crontab of the timed task, which can cause the host to bounce the shell.
Write to the schedule
Do not enable the Docker remote API service unless necessary. If it is necessary, the following hardening methods can be used:
After the certificate for communication between the client and server is generated, the following command can be used to start the Docker daemon: