Autor
|
Tema: EOFEXTRACT - Funcion para extraer el EOF (Leído 4,127 veces)
|
Krackwar ™
Desconectado
Mensajes: 100
|
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ;@ @ ;@ EOFEXTRACT by krackwar @ ;@ krackwar@hotmail.com @ ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ include 'win32ax.inc' .code start: stdcall EOFEXTRACT,"C:\archivo.exe" xor ebx,ebx mov ebx,eax invoke GlobalAlloc,GPTR,4 push eax invoke wsprintf,eax,"0x%x",ebx pop eax push eax invoke MessageBox,0,eax,"EOF data",0 pop eax invoke GlobalFree,eax invoke ExitProcess,0 proc EOFEXTRACT,ruta locals DireccionPE dd ? bUsados dd ? PE dd ? NumeroSecciones dd ? BeginLastSection dd ? hFile dd ? EOF dd ? tamAr dd ? PointerToRawData dd ? IB dd ? SizeOfRawData dd ? endl invoke CreateFile, [ruta], GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0 mov [hFile], eax invoke GetFileSize, [hFile], 0 mov [tamAr], eax invoke GlobalAlloc, GPTR, eax mov [IB], eax invoke ReadFile, [hFile], [IB], [tamAr], addr bUsados, 0 mov ebx ,[IB] add ebx, 0x3c mov eax,dword[ebx] mov [DireccionPE] ,eax xor ebx,ebx mov ebx,[IB] add ebx,eax mov [PE],ebx add ebx,0x6 xor edx,edx mov dx,word[ebx] mov [NumeroSecciones],edx mov eax,$28 mov ebx,[NumeroSecciones] dec ebx mul ebx xor edx,edx mov edx,[DireccionPE] add edx,$F8 add edx,eax mov [BeginLastSection],edx xor eax,eax xor ebx,ebx xor edx,edx mov eax,[IB] mov edx,[BeginLastSection] add eax,edx add eax,16 mov ebx,DWORD[eax] mov [SizeOfRawData],ebx add eax,4 xor ebx,ebx mov ebx,DWORD[eax] mov [PointerToRawData],ebx xor ebx,ebx xor eax,eax mov edx, [PointerToRawData] mov ebx,[SizeOfRawData] add ebx,edx mov [EOF],ebx mov eax,[EOF] ret endp .end start
Gracias a E0N ya que me apoye en un codigo de el en visual basic
|
|
|
En línea
|
WHK es mas u17r4m4573r31337 que yo El error mas grande de el mundo es decir que el ser humano es inteligente. Facismo , antifacismo , etc.. la misma mie rda .. Soy el-> http://tinyurl.com/fantasma-de-krackwarmov ecx,1000 Etiqueta: invoke printf,"No Copiare en clases" loop Etiq
|
|
|
Krackwar ™
Desconectado
Mensajes: 100
|
Modifique un poco este mismo source para que agregue todo lo que este en el EOF lo agregue a la ultima sección, la función esta ultima dse puede mejorar mucho pero mas rato lo paso en "limpio" devuelve el archivo modificado en eax , el tamaño en ebx y el handle en edx . proc KillEOF,ruta locals SizeOfRawDataAumentado dd ? DireccionPE dd ? bUsados dd ? TamañoEOF dd ? PE dd ? NumeroSecciones dd ? BeginLastSection dd ? hFile dd ? EOF dd ? tamAr dd ? PointerToRawData dd ? IB dd ? SizeOfRawData dd ? Virualsize dd ? VirualsizeAumentado dd ? endl invoke CreateFile, [ruta], GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0 mov [hFile], eax invoke GetFileSize, [hFile], 0 mov [tamAr], eax invoke GlobalAlloc, GPTR, eax mov [IB], eax invoke ReadFile, [hFile], [IB], [tamAr], addr bUsados, 0 mov ebx ,[IB] add ebx, 0x3c mov eax,dword[ebx] mov [DireccionPE] ,eax xor ebx,ebx mov ebx,[IB] add ebx,eax mov [PE],ebx add ebx,0x6 xor edx,edx mov dx,word[ebx] mov [NumeroSecciones],edx mov eax,$28 mov ebx,[NumeroSecciones] dec ebx mul ebx xor edx,edx mov edx,[DireccionPE] add edx,$F8 add edx,eax mov [BeginLastSection],edx xor eax,eax xor ebx,ebx xor edx,edx mov eax,[IB] mov edx,[BeginLastSection] add eax,edx add eax,10h mov ebx,DWORD[eax] mov [SizeOfRawData],ebx xor eax,eax xor ebx,ebx xor edx,edx mov eax,[IB] mov edx,[BeginLastSection] add eax,edx add eax,14h mov ebx,DWORD[eax] mov [PointerToRawData],ebx xor ebx,ebx xor eax,eax mov edx, [PointerToRawData] mov ebx,[SizeOfRawData] add ebx,edx mov [EOF],ebx mov eax,[EOF] mov ebx,[tamAr] sub ebx,eax mov [TamañoEOF],ebx xor eax,eax mov eax,[SizeOfRawData] add eax,ebx mov [SizeOfRawDataAumentado],eax xor ebx,ebx mov ebx, [IB] add ebx,[BeginLastSection] add ebx,10h mov dword[ebx],eax xor eax,eax sub ebx,[BeginLastSection] sub ebx,10h add ebx ,[BeginLastSection] add ebx,0x8 mov eax,dword[ebx] add eax,[TamañoEOF] mov dword[ebx],eax sub ebx,0x8 sub ebx,[BeginLastSection] xor eax,eax ;Virualsize mov eax,ebx xor ebx,ebx mov ebx,[tamAr] xor edx,edx mov edx,[hFile] ret endp
|
|
|
En línea
|
WHK es mas u17r4m4573r31337 que yo El error mas grande de el mundo es decir que el ser humano es inteligente. Facismo , antifacismo , etc.. la misma mie rda .. Soy el-> http://tinyurl.com/fantasma-de-krackwarmov ecx,1000 Etiqueta: invoke printf,"No Copiare en clases" loop Etiq
|
|
|
Micah Genji
Desconectado
Mensajes: 52
learn more to life
|
Hola estuve leyendo este code, normamelnte estoy empezando a usar C. Justamente andaba averiguando sobre el valor de EOF en el stdio.h, pero veo que este code es para asm si no me equivoco Cual es la idea de esta extraccion de EOF ? haber si me sirve de alguna idea para un code que quiero realizar Byt3s
|
|
|
En línea
|
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former : A.E
|
|
|
|
Micah Genji
Desconectado
Mensajes: 52
learn more to life
|
Ok gracias por la aclaracion.
Creo que hay mucho por recorrer.
Byt3s
|
|
|
En línea
|
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former : A.E
|
|
|
|
|