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


Tema destacado: También estamos presentes en BlueSky


  Mostrar Mensajes
Páginas: 1 ... 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 [110] 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 ... 128
1091  Programación / Programación C/C++ / Re: Ayuda Find Memory address desde una Dll en: 1 Marzo 2011, 21:34 pm
Puedes usar punteros.

salu2!
1092  Programación / Programación C/C++ / Re: Ayuda con este Source plz!! en: 26 Febrero 2011, 10:54 am
Haber si te ayuda esta api:

http://msdn.microsoft.com/en-us/library/ms646290%28v=vs.85%29.aspx

salu2!
1093  Programación / Programación Visual Basic / Re: Interceptar Winsocks en: 20 Febrero 2011, 00:26 am
e mirado un proyecto y es de inyeccion de código no de api hooking ,no?


sí, son de inyeccion de código pero no me funcionan... xD. No descarte que se pudiera hacer con vb, pero si me esperaba este tipo de fallos JAJA vb no es muy bueno para todo esto..

salu2!
1094  Programación / Programación Visual Basic / Re: Interceptar Winsocks en: 19 Febrero 2011, 23:08 pm
Lo que tu quieres hacer no se puede hacer en VB, lo tendras que hacer en C/c++ o ASM. La tecnica se llama Api Hooking... mira el source code del MsgNigtMare de MazarD.

salu2!
1095  Seguridad Informática / Análisis y Diseño de Malware / Re: Una vez que te inyectas...?? en: 8 Febrero 2011, 15:04 pm
Para poder llamar a la funcion y evitarme otros lios. Intento utilizar una funcion de un juego para enviar datos por sockets y que el protocolo me entienda...
Pense tambien en hookear send y recv pero entonces tendria que descifrar todo el protocolo ( en caso de que este cifrado...) por eso creo que es mas facil averiguar el nombre de la funcion y llamarla.

salu2!
1096  Seguridad Informática / Análisis y Diseño de Malware / Re: Una vez que te inyectas...?? en: 7 Febrero 2011, 23:36 pm
Para C y Linux puedes usar nm, que es un programa que viene con todos los linux, unix y demás...
Suerte!


Es para windows  :-\. Gracias por intentar ayudarme  :)
1097  Seguridad Informática / Análisis y Diseño de Malware / Re: Una vez que te inyectas...?? en: 7 Febrero 2011, 22:25 pm
no, las funciones de windows no sino las del propio programa.

salu2!
1098  Seguridad Informática / Análisis y Diseño de Malware / Una vez que te inyectas...?? en: 7 Febrero 2011, 20:41 pm
Buenas, bueno antes de nada, decir que nose si esto deberia ir aqui, pero como siempre se trata aqui el tema de inyecciones y tal...

Mi duda es la siguiente:

Una vez que te inyectas con una dll en un proceso. Es posible saber las funciones que tiene ese proceso cargadas??? de ser así como lo podria saber??


PD: espero que me hallan entendido   :P


salu2!
1099  Seguridad Informática / Análisis y Diseño de Malware / Re: Ayuda creacion RunPE VB6 en: 28 Enero 2011, 22:33 pm
Gracias, era ese el problema, me equivoque   :xD

Gracias  por la ayuda.



Kazte, hay muchisimos código sobre esto en la red, yo lo ago solo para aprender...

salu2!
1100  Seguridad Informática / Análisis y Diseño de Malware / Ayuda creacion RunPE VB6 en: 28 Enero 2011, 20:54 pm
Bueno, estoi intentando aprender como trabaja el loader de windows y me e puesto a hacer  un runPE, viendo como funcionan otros y tal despues de haber leido varias veces sobre el formato PE, pero tengo problemas, no me funciona correctamente el api NtUnmapViewOfSection ni VirtualAllocEx y nose porque no funcionan bien... el código que tengo es el siguiente:

Código
  1. Option Explicit
  2.  
  3. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Dest As Any, Src As Any, ByVal L As Long)
  4. Private Declare Function CreateProcessA Lib "kernel32" (ByVal lpAppName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
  5. Private Declare Function NtUnmapViewOfSection Lib "NTDLL.dll" (ByVal ProcessHandle As Long, ByVal BaseAddress As Long) As Long
  6. Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
  7.  
  8. Private Const CONTEXT_FULL As Long = &H10007
  9. Private Const MAX_PATH As Integer = 260
  10. Private Const CREATE_SUSPENDED As Long = &H4
  11. Private Const MEM_COMMIT As Long = &H1000
  12. Private Const MEM_RESERVE As Long = &H2000
  13. Private Const PAGE_EXECUTE_READWRITE As Long = &H40
  14.  
  15. Private Type PROCESS_INFORMATION
  16.    hProcess As Long
  17.    hThread As Long
  18.    dwProcessId As Long
  19.    dwThreadID As Long
  20. End Type
  21.  
  22. Private Type STARTUPINFO
  23.    cb As Long
  24.    lpReserved As Long
  25.    lpDesktop As Long
  26.    lpTitle As Long
  27.    dwX As Long
  28.    dwY As Long
  29.    dwXSize As Long
  30.    dwYSize As Long
  31.    dwXCountChars As Long
  32.    dwYCountChars As Long
  33.    dwFillAttribute As Long
  34.    dwFlags As Long
  35.    wShowWindow As Integer
  36.    cbReserved2 As Integer
  37.    lpReserved2 As Long
  38.    hStdInput As Long
  39.    hStdOutput As Long
  40.    hStdError As Long
  41. End Type
  42.  
  43. Private Type IMAGE_DOS_HEADER
  44.    e_magic As Integer
  45.    e_cblp As Integer
  46.    e_cp As Integer
  47.    e_crlc As Integer
  48.    e_cparhdr As Integer
  49.    e_minalloc As Integer
  50.    e_maxalloc As Integer
  51.    e_ss As Integer
  52.    e_sp As Integer
  53.    e_csum As Integer
  54.    e_ip As Integer
  55.    e_cs As Integer
  56.    e_lfarlc As Integer
  57.    e_ovno As Integer
  58.    e_res(0 To 3) As Integer
  59.    e_oemid As Integer
  60.    e_oeminfo As Integer
  61.    e_res2(0 To 9) As Integer
  62.    e_lfanew As Long
  63. End Type
  64.  
  65. Private Type IMAGE_FILE_HEADER
  66.    Machine As Integer
  67.    NumberOfSections As Integer
  68.    TimeDateStamp As Long
  69.    PointerToSymbolTable As Long
  70.    NumberOfSymbols As Long
  71.    SizeOfOptionalHeader As Integer
  72.    characteristics As Integer
  73. End Type
  74.  
  75. Private Type IMAGE_DATA_DIRECTORY
  76.    VirtualAddress As Long
  77.    Size As Long
  78. End Type
  79.  
  80. Const IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16
  81.  
  82. Private Type IMAGE_OPTIONAL_HEADER
  83.    Magic As Integer
  84.    MajorLinkerVersion As Byte
  85.    MinorLinkerVersion As Byte
  86.    SizeOfCode As Long
  87.    SizeOfInitializedData As Long
  88.    SizeOfUnitializedData As Long
  89.    AddressOfEntryPoint As Long
  90.    BaseOfCode As Long
  91.    BaseOfData As Long
  92.    ImageBase As Long
  93.    SectionAlignment As Long
  94.    FileAlignment As Long
  95.    MajorOperatingSystemVersion As Integer
  96.    MinorOperatingSystemVersion As Integer
  97.    MajorImageVersion As Integer
  98.    MinorImageVersion As Integer
  99.    MajorSubsystemVersion As Integer
  100.    MinorSubsystemVersion As Integer
  101.    W32VersionValue As Long
  102.    SizeOfImage As Long
  103.    SizeOfHeaders As Long
  104.    CheckSum As Long
  105.    SubSystem As Integer
  106.    DllCharacteristics As Integer
  107.    SizeOfStackReserve As Long
  108.    SizeOfStackCommit As Long
  109.    SizeOfHeapReserve As Long
  110.    SizeOfHeapCommit As Long
  111.    LoaderFlags As Long
  112.    NumberOfRvaAndSizes As Long
  113.    DataDirectory(0 To IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1) As IMAGE_DATA_DIRECTORY
  114. End Type
  115.  
  116. Private Type IMAGE_NT_HEADERS
  117.    Signature As Long
  118.    FileHeader As IMAGE_FILE_HEADER
  119.    OptionalHeader As IMAGE_OPTIONAL_HEADER
  120. End Type
  121.  
  122. Const IMAGE_SIZEOF_SHORT_NAME = 8
  123.  
  124. Private Type IMAGE_SECTION_HEADER
  125.   SecName As String * IMAGE_SIZEOF_SHORT_NAME
  126.   VirtualSize As Long
  127.   VirtualAddress  As Long
  128.   SizeOfRawData As Long
  129.   PointerToRawData As Long
  130.   PointerToRelocations As Long
  131.   PointerToLinenumbers As Long
  132.   NumberOfRelocations As Integer
  133.   NumberOfLinenumbers As Integer
  134.   characteristics  As Long
  135. End Type
  136.  
  137. Public Function EjecutarPE(ByVal Ruta As String) As Boolean
  138.    On Error GoTo error
  139.  
  140.    Dim IDH As IMAGE_DOS_HEADER
  141.    Dim INH As IMAGE_NT_HEADERS
  142.    Dim ISH() As IMAGE_SECTION_HEADER
  143.    Dim IDD As IMAGE_DATA_DIRECTORY
  144.  
  145.    Dim Datos() As Byte
  146.  
  147.    ReDim Datos(FileLen(Ruta))
  148.  
  149.    Open Ruta For Binary As #1
  150.        Get #1, , Datos
  151.    Close #1
  152.  
  153.    Call CopyMemory(IDH, Datos(0), Len(IDH))
  154.    Call CopyMemory(INH, Datos(IDH.e_lfanew), Len(INH))
  155.  
  156.    Dim MYe_lfanew As Long: MYe_lfanew = IDH.e_lfanew
  157.    Dim MYImageBase As Long: MYImageBase = INH.OptionalHeader.ImageBase
  158.    Dim MYSizeOfImage As Long: MYSizeOfImage = INH.OptionalHeader.SizeOfImage
  159.    Dim MYSizeOfHeaders As Long: MYSizeOfHeaders = INH.OptionalHeader.SizeOfHeaders
  160.    Dim MYAddressOfEntryPoint As Long: MYAddressOfEntryPoint = INH.OptionalHeader.AddressOfEntryPoint
  161.    Dim MYNumberOfSections As Integer:  MYNumberOfSections = INH.FileHeader.NumberOfSections
  162.    Dim MYVirtualAddress As Long
  163.    Dim MYPointerToRawData As Long
  164.    Dim MYSizeOfRawData As Long
  165.  
  166.    Dim ManijaProceso As Long
  167.    Dim pi As PROCESS_INFORMATION
  168.    Dim si As STARTUPINFO
  169.    Dim NTUN As Long
  170.    Dim Espacio As Long
  171.    Dim IdProc As Long
  172.  
  173.    Call CreateProcessA(App.Path & "\" & App.EXEName & ".exe", 0, 0, 0, False, CREATE_SUSPENDED, 0, 0, si, pi)
  174.    ManijaProceso = pi.dwProcessId
  175.  
  176.    NTUN = NtUnmapViewOfSection(ManijaProceso, MYImageBase)
  177.  
  178.    Espacio = VirtualAllocEx(ManijaProceso, MYImageBase, MYSizeOfImage, &H1000& Or &H2000&, &H40)
  179.  
  180.    Exit Function
  181. error:
  182.    EjecutarPE = False
  183. End Function
  184.  
  185.  
  186.  

Agradeceria que alguien me dijese que ago mal.

salu2!
Páginas: 1 ... 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 [110] 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 ... 128
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines