Skip to content
Access control Write-up Advanced

Executive Summary

Windows Server Containers use a custom root directory object for path resolution, but an undocumented global symbolic link flag can cause paths to be resolved on the host's root directory instead. An attacker with code execution inside a container could abuse this to write files to the host and potentially achieve remote code execution on the host.

unit42.paloaltonetworks.com

Published on unit42.paloaltonetworks.com

In my last post about reverse engineering Windows containers, I outlined the internal implementation of Windows Server Containers. After further investigating Windows Server Containers, I learned that running any code in these containers should be considered as dangerous as running admin on the host.

Daniel Prizmant, on unit42.paloaltonetworks.com

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 the container's path resolution honours a global symbolic link flag that resolves paths against the host's root directory object instead of the container's silo root, and a privileged container helper process can be made to set that flag.

Impact

An attacker who breaches one application in a Windows Server Container could escape to the host, access other applications on the same machine, and in Kubernetes environments spread to other nodes and potentially the whole cluster.

What the attacker needed

Code execution inside a Windows Server Container; ability to inject into CExecSvc

The fix

Microsoft's guidance is not to run Windows Server Containers for hostile workloads and to use Hyper-V containers instead, which provide a stronger isolation boundary.

How it was found

  1. Create a symbolic link for the host's C: drive.
  2. Gain Tcb privileges.
  3. Make the symbolic link global.
  4. Access files on the host's file system.

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.

Containers are meant to keep programs separate from the rest of the computer, like a box inside a box. This research found that a special kind of link inside a Windows container can be tricked into pointing outside the box, to the real computer. That means someone who breaks into one container could reach the main system and other containers on the same machine.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.