Título: ayuda Patchit script
Publicado por: renzho7 en 11 Abril 2010, 04:35 am
bueno estuve buscando un programa relacionado con ollydbg y encontre esto http://www.foundstone.com/us/resources/proddesc/patchit.htm FILE "MGUI.dll" MESSAGE "Patching PublicKeyToken for MGUI.dll" FIND $79 $82 $76 $05 $57 $09 $c9 $8a PATCH $79 $f4 $82 $9b $76 $13 $05 $0a $57 $39 $09 $b9 $c9 $a8 $8a $77
el problema es qeu no entinedo que hacen esos Find el programa tambien vino con intrcciones Commands and syntax: ; ; A comment starts with a ';'. All text to the end of the line is ignored. ; All string values must be enclosed in double quotes "...". ; HEX numbers must be preceeded with a "$". ; Commands are not case sensistive. ; All whitespace is ignored. ; ; TITLE <"title"> ; Displays a message when the script is loaded/run. ; Can be placed anywhere within the script. ; MESSAGE <"message"> ; Displays a message during script execution. ; DIR <"directory path"> ; Optional directory path to search for files. ; For compatibility it is advisable not to use specific ; drive names in the path. ; FILE <"filename"> [filesize] ; Filename to patch. Optional filesize specifies the size ; that the file must match to be accepted. ; FIND <byte> [<*>]... ; Performs a search on the current file for the sequence ; of bytes that match <byte>... up to max 256. Use the ; keyword * to match any byte. If a match is found then ; the PATCH file position value is set to the file ; position at which the found pattern begins. ; FUNCTION <"funcname"> ; Sets the current patch position to the file position of ; the given exported function name (case sensitive). It is ; assumed that the file being patched is a DLL. ; PATCH [[POS <file_pos>] | [OFFSET <file_offset>]] <orig_byte> <new_byte>... ; Patches the current file at optional file position/offset. ; Replaces orig_byte with new_byte. Fails if original byte ; read from file is not orig_byte. quiera saber si alguien ya ha tenido experiencia con estos scripts y si tiene algun manual para guiarme y aprender
Título: Re: ayuda Patchit script
Publicado por: biribau en 29 Abril 2010, 23:37 pm
mmm, no conocía ese programa, yo parcheaba a mano :-\ yluego hacía un parche con una comparación de ficheros(uso una tool gráfica). Pero lo del find creo que te lo puedo explicar. Si has parcheado algo, a veces necesitas encontrar donde está lo que quieres parchear, y calcular el offset dentro del fichero es un poco pesado, otras veces cambia la versión del fichero cambiando los offsets pero el codigo a parchear es el mismo. Pues lo que se suele hacer es coger el olly, copiar el dump(los bytes) y pegar en un editor hexadecimal, buscas y ya está es muy directo, un método para vagos :laugh:. Pero para buscar el código necesitas una cadena larga para no colisionar con otra coincidencia, a mas largo menos probabilidad de que esté repetida. Pues ese find, busca una cadena de bytes, te pone en esa posicion y el siguiente patch que hagas será ahí.
P.D.: este post debería estar en ingeniería inversa
|