WinMount 3.4.1020 Final Commandline Vulnerability

2010-01-16T00:00:00
ID 1337DAY-ID-14619
Type zdt
Reporter STRELiTZIA
Modified 2010-01-16T00:00:00

Description

Exploit for windows platform in category local exploits

                                        
                                            =================================================
WinMount 3.4.1020 Final Commandline Vulnerability
=================================================


Exploit Title  : [Commandline vulnerability]
Date           : [27 Oct 2010]
Author         : [STRELiTZIA]
Software       : [WinMount 3.4.1020 Final]
Tested on      : [Windows Xp SP3]
	
============================
=       Description        = 
============================

[Microsoft security remarks (MSDN Library)]
The executable name is treated as the first white space-delimited string in lpCmdLine.
If the executable or path name has a space in it, there is a risk that a different executable could be run 
because of the way the function parses spaces. 

The following example is dangerous because the function will attempt to run "Program.exe", if it exists, instead of "MyApp.exe".
WinExec("C:\\Program Files\\MyApp", ...)

If a malicious user were to create an application called "Program.exe" on a system, any program that incorrectly calls WinExec
using the Program Files directory will run this application instead of the intended application.

To avoid this problem, use CreateProcess rather than WinExec. 
However, if you must use WinExec for legacy reasons, make sure the application name is enclosed 
in quotation marks as shown in the example below.
WinExec("\"C:\\Program Files\\MyApp.exe\" -L -S", ...)
[Microsoft security remarks (MSDN Library)]


Microsoft has already warned there are flaws in the "BAD" use of CommandLine option 
function affecting the paths that have spaces. 

Vulnerability that can allow attackers to execute malicious code locally, without user consent.


============================
=       Instructions       =
============================
1- Copy "Test.exe" into "C" drive.
2- Rename "Test.exe" to "Program.exe"

You can also rename "Test.exe" to:
C:\Program (Without extension)

============================
=          Tests           =
============================
- Launch "WinMount.exe".
- Goto "Browser tab" -->> "Advance".
- Goto "Help Menu" -->> "Bug Reporter".

============================
=        Test Source       =
============================
program Test;
uses
  Windows;

begin
    MessageBox
      (
      0,
      'Warning, vulnerability detected ;)',
      'Exploit test',
      MB_ICONERROR
      )
end.



#  0day.today [2018-03-10]  #