elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  [SRC] AntiOlly, Export Table Error
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [SRC] AntiOlly, Export Table Error  (Leído 1,696 veces)
Karcrack


Desconectado Desconectado

Mensajes: 2.416


Se siente observado ¬¬'


Ver Perfil
[SRC] AntiOlly, Export Table Error
« en: 18 Enero 2009, 00:48 am »

Bueno, por lo visto al Olly no le gustan las Export Tables que no exportan :xD :xD
Aqui hay un code para parchear un fichero ;D

Lo he traducido de un codigo en Delphi, para mas Info mirar en los comentarios :)

Lo he provado con el OllyDbg v1 y da errores.. pero con el OllyDbg BETA lo carga sin problemas :( :P

Código
  1. '---------------------------------------------------------------------------------------
  2. ' Module    : mNoOlly
  3. ' Author    : Karcrack
  4. ' DateTime  : 18/01/2009  00:41
  5. ' Purpose   : AntiOlly
  6. ' Reference : http://hackhound.org/forum/index.php?topic=8387.0;topicseen
  7. '
  8. ' Thanks    : Cobein, for his ChangeOEP code :D
  9. '---------------------------------------------------------------------------------------
  10.  
  11. Option Explicit
  12.  
  13. Private Const IMAGE_DOS_SIGNATURE           As Long = &H5A4D&
  14. Private Const IMAGE_NT_SIGNATURE            As Long = &H4550&
  15.  
  16. Private Const SIZE_DOS_HEADER               As Long = &H40
  17. Private Const SIZE_NT_HEADERS               As Long = &HF8
  18. Private Const SIZE_SECTION_HEADER           As Long = &H28
  19.  
  20. Private Type IMAGE_DOS_HEADER
  21.    e_magic                     As Integer
  22.    e_cblp                      As Integer
  23.    e_cp                        As Integer
  24.    e_crlc                      As Integer
  25.    e_cparhdr                   As Integer
  26.    e_minalloc                  As Integer
  27.    e_maxalloc                  As Integer
  28.    e_ss                        As Integer
  29.    e_sp                        As Integer
  30.    e_csum                      As Integer
  31.    e_ip                        As Integer
  32.    e_cs                        As Integer
  33.    e_lfarlc                    As Integer
  34.    e_ovno                      As Integer
  35.    e_res(0 To 3)               As Integer
  36.    e_oemid                     As Integer
  37.    e_oeminfo                   As Integer
  38.    e_res2(0 To 9)              As Integer
  39.    e_lfanew                    As Long
  40. End Type
  41.  
  42. Private Type IMAGE_FILE_HEADER
  43.    Machine                     As Integer
  44.    NumberOfSections            As Integer
  45.    TimeDateStamp               As Long
  46.    PointerToSymbolTable        As Long
  47.    NumberOfSymbols             As Long
  48.    SizeOfOptionalHeader        As Integer
  49.    characteristics             As Integer
  50. End Type
  51.  
  52. Private Type IMAGE_DATA_DIRECTORY
  53.    VirtualAddress              As Long
  54.    Size                        As Long
  55. End Type
  56.  
  57. Private Type IMAGE_OPTIONAL_HEADER
  58.    Magic                       As Integer
  59.    MajorLinkerVersion          As Byte
  60.    MinorLinkerVersion          As Byte
  61.    SizeOfCode                  As Long
  62.    SizeOfInitializedData       As Long
  63.    SizeOfUnitializedData       As Long
  64.    AddressOfEntryPoint         As Long
  65.    BaseOfCode                  As Long
  66.    BaseOfData                  As Long
  67.    ImageBase                   As Long
  68.    SectionAlignment            As Long
  69.    FileAlignment               As Long
  70.    MajorOperatingSystemVersion As Integer
  71.    MinorOperatingSystemVersion As Integer
  72.    MajorImageVersion           As Integer
  73.    MinorImageVersion           As Integer
  74.    MajorSubsystemVersion       As Integer
  75.    MinorSubsystemVersion       As Integer
  76.    W32VersionValue             As Long
  77.    SizeOfImage                 As Long
  78.    SizeOfHeaders               As Long
  79.    CheckSum                    As Long
  80.    SubSystem                   As Integer
  81.    DllCharacteristics          As Integer
  82.    SizeOfStackReserve          As Long
  83.    SizeOfStackCommit           As Long
  84.    SizeOfHeapReserve           As Long
  85.    SizeOfHeapCommit            As Long
  86.    LoaderFlags                 As Long
  87.    NumberOfRvaAndSizes         As Long
  88.    DataDirectory(0 To 15)      As IMAGE_DATA_DIRECTORY
  89. End Type
  90.  
  91. Private Type IMAGE_NT_HEADERS
  92.    Signature                   As Long
  93.    FileHeader                  As IMAGE_FILE_HEADER
  94.    OptionalHeader              As IMAGE_OPTIONAL_HEADER
  95. End Type
  96.  
  97. Private Type IMAGE_SECTION_HEADER
  98.    SecName                     As String * 8
  99.    VirtualSize                 As Long
  100.    VirtualAddress              As Long
  101.    SizeOfRawData               As Long
  102.    PointerToRawData            As Long
  103.    PointerToRelocations        As Long
  104.    PointerToLinenumbers        As Long
  105.    NumberOfRelocations         As Integer
  106.    NumberOfLinenumbers         As Integer
  107.    characteristics             As Long
  108. End Type
  109.  
  110. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Dest As Any, Src As Any, ByVal L As Long)
  111.  
  112. Public Function PatchFile(ByRef bFile() As Byte) As Byte()
  113.    Dim IDH     As IMAGE_DOS_HEADER
  114.    Dim INH     As IMAGE_NT_HEADERS
  115.  
  116.    Call CopyMemory(IDH, bFile(0), SIZE_DOS_HEADER)
  117.  
  118.    If IDH.e_magic = IMAGE_DOS_SIGNATURE Then
  119.        Call CopyMemory(INH, bFile(IDH.e_lfanew), SIZE_NT_HEADERS)
  120.        If INH.Signature = IMAGE_NT_SIGNATURE Then
  121.            INH.OptionalHeader.DataDirectory(0).VirtualAddress = &H1000
  122.            INH.OptionalHeader.DataDirectory(0).Size = &HF000
  123.            Call CopyMemory(bFile(IDH.e_lfanew), INH, SIZE_NT_HEADERS)
  124.            PatchFile = bFile
  125.        End If
  126.    End If
  127. End Function

Saludos ;D


En línea

karmany
Colaborador
***
Desconectado Desconectado

Mensajes: 1.614


Sueñas que sueñas


Ver Perfil WWW
Re: [SRC] AntiOlly, Export Table Error
« Respuesta #1 en: 18 Enero 2009, 00:58 am »

Muy interesante Karcrack. Le echaré un vistazo...jeje

Gracias


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
comando export
Scripting
NewBe 5 4,806 Último mensaje 11 Noviembre 2011, 18:18 pm
por bdurruti
How to export Android sms to pc
Android
lucyanna 2 3,614 Último mensaje 30 Octubre 2012, 08:05 am
por markyorose
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines