Cyber security

CVE-2023-36723 – Windows Sandbox Directory Creation Vulnerability

This is PoC for arbitrary directory creation bug in Container Manager service.

This PoC is not thoroughly tested so it may not even work most of the time (it was enough for msrc to confirm vulnerability).

In order to exploit this vulnerability a Windows Sandbox feature have to be installed on windows host. When Windows Sandbox feature is installed a set of directories will be created in c:\programdata directory.

One of those directories is C:\ProgramData\Microsoft\Windows\Containers\BaseImages\<GUID>\BaseLayer. This directory is different as it gives authenticated users group modify permissions on all child objects.

If BaseLayer directory is empty or some of directories inside it are removed, next time when Windows sandbox is started, a process cmimageworker.exe will recreate those directories/files without checking for symbolic links and set DACL that allows authenticated users to modify them.

I have create PoC that will abuse this vulnerability to create directory pwn with permissive DACL’s inside c:\windows\system32 directory as show below:

An attacker can abuse this vulnerability to execute code in process that is running with SYSTEM privileges by abusing SxS assembly loading.

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

The file Command – Quickly Identify File Contents in Linux

While file extensions in Linux are optional and often misleading, the file command helps decode what a…

2 hours ago

How to Use the touch Command in Linux

The touch command is one of the quickest ways to create new empty files or update timestamps…

2 hours ago

How to Search Files and Folders in Linux Using the find Command

Handling large numbers of files is routine for Linux users, and that’s where the find command shines.…

2 hours ago

How to Move and Rename Files in Linux with the mv Command

Managing files and directories is foundational for Linux workflows, and the mv (“move”) command makes it easy…

2 hours ago

How to Create Directories in Linux with the mkdir Command

Creating directories is one of the earliest skills you'll use on a Linux system. The mkdir (make…

3 hours ago

The Code Behind Lyric Video Makers: Rendering and Timing

Lyric videos have become one of the most popular tools for artists to share music…

6 hours ago