Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-36723 PoC — Microsoft Windows Container Manager Service 安全漏洞

Source
Associated Vulnerability
Title:Microsoft Windows Container Manager Service 安全漏洞 (CVE-2023-36723)
Description:Microsoft Windows Container Manager Service 是美国微软(Microsoft)公司的一个应用程序。提供一个管理windows容器功能。 Microsoft Windows Container Manager Service存在安全漏洞。攻击者利用该漏洞可以提升权限。以下产品和版本受到影响:Windows 10 Version 1809 for x64-based Systems,Windows 10 Version 1809 for ARM64-based Sys
Readme
# CVE-2023-36723

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.

![1](https://github.com/Wh04m1001/CVE-2023-36723/blob/main/1.png)


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.

![2](https://github.com/Wh04m1001/CVE-2023-36723/blob/main/2.png)

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:

![poc](https://github.com/Wh04m1001/CVE-2023-36723/blob/main/poc.png)

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

[4.0K] /data/pocs/0f0b3cd23c2159d54921e587dae8330c4f40da5d ├── [ 38K] 1.png ├── [266K] 2.png ├── [140K] poc.png ├── [1.4K] README.md └── [4.0K] WinSandbox_EoP ├── [2.7K] def.h ├── [7.0K] main.cpp ├── [1.4K] WinSandbox_EoP.sln ├── [6.5K] WinSandbox_EoP.vcxproj ├── [1.1K] WinSandbox_EoP.vcxproj.filters └── [ 168] WinSandbox_EoP.vcxproj.user 1 directory, 10 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.