Advisory

Yorick Koster, August 2015

Microsoft Visio multiple DLL side loading vulnerabilities

Abstract

Multiple DLL side loading vulnerabilities were found in Microsoft Visio. These issues can be exploited by loading various Visio COM components as an embedded OLE object. When instantiating a vulnerable object Windows will try to load the DLL msoutls.dll from the current working directory. If an attacker convinces the user to open a specially crafted (Office) document from a directory also containing the attacker's DLL file, it is possible to execute arbitrary code with the privileges of the target user. This can potentially result in the attacker taking complete control of the affected system.

See also

- CVE-2016-3235
- MS16-070: Security Update for Microsoft Office (3163610)

Tested versions

This issue was successfully verified on Windows 7 + Visio 2010. Microsoft reports that this issue also affects Microsoft Visio 2007, Microsoft Visio 2013, and Microsoft Visio 2016.

Fix

Microsoft released MS16-070 that fixes this vulnerability.

Introduction

OLE is a technology that enables an application to create compound documents that contain information from a number of different sources. For example, a document in an OLE-enabled word processor can accept an embedded spreadsheet object. Unlike traditional "cut and paste" methods where the receiving application changes the format of the pasted information, embedded documents retain all their original properties. If the user decides to edit the embedded data, Windows activates the originating application and loads the embedded document.

OLE objects are loaded via a CLSID or indirectly via a programmatic identifier (ProgID). The CLSID is used to look up its associated DLL in the Windows Registry. In order to check if the provided CLSID is in fact an OLE object, this DLL needs to be loaded in memory first, even if the CLSID is not really an OLE object. Since the DLL may not be designed to be loaded this way, loading it can introduce security issues like side loading of malicious DLLs.

Vulnerability details

It was discovered that the Microsoft Visio is affected by multiple DLL side loading vulnerabilities. Loading the following COM components as an OLE object will result in Windows trying to load the DLL msoutls.dll from the current working directory:

- Visio CAD Drawing (CLSID {000D0E00-0000-0000-C000-000000000046})
- VisioModelingEngine Class (CLSID {19FD6844-676F-4F5E-A319-1C237A6BE243})
- Visio DWG Display (CLSID {550D0110-8DCD-11D1-8524-00A02495E316})
- Visio DWG Display Creator (CLSID {6C92B806-B900-4392-89F7-2ED4B4C23211})
- Microsoft Office Visio 14.0 Drawing Control (CLSID {E4615FA3-23B0-4976-BD3E-D611DDBE330E})

/advisory/SFY20150804/visio_msoutils.sll_side_load.png
Figure 1: Imported msoutls.dll methods

An attacker can exploit this issue by convincing a target user into opening a specially crafted (Office) document from a directory containing the attacker's DLL. This allows for the execution of arbitrary code that will be executed with the privileges of the target user, potentially resulting in a full compromise of the affected system.

Latest News & Research

Work with us →