what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Microsoft Machine Debug Manager (mdm) DLL Hijacking

Microsoft Machine Debug Manager (mdm) DLL Hijacking
Posted Jun 30, 2017
Authored by Karn Ganeshen

Microsoft Machine Debug Manager (mdm) suffers from dll hijacking vulnerabilities.

tags | exploit, vulnerability
systems | windows
SHA-256 | db92dfe873e589fe2a002dfec15943dbc9eb4432297101f2fd0811808db098a2

Microsoft Machine Debug Manager (mdm) DLL Hijacking

Change Mirror Download
Microsoft Machine Debug Manager (mdm) DLL side loading vulnerability
Vulnerability: DLL Hijacking / DLL Side Loading

Advisory URL:
https://ipositivesecurity.com/2017/06/15/microsoft-machine-debug-manager-mdm-insecure-library-loading-allows-code-execution/

------------------------
ABOUT
------------------------

The Machine Debug Manager, mdm.exe, is a program that provides support for
program debugging.

Machine Debug Manager (mdm.exe) is known to be either installed standalone,
or is part of / packaged with the following:

------------------------
Products
------------------------

Riven (Red Orb)
Windows 2000 Professional Debug/Checked Build (Microsoft)
SDKs and Tools (Microsoft)
Visual C++ (Microsoft)
BackOffice Server 2000 (Microsoft)
Visual Studio 6.0 (Microsoft)
MSDN Disc 2466 (Microsoft)
MSDN Disc 1550 (Microsoft)
Windows (Microsoft)
Servers (Microsoft)
Windows 2000 (Microsoft)
Windows 2000 Professional (Microsoft)
SQL Server (Microsoft)
Windows 2000 Professional - Dell Reinstallation CD (Microsoft)
Visual Studio (Microsoft)
Office (Microsoft)
Windows 2000 - Dell Reinstallation CD (Microsoft)
Platforms, Servers, Applications (Microsoft)
Platforms (Microsoft)
Applications, Platforms, Servers (Microsoft)

Note: the list above is not exhaustive.

------------------------
DETAILS
------------------------

During the testing, it was found that MDM is affected with DLL hijacking
vulnerability. The following conditions are required to exploit MDM DLL
hijacking vulnerability:

1. MDM (mdm.exe) is installed
2. Disable script debugging (Other) option is not selected (IE -> Internet
Options -> Advanced)

Tested on Windows 7 SP1, when MDM is installed and enabled on the system,
it was seen to be triggered via multiple Windows applications, as well as
via Windows Administrative service console(s) (*.msc).

When mdm.exe is triggered, it looks for a specific DLL file - msdbgen.dll -
in directories defined in the PATH env variable. It an attacker and / or a
malicious user can place a specially crafted DLL file in any of these
directories, then it is possible to execute arbitrary code with the
privileges of target user. This can potentially result in the attacker
achieving complete control of the affected system.

Exploitation could be performed via multiple Windows applications. A few
scenarios are listed:

------------------------
Exploitation environment:
------------------------

a. Windows 7 SP1
b. Folder - C:\app-folder-RW\ - configured in system PATH env variable
c. Generate calc.exe payload as dll file
msfvenom ap windows/exec cmd=calc.exe af dll ao msdbgen.dll
d. This dll is placed in C:\app-folder-RW\


------------------------
Test Scenario 1 - Microsoft Windows built-in Administrative Service
Consoles
------------------------

This behavior can be exploited even if the target user (administrator /
privileged user) does not run any software.

When the target user (administrator) opens certain Window built-in
administrative tools, mdm.exe is triggered. Some of these *.msc, that
resulted in loading our malicious dll and successfully executed code are:

Services - services.msc
Performance Management - perfmon.msc
Printer Management - printmanagement.msc
Group Policy Editor - gpedit.msc
Resultant Set of Policies - rsop.msc
Component Services - comexp.msc -> triggers services.msc

-> calc opens

In most cases, once the administrator opens up any of the above listed
Windows management service consoles, our code is executed, and then the
service consoles open up with a slight delay. No crashes, easy privilege
escalation and continued persistence without raising flags, eh.

------------------------
Test Scenario 2 - MS Office 2013 SP1 (MS Access)
------------------------

a)
Open MS Access 2013
Menu -> External Data Menu
Select any option - Import Text File / Import XML File etc
-> calc opens

b)
Open MS Access 2013
Create a Table
Export to PDF or Export to Table
-> calc opens

------------------------
Test Scenario 3 - MS Office 2013 SP1 (Excel/Access/Word/others)
------------------------

Open any of the MS Office applications
Menu -> Accounts -> About <app> -> Tech Support
-> calc opens

------------------------
Test Scenario 4.1 - MS HTML Help files (chm)
------------------------

Open any chm file
-> calc opens

------------------------
Test Scenario 4.2 - Product Help Manual Windows (chm)
------------------------

Open any Windows software
Open its Help / Support / Manual / Documentation option
-> calc opens

------------------------

+++++


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    0 Files
  • 17
    Apr 17th
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close