n00b
June 3rd, 2009, 08:01
Hi guys i do allot of exploit development and found a nice heap overflow triggered in an application when adding FFFFFFF to the header of a file.
I put it in ida pro and got some disassembly of the vulnerable function i was wondering if any one could explain in better detail what was happing just before the exception is triggered.
I have provided disassembly of the memcpy() function below.If any one could help it would be greatly appreciated thank you for your time.

the last instruction the eip adress is loaded with the location on _MEMCPY+33
I put it in ida pro and got some disassembly of the vulnerable function i was wondering if any one could explain in better detail what was happing just before the exception is triggered.
I have provided disassembly of the memcpy() function below.If any one could help it would be greatly appreciated thank you for your time.

Code:
0044E9B1 sub_44E940
.text:0044E9A1
.text:0044E9A1 loc_44E9A1:
.text:0044E9A1 mov eax, [ebx+4]
.text:0044E9A4 mov ecx, [esp+0Ch+Count]
.text:0044E9A8 mov edx, [esp+0Ch+DstBuf]
.text:0044E9AC push eax ; File
.text:0044E9AD push ecx ; Count
.text:0044E9AE push 1 ; ElementSize
.text:0044E9B0 push edx ; Dst
===============================================================================
0053C3B7 int __cdecl sub_53C39F(void *DstBuf, size_t ElementSize, size_t Count,
FILE *File)
push ebp
.text:0053C3A0 mov ebp, esp
.text:0053C3A2 push esi
.text:0053C3A3 push [ebp+File]
.text:0053C3A6 call __lock_file
.text:0053C3AB push [ebp+File] ; File
.text:0053C3AE push [ebp+Count] ; Count
.text:0053C3B1 push [ebp+ElementSize] ; ElementSize
.text:0053C3B4 push [ebp+DstBuf] ; DstBuf
.text:0053C3B7 call _fread
================================================================================
0053C42C size_t __cdecl fread(void *DstBuf, size_t ElementSize, size_t Count,
FILE *File)
.text:0053C428
.text:0053C428 loc_53C428: ; Size
.text:0053C428 push edi
.text:0053C429 push dword ptr [esi] ; Src
.text:0053C42B push ebx ; Dst
.text:0053C42C call _memcpy_0
00540923 void *__cdecl memcpy_0(void *Dst, const void *Src, size_t Size)
.text:00540925 jmp dsff_540A38[
the last instruction the eip adress is loaded with the location on _MEMCPY+33