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

目标: 1000 元 · 已筹: 1336

100%

CVE-2021-44142 PoC — Samba 缓冲区错误漏洞

来源
关联漏洞
标题: Samba 缓冲区错误漏洞 (CVE-2021-44142)
Description:Samba是用于 Linux 和 Unix 的标准 Windows 互操作性程序套件。 Samba 存在安全漏洞,该漏洞源于在将用户提供的数据复制到固定长度的基于堆的缓冲区之前缺乏对长度的正确验证。攻击者可以利用此漏洞在 root 环境中执行代码。
介绍
# CVE-2021-44142 Vulnerability Checker
A tool to check if a Samba server is vulnerable to CVE-2021-44142

## Background
CVE-2021-44142 is a heap out-of-bounds read and write in Samba's vfs_fruit module used at Pwn2Own Austin 2021 against the Western Digital PR4100. It was first discovered by [Nguyễn Hoàng Thạch](https://twitter.com/hi_im_d4rkn3ss) and [Billy Jheng Bing-Jhong](https://twitter.com/st424204) of STAR Labs. [Orange Tsai](https://twitter.com/orange_8361) of DEVCORE also reported this vulnerability. This work is based off a blog post by [0xsha](https://twitter.com/0xsha) at https://0xsha.io/blog/a-samba-horror-story-cve-2021-44142.

This tool demonstrates vulnerability to CVE-2021-44142 by dumping a talloc heap cookie and linked list pointer. Similar techniques can be used to write this data.

This work expands on the work of 0xsha by:
* Doing all the work required for the exploit in a single SMB connection. This is required as Samba can handle each connection in a different process. Using a single connection also makes debugging easier.
* Making the SMB connection look like it is coming from OSX. Western Digital has a custom patch to Samba that disables the vulnerable VFS modules unless the connection looks like it came from OSX.

## Usage
```
python check_vulnerable.py 
usage: check_vulnerable.py [-h] [--password PASSWORD] server port share user
check_vulnerable.py: error: the following arguments are required: server, port, share, user

```
## Example
```
python check_vulnerable.py 192.168.1.183 445 TimeMachineBackup Guest
{
    "vulnerable": true,
    "heap_cookie_leak": "0xfc571370",
    "heap_pointer_leak": "0x55e4e717b1b0",
    "fail_reason": ""
}
```
文件快照

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

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