Better HN
topnewbestaskshowjobs
Log inSign up

uvuv

136 karma · joined Feb 21, 2019 (7y ago) · 16 submissions

Submissions

comment 3mo ago · link · parent

A critical vulnerability chain in Azure Cosmos DB enabled full read and write access to every Cosmos DB database.

2.

CosmosEscape: Taking over Every Database in Azure Cosmos DB(wiz.io ↗)

74 points · by uvuv · 3mo ago · 17 comments

3.

Supply Chain Vuln Compromised Core AWS GitHub Repos & Threatened the AWS Console(wiz.io ↗)

160 points · by uvuv · 10mo ago · 38 comments

4.

AWS Log4Shell HotPatch Introduced a Container Escape Vulnerability(unit42.paloaltonetworks.com ↗)

44 points · by uvuv · 4y ago · 1 comment

5.

Container Escape to Shadow Admin: Google Kubernetes Engine (GKE) Autopilot(unit42.paloaltonetworks.com ↗)

2 points · by uvuv · 4y ago · discuss

6.

Cross-Account Container Takeover in Azure(unit42.paloaltonetworks.com ↗)

3 points · by uvuv · 5y ago · discuss

comment 6y ago · link · parent

Definitely not secure. The author did a great job explaining container runtimes in basic terms, but there's a lot of security features missing. Mainly: * Reducing the container's capabilities * Restricting access to resources through cgroups * Applying seccomp filters to prevent certain syscalls.

As another comment suggested, user namespaces are another hardening feature, but not all container runtimes enable it by default. Podman does, Docker doesn't. In fact user namespaces are so powerful that I believe they pretty much cover most of the hardening provided by the three features I listed above. If you're wondering why they're not enabled by default in Docker, take a look at this [1].

Exploiting the missing isolation mechanisms, the following bash commands will allow you to escape from the author's containers:

$ ls -al /sys/dev/block # find the root fs device (e.g. /dev/sda1) major and minor device numbers (e.g. {maj=8, min=1}, {maj=259, min=1})

$ mknod --mode 0600 /dev/host_fs_dev b $major $minor

$ mkdir /host_fs && mount /dev/host_fs_dev /host_fs

(warning: shameless plug to my posts follows:)

If you want more details, I wrote a post on this exact same problem in the context of three vulnerabilities I found in rkt (another container runtime) [2].

Beside the issues above, the author's runtime also exposes host file descriptors like /proc/self/exe that can be used to escape the container. This is a post I wrote on runC CVE-2019-5736 that explains this kind of issues.

[1] https://docs.docker.com/engine/security/userns-remap/#user-n... [2] https://unit42.paloaltonetworks.com/breaking-out-of-coresos-... [3] https://unit42.paloaltonetworks.com/breaking-docker-via-runc...

comment 7y ago · link · parent

That's an option, an actually what LXD does. It's better then just chrooting, though in the case of this vulnerability even if docker-tar entered the mount NS, the exploit will still work.

comment 7y ago · link · parent

Hi, OP here. You're correct on the symlink point, they're the reason chrooting is needed, as they caused several vulnerabilities in Docker and Podman cp in the past. The good news is that there is a new syscall designed to solve that exact problem, openat2(), which you'll be able use to restrict path resolution when opening files (https://lwn.net/Articles/796868/). It will make helper processes and chrooting to the container redundant.

Running helper processes entirely in the container is actually quite problematic, since they will be visible to proceses in the container that could try to affect their output. This solution though is used in Kubernetes, and it resulted in 4 vulnerabilities in the last year. Ariel Zelivansky and I just gave a talk on the security of the cp command in KubeCon, you can check out the slides here (https://kccncna19.sched.com/event/d229f00f143036f7c488144e60...) for more information.

As for the fix, I'm pretty sure newer Golang versions stopped dynamiclly loading libraries at runtime, which is nice. I Should have included that in the post but forgot.

comment 7y ago · link · parent

A PoC for CVE-2019-14271, which can be exploited by a malicious container to gain root code execution on the host.

11.

Full Docker Breakout Exploit(unit42.paloaltonetworks.com ↗)

19 points · by uvuv · 7y ago · 6 comments

12.

Gaining Persistency on Vulnerable Lambdas(twistlock.com ↗)

4 points · by uvuv · 7y ago · 1 comment

13.

Privilege Escalation in Cloud Foundry UAA – CVE-2019-11270(twistlock.com ↗)

4 points · by uvuv · 7y ago · discuss

14.

Improper Input Validation – An SQL Vulnerability in Cloud Foundry(twistlock.com ↗)

1 points · by uvuv · 7y ago · discuss

15.

Breaking Out of Rkt Containers – 3 New Unpatched CVEs(twistlock.com ↗)

6 points · by uvuv · 7y ago · discuss

comment 7y ago · link · parent

They're created using https://www.draw.io/