News for hackers. Stuff that matters.
Re:51% of 4M Docker images have critical vulnerabilities by foldr on Thursday December 17, 2020 @08:03AM (#25455169)
Just on a slight tangent, what are the security benefits of having a process run as a non-root user within a Docker container? It's obvious what the benefits are when running outside a container. Inside a container, on the other hand, there should only really be one important process running. That process will need to have access to all the interesting parts of the file system anyway, and being root inside a container doesn't let you do crazy superuser stuff like installing a kernel module.
Re:51% of 4M Docker images have critical vulnerabilities by coredog64 on Thursday December 17, 2020 @08:38AM (#25455418)
If you don’t at least drop the sys_module cap, you can install a kernel module [0]. Running as root inside the container increases the risk of a breakout. I’ve seen different approaches at different companies. One bank required a hard-to-get security sign off that included MFA to start (so no automation). A different bank bought expensive monitoring tools and then threw a bunch of money at refining the outputs.

[0] https://blog.pentesteracademy.com/abusing-sys-module-capabil...

Re:51% of 4M Docker images have critical vulnerabilities by Cthulhu_ on Thursday December 17, 2020 @08:08AM (#25455210)
It does allow you to exit the boundaries of the application though, and e.g. extract the application's database.

That said, is it possible to disable superuser access entirely in a container? Can't login as root if there is no root.

Re:51% of 4M Docker images have critical vulnerabilities by nix23 on Thursday December 17, 2020 @08:14AM (#25455259)
Re:51% of 4M Docker images have critical vulnerabilities by mattacular on Thursday December 17, 2020 @08:11AM (#25455231)
Docker has a user namespacing feature which can be used to harden container images and also a newer way to run rootless altogether - https://docs.docker.com/engine/security/rootless/
Re:51% of 4M Docker images have critical vulnerabilities by dec0dedab0de on Thursday December 17, 2020 @08:40AM (#25455443)
If the application user has access to the database, it doesn't matter if you get access to root or not.
Re:51% of 4M Docker images have critical vulnerabilities by mattacular on Thursday December 17, 2020 @08:09AM (#25455223)
If you've got root on a container, depending on how it's configured, you can gain access to the host in some situations (eg. Using volumes)
Re:51% of 4M Docker images have critical vulnerabilities by foldr on Thursday December 17, 2020 @08:11AM (#25455228)
But non-root users within the container can also access mounted volumes, no? Is there some kind of exploit that only works if running as root?
Re:51% of 4M Docker images have critical vulnerabilities by lights0123 on Thursday December 17, 2020 @08:35AM (#25455397)
You can setuid root in a volume mounted in host. If that's executed at all by any user, bam you have root on the host.

If it's never executed, I don't know what vulnerabilities they were talking about.

Re:51% of 4M Docker images have critical vulnerabilities by foldr on Thursday December 17, 2020 @08:54AM (#25455559)
Right, but it seems that wouldn't require the app within the Docker container to be running as root to work?
Re:51% of 4M Docker images have critical vulnerabilities by nix23 on Thursday December 17, 2020 @08:13AM (#25455246)
What a shitty concept. Typical Linux NIH (learn from zones jails lpar...no we need to reinvent the wheel in square format)
Re:51% of 4M Docker images have critical vulnerabilities by turminal on Thursday December 17, 2020 @08:50AM (#25455523)
Linux namespaces are quite flexible and aren't used just for docker style containerization. In some use cases having a shared user namespace makes sense.

Docker just doesn't use the provided interface by default. Which is a shame because a lot of users don't bother or don't know they should bother to configure it.

I think that's kind of a 'we don't care about security' move by docker and given its userbase that's a real problem.

Re:51% of 4M Docker images have critical vulnerabilities by nix23 on Thursday December 17, 2020 @09:01AM (#25455612)
Hmm, i come from a Solaris/BSD background, Jailing (or containerize) a application was all about security, second manageability, and third re-usability. Kind of crazy that Docker ignored the most important thing in the Container-Concept (which can be, run un-trusted code on your trusted platform.)
Re:51% of 4M Docker images have critical vulnerabilities by tannhaeuser on Thursday December 17, 2020 @10:40AM (#25456524)
Docker really is a power tool for developers, especially for freelancers needing to hop customer environments on their own notebook, and excels at that. The problem is the leap of pushing this guerilla tactics into running containers in prod. It's a result of the "move fast and break shit", web-scale, startup, and other agile narrative of the 2010s. And the industry has sure catered for these consumerisation of IT, with outlandish complexity in k8s, depressing oligopolization, and younger developers demanding such technologies to pad their resumes.
Re:51% of 4M Docker images have critical vulnerabilities by nix23 on Thursday December 17, 2020 @11:30AM (#25457068)
One of the most outraging thing i seen in the past: Docker-host as a VM (for security) i mean WTF!!