Lucene search
K

Safe Returner 1.27.5 Commandline Vulnerability

🗓️ 28 Oct 2010 00:00:00Reported by STRELiTZIAType 
zdt
 zdt
🔗 0day.today👁 16 Views

Safe Returner 1.27.5 Commandline Vulnerability, Path Vulnerability, Microsoft Security Remark

Code
==============================================
Safe Returner 1.27.5 Commandline Vulnerability
==============================================


Exploit Title  : [Commandline vulnerability]
Date           : [27 Oct 2010]
Author         : [STRELiTZIA]
Software       : [Safe Returner 1.27.5]
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 "Program Files" directory.
2- Rename "Test.exe" to "Safe.exe"

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

============================
=          Tests           =
============================
- Launch SafeReturner.exe.
- Goto "Scan tab", then click "Scan".

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

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



#  0day.today [2018-04-12]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation