// back

NGSEC StackDefender 2.0 Invalid Pointer Dereference Vulnerability

08.03.04

BACKGROUND

StackDefender is an IPS (Intrusion Prevention System), for Win32
platforms, that will deny shellcode from executing in User Stack and
Writable memory regions. StackDefender uses PAX technology for this
purpose.

DESCRIPTION

StackDefender offers protection by hooking ZwAllocateVirtualMemory and
ZwProtectVirtualMemory functions. These two kernel API's are responsible
for allocating and protecting memory. The ZwProtectVirtualMemory
function declaration is as follows:

   ZwProtectVirtualMemory(HANDLE ProcessHandle, PVOID *BaseAddress,
      PULONG ProtectSize, ULONG NewProtect, PULONG OldProtect);

The problem specifically exists because StackDefender fails to verify
'BaseAddress' as a valid address prior dereferencing it as a pointer.

ANALYSIS

Successful exploitation allows remote attackers to cause the underlying
system to crash. This is possible by specifying an invalid address for
'BaseAddress'. Exploitation requires that an attacker has an
exploitation vector to the system that StackDefender attempts to block.

DETECTION

iDEFENSE has confirmed the existence of this vulnerability in the latest
version of StackDefender, version 2.0.

WORKAROUND

iDEFENSE is currently unaware of any workarounds for this issue.

VENDOR RESPONSE

The vendor has released the following patch fixing this issue:

http://www.ngsec.com/downloads/stackdefender/StackDefender-2.10.exe

CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2004-0766 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

DISCLOSURE TIMELINE

07/10/2004    Vulnerability discovered by iDEFENSE
07/12/2004    Initial vendor notification
07/22/2004    Initial vendor response
08/03/2004    Public disclosure

CREDIT

Peter Silberman (iDEFENSE Labs) is credited with the discovery of this
vulnerability.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

LEGAL NOTICES

Copyright © 2004 Verisign, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.