{"id":758,"date":"2014-08-01T18:42:37","date_gmt":"2014-08-01T18:42:37","guid":{"rendered":"http:\/\/h.foofus.net\/?p=758"},"modified":"2014-08-03T16:33:22","modified_gmt":"2014-08-03T16:33:22","slug":"exchange-multiple-internal-ip-disclosures","status":"publish","type":"post","link":"http:\/\/h.foofus.net\/?p=758","title":{"rendered":"Exchange Multiple Internal IP Disclosures"},"content":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n1. Summary<\/p>\n<p>Multiple issues have been discovered that make it possible to disclose internal IP addresses of remote Microsoft Exchange environments. This includes internal addresses of the Client Access Server (CAS) which hosts services such as Outlook Web App (OWA) and Autodiscover. This also includes internal addresses of the proxy or gateways processing requests for the OWA.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n2. Description<\/p>\n<p>Attack #1 &#8211; OWA \/ Autodiscover<\/p>\n<p>When sending a crafted GET requests to the web server with empty host header and using the HTTP protocol version 1.0(HTTP\/1.0), the internal IP addresses of the under lying system is revealed in the header response. This flaw is believed to be an IIS issue and has been found in Microsoft Exchange systems such as Outlook Web App (OWA) and the Client Access Server (CAS). The flaw has been seen in Basic Authentication response headers on a 401 web server status and the Location headers on a 302 web server status. It\u2019s possible this flaw exists in other products that run on IIS. An example of normal behavior can be seen when performing a HTTP\/1.1 request to a protected page such as:<\/p>\n<p>&#8220;https:\/\/autodiscover.example.com\/Autodiscover\/Autodiscover.xml&#8221;<\/p>\n<p>The Basic Authentication HTTP header response normally reveals a public facing IP address or hostname of:<\/p>\n<p>WWW-Authenticate: Basic realm=&#8221;autodiscover.example.com&#8221;<\/p>\n<p>A proof of concept example can be seen below in Figure 1. All the vulnerable IIS paths discovered and there affected product versions can be seen in Table 1. Note that some of the file paths disclosed are vulnerable if default settings have not been changed. Some of the paths have been found vulnerable based on system administrator changes.<\/p>\n<p>TABLE 1\u2014VULNERABLE PATHS<br \/>\n<a href=\"http:\/\/h.foofus.net\/wp-content\/uploads\/2014\/08\/exchange_internal_ip_table1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/h.foofus.net\/wp-content\/uploads\/2014\/08\/exchange_internal_ip_table1-1024x321.png\" alt=\"exchange_internal_ip_table1\" width=\"627\" height=\"196\" class=\"alignnone size-large wp-image-776\" srcset=\"http:\/\/h.foofus.net\/wp-content\/uploads\/2014\/08\/exchange_internal_ip_table1-1024x321.png 1024w, http:\/\/h.foofus.net\/wp-content\/uploads\/2014\/08\/exchange_internal_ip_table1-300x94.png 300w, http:\/\/h.foofus.net\/wp-content\/uploads\/2014\/08\/exchange_internal_ip_table1.png 1037w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n<p>FIGURE 1\u2014BASIC AUTH HEADER REVEALS INTERNAL IP ADDRESS<\/p>\n<p>$ openssl s_client -host autodiscover.example.com -port 443<\/p>\n<p>&#8212;SNIP&#8212;<br \/>\nGET \/Autodiscover\/Autodiscover.xml HTTP\/1.0<br \/>\nHTTP\/1.1 401 Unauthorized<br \/>\nCache-Control: private<br \/>\nContent-Type: text\/html<br \/>\nServer: Microsoft-IIS\/7.5<br \/>\nX-SOAP-Enabled: True<br \/>\nX-WSSecurity-Enabled: True<br \/>\nX-WSSecurity-For: None<br \/>\nX-AspNet-Version: 2.0.50727<br \/>\nWWW-Authenticate: Negotiate<br \/>\nWWW-Authenticate: NTLM<br \/>\nWWW-Authenticate: Basic realm=&#8221;10.1.1.10&#8243;<br \/>\nX-Powered-By: ASP.NET<br \/>\n&#8212;SNIP&#8212;<\/p>\n<p>Attack #2 &#8211; Reverse Proxy \/ Gateway<\/p>\n<p>It has been shown in OWA 2007 and 2010, that it\u2019s possible to reveal the internal IP address of the reverse proxy or gateway processing requests for OWA. Such proxies or gateways include Forefront TMG 2010. This attack can be performed using a web browser. When attempting to trigger ASP.NET debug and making a GET request to the OWA path &#8220;\/owa\/auth\/trace.axd&#8221;. The OWA throws a server side exception with a web server status of 403. The verbose error reveals the internal IP address of the proxy or gateway. Example output can be seen below in Figure 2.<\/p>\n<p>FIGURE 2\u2014REVERSE PROXY\/GATEWAY INTERNAL IP DISCLOSED<\/p>\n<p>An error occurred and your request couldn&#8217;t be completed. If the problem continues, contact your helpdesk with this HTTP Status code: 403.<\/p>\n<p>Request<br \/>\nUrl: https:\/\/mail.example.com\/owa\/auth\/trace.axd<br \/>\nUser host address: 10.1.1.1<br \/>\nOWA version: 14.2.318.3<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n3. Impact<\/p>\n<p>Allow an attacker to gather information about the internal network.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n4. Affected Products<\/p>\n<p>Microsoft Exchange CAS 2013<br \/>\nMicrosoft Exchange CAS 2010<br \/>\nMicrosoft Exchange CAS 2010\/Forefront TMG 2010<br \/>\nMicrosoft Exchange CAS 2007<br \/>\nMicrosoft Exchange OWA 2003<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n5. Solution<\/p>\n<p>Only attack two is fixed in current versions. Apply the latest supplied vendor patches.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n6. Time Line<\/p>\n<p>12\/17\/2012 Reported Vulnerability to the Vendor<br \/>\n01\/03\/2013 Vendor Confirmed the Vulnerability<br \/>\n08\/01\/2014 Publicly Disclosed<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n7. Credits<\/p>\n<p>Discovered by Nate Power<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 1. Summary Multiple issues have been discovered that make it possible to disclose internal IP addresses of remote Microsoft Exchange environments. This includes internal addresses of the Client Access Server (CAS) which hosts services such as Outlook Web App (OWA) and Autodiscover. This also includes internal addresses of the proxy or gateways processing requests [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-758","post","type-post","status-publish","format-standard","hentry","category-advisories"],"_links":{"self":[{"href":"http:\/\/h.foofus.net\/index.php?rest_route=\/wp\/v2\/posts\/758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/h.foofus.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/h.foofus.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/h.foofus.net\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/h.foofus.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=758"}],"version-history":[{"count":10,"href":"http:\/\/h.foofus.net\/index.php?rest_route=\/wp\/v2\/posts\/758\/revisions"}],"predecessor-version":[{"id":813,"href":"http:\/\/h.foofus.net\/index.php?rest_route=\/wp\/v2\/posts\/758\/revisions\/813"}],"wp:attachment":[{"href":"http:\/\/h.foofus.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/h.foofus.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=758"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/h.foofus.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}