How to fix docker remote API loophole
This article mainly explains "how to fix docker remote API loopholes". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to fix docker remote API vulnerabilities.
Vulnerability description
Docker is an open source application container engine, this vulnerability is to take advantage of an api interface opened by docker, because the permissions are not set properly, so that remote command execution can be made.
Test environment
A local virtual machine and a temporarily created Ali cloud server
Centos7
Docker-ce-18.09.9
Loophole recurrence
First, port 2375 is detected, and then a http:localhost:2375/version request is constructed if it is open. If the return packet is in json format, the vulnerability exists.
1. Install docker
Configure host Nic forwarding
# # if not configured, you need to execute the following $cat