Skip to content
RCE Write-up Advanced

A new method for container escape using file-based DirtyCred

The post describes a Linux kernel vulnerability (CVE-2022-3910) that can be exploited with a file-based DirtyCred technique to gain local privilege escalation, and explores whether the same primitive can be adapted to overwrite /proc/sys/kernel/modprobe for a container escape. The author states the answer was more complicated than expected and that the post covers the root cause and the exploitation methods used.

starlabs.sg

Published on starlabs.sg

Recently, I was trying out various exploitation techniques against a Linux kernel vulnerability, CVE-2022-3910. After successfully writing an exploit which made use of DirtyCred to gain local privilege escalation, my mentor Billy asked me if it was possible to tweak my code to facilitate a container escape by…

The author, on starlabs.sg

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a flaw in the Linux kernel reachable through CVE-2022-3910 that allows a file-based DirtyCred primitive to overwrite privileged files such as /proc/sys/kernel/modprobe.

Impact

An attacker who can trigger the bug could gain local privilege escalation, and the author investigated whether the same primitive could be extended to a container escape by overwriting a kernel-controlled file.

What the attacker needed

Ability to trigger CVE-2022-3910; local access on the target Linux host

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A container is a lightweight isolated environment on a Linux machine, and a container escape means breaking out of that isolation to reach the host. This post is about a kernel bug that lets an attacker with limited access on the machine gain higher privileges, and whether that same trick can be stretched to break out of a container. The author says the container-escape idea turned out to be harder than expected and walks through the underlying flaw and the exploitation attempts.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.