Threats intelligence
The networkd-dispatcher service on Linux desktops did not sanitise the network state strings it received over D-Bus, so a local attacker could use directory traversal, a symlink race and a time-of-check-time-of-use race to make it run attacker-controlled scripts as root. This allowed privilege escalation to root and the planting of a root backdoor.
microsoft.com
Published on microsoft.com
Microsoft has discovered several vulnerabilities, collectively referred to as Nimbuspwn, that could allow an attacker to elevate privileges to root on many Linux desktop endpoints. The vulnerabilities can be chained together to gain root privileges on Linux systems, allowing attackers to deploy payloads, like a root…
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
The service built script paths from unsanitised D-Bus state strings and then discovered and executed scripts with a gap in time, allowing traversal, symlink following and a TOCTOU race.
Impact
An attacker could elevate privileges to root and run arbitrary code, for example leaving a SUID root shell behind, though the exploit depends on being able to own the network1 bus name, which the authors say occurs in some environments such as Linux Mint or through misconfigurations.
What the attacker needed
Local access to the machine; ability to send D-Bus signals; ability to own the network1 bus name; win the race (about three attempts)
How it was found
- Create a working directory and place a symlink inside it that points to a directory of root-owned executables.
- Plant files with the same names as those executables in the working directory, containing the attacker's payload.
- Send a D-Bus signal whose state string uses directory traversal to escape the dispatcher's script directory.
- The dispatcher builds its script list through the symlink, so it sees root-owned executables.
- Swap the symlink to point at the attacker's directory before the scripts run.
- The dispatcher executes the attacker's files as root.
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.
On Linux, some background programs run with the highest level of permission, called root, and listen for messages from other programs. This one, networkd-dispatcher, took a piece of text from a message and used it to build a folder path without checking it, so a local attacker could point it at their own folder and trick it into running their script as root. That means a normal user could become the all-powerful root user on the machine.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.