CVE-2018-8174 and Forcing Internet Explorer Exploits

A zero day exploit was discovered targeting trade agencies and other related organizations in China toward the end of April. The vulnerability is a Use-After-Free (UAF) memory corruption bug in the Microsoft VBScript engine. By taking advantage of the vulnerability, an exploit could download and execute any arbitrary code an attacker wants, e.g. Remote Code Execution (RCE). The vulnerability was issued CVE-2018-8174 and is also known as "Double Kill".

The fact that the attack was discovered as a zero day in the wild is obviously interesting, but the unique attack chain is also a twist on the typical attacks we see in this vein. In this case we have a vulnerability in the VBscript Engine in Internet Explorer that gets exploited by initially opening an Rich Text Format (RTF) document in MS Word.

The RTF document, presumably emailed to targets as part of a phishing attack, contains an OLE element that points to a link for data stored on a web site. The data is a malicious VBScript which exploits the RCE vulnerability.

So why use an RTF document at all? Why wouldn't the attackers simply email a link to the malicious script or embed the script directly in a document? The problem for the attackers is that while the exploit targets the VBScript engine in Internet Explorer, many people use a different web browser as their default application. Clicking on a link in an email would invoke that default browser instead of Internet Explorer and the exploit would fail.

By using an RTF file as a first stage, the document points to the remote VBscript using HTTP Content-Type "text/html". The default processor invoked to fetch this content is "mshtml.dll", which, as you might have guessed, is an engine behind Internet Explorer. This little trick forces Internet Explorer to process the VBScript no matter what browser you install or use by default.

Since many exploits target Internet Explorer directly, we often see malicious websites filtering out other web browsers that can't be exploited. This new technique to force content to load in Internet Explorer regardless of what your default browser may be will certainly expand the attack surface of potential victims. Expect to see this again in the future.

Microsoft issued a patch for CVE-2018-8174 on May 8th, so if you haven't updated your Windows systems, now would be a good time to do so.

Our analysis and research into this vulnerability has already been pushed to our security offerings and we stress that "Defense in Depth" is important to prevent these sorts of attacks. Trustwave customers will find protections against this exploit in the following security offerings:

Trustwave Secure Email Gateway (SEG) (KnownThreats update version 1013)
Trustwave Secure Web Gateway (SWG) (protected by default, out of the box policy)
Trustwave UTM (all supported versions, updates are automatic)

Trustwave reserves the right to review all comments in the discussion below. Please note that for security and other reasons, we may not approve comments containing links.