Kaspersky Updater GUI 2.2.0.72 Commandline Vulnerability

2010-10-28T00:00:00
ID 1337DAY-ID-14618
Type zdt
Reporter STRELiTZIA
Modified 2010-10-28T00:00:00

Description

Exploit for windows platform in category local exploits

                                        
                                            ========================================================
Kaspersky Updater GUI 2.2.0.72 Commandline Vulnerability
========================================================


Exploit Title  : [Commandline vulnerability]
Date           : [27 Oct 2010]
Author         : [STRELiTZIA]
Software       : [Kaspersky Updater GUI 2.2.0.72]
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- Unzip "gui_for_win_updater_v2.2.0.72.zip" into "C" drive.
2- Rename "gui_for_win_updater_v2.2.0.72" folder to "Test gui_for_win_updater"
2- Copy "Test.exe" into "C" drive.

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

============================
=          Tests           =
============================
- Launch "KasperskyUpdater.exe".
- Check Kaspersky lab products.
- Click "Apply".
- Click "Start".

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

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



#  0day.today [2018-01-01]  #