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

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


  Mostrar Temas
Páginas: 1 [2] 3
11  Programación / ASM / Ayuda!! Como se estructura => PE image data directory exceptions en Binario en: 25 Septiembre 2021, 23:30 pm
Estoy devuelta, y con las pilas recargadas, para seguir con el proyecto, no encuentro información concisa sobre el formato de las excepciones, alguien podría facilitarme un enlace, gracias

https://foro.elhacker.net/ingenieria_inversa/estructuras_binarias_x8664-t505205.0.html


Aquí tengo algo, pero me faltan detalles .............

https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64?view=msvc-160



typedef enum _UNWIND_OP_CODES {
    UWOP_PUSH_NONVOL = 0, /* info == register number */
    UWOP_ALLOC_LARGE,     /* no info, alloc size in next 2 slots */
    UWOP_ALLOC_SMALL,     /* info == size of allocation / 8 - 1 */
    UWOP_SET_FPREG,       /* no info, FP = RSP + UNWIND_INFO.FPRegOffset*16 */
    UWOP_SAVE_NONVOL,     /* info == register number, offset in next slot */
    UWOP_SAVE_NONVOL_FAR, /* info == register number, offset in next 2 slots */
    UWOP_SAVE_XMM128 = 8, /* info == XMM reg number, offset in next slot */
    UWOP_SAVE_XMM128_FAR, /* info == XMM reg number, offset in next 2 slots */
    UWOP_PUSH_MACHFRAME   /* info == 0: no error-code, 1: error-code */
} UNWIND_CODE_OPS;

typedef union _UNWIND_CODE {
    struct {
        UBYTE CodeOffset;
        UBYTE UnwindOp : 4;
        UBYTE OpInfo   : 4;
    };
    USHORT FrameOffset;
} UNWIND_CODE, *PUNWIND_CODE;

#define UNW_FLAG_EHANDLER  0x01
#define UNW_FLAG_UHANDLER  0x02
#define UNW_FLAG_CHAININFO 0x04

typedef struct _UNWIND_INFO {
    UBYTE Version       : 3;
    UBYTE Flags         : 5;
    UBYTE SizeOfProlog;
    UBYTE CountOfCodes;
    UBYTE FrameRegister : 4;
    UBYTE FrameOffset   : 4;
    UNWIND_CODE UnwindCode[1];
/*  UNWIND_CODE MoreUnwindCode[((CountOfCodes + 1) & ~1) - 1];
*   union {
*       OPTIONAL ULONG ExceptionHandler;
*       OPTIONAL ULONG FunctionEntry;
*   };
*   OPTIONAL ULONG ExceptionData[]; */
} UNWIND_INFO, *PUNWIND_INFO;

typedef struct _RUNTIME_FUNCTION {
    ULONG BeginAddress;
    ULONG EndAddress;
    ULONG UnwindData;
} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;

#define GetUnwindCodeEntry(info, index) \
    ((info)->UnwindCode[index])

#define GetLanguageSpecificDataPtr(info) \
    ((PVOID)&GetUnwindCodeEntry((info),((info)->CountOfCodes + 1) & ~1))

#define GetExceptionHandler(base, info) \
    ((PEXCEPTION_HANDLER)((base) + *(PULONG)GetLanguageSpecificDataPtr(info)))

#define GetChainedFunctionEntry(base, info) \
    ((PRUNTIME_FUNCTION)((base) + *(PULONG)GetLanguageSpecificDataPtr(info)))

#define GetExceptionDataPtr(info) \
    ((PVOID)((PULONG)GetLanguageSpecificData(info) + 1)


Estas entradas de tabla como se que han terminado "typedef struct _RUNTIME_FUNCTION " ????????????



Resuelto  https://www.leviathansecurity.com/blog/use-of-windows-exception-handling-metadata
12  Programación / Ingeniería Inversa / PE image data directory exceptions en: 19 Septiembre 2021, 22:47 pm
Estoy devuelta, y con las pilas recargadas, para seguir con el proyecto, no encuentro información concisa sobre el formato de las excepciones, alguien podría facilitarme un enlace, gracias

https://foro.elhacker.net/ingenieria_inversa/estructuras_binarias_x8664-t505205.0.html


Aquí tengo algo, pero me faltan detalles .............

https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64?view=msvc-160
13  Programación / Ingeniería Inversa / New proyecto, descifrar archivos ejecutables en: 22 Diciembre 2020, 23:35 pm
Primero:
1º averiguar longitud de la clave ¿si existe?
2º si no existe, averiguar el algoritmo
Todo sin entrar en las funciones que lo ha creado.
Segundo: ¿???



Quien se apunta?
14  Programación / Ingeniería Inversa / Busco la estructura “MUI” del directorio de recursos del archivo PE en: 20 Diciembre 2020, 23:06 pm
He encontrado esto, en el primer enlace me cuadra con la realidad viendo el código en hexadecimal.  Pero no encuentro la explicación de cada ítem correctamente, tengo localizado
Signatura, size, etc y el final  UltimateFallbackLanguage. El resto no lo puedo determinar???

El segundo enlace es para obtenerlo por código, y no me sirve para desensamblar


https://docs.microsoft.com/en-us/windows/win32/intl/resource-utilities

https://docs.microsoft.com/en-us/windows/win32/api/winnls/ns-winnls-filemuiinfo


 >:(


Resuelto y publicado
    ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-)

Gracias  Apuromafo CLS    :D
15  Foros Generales / Dudas Generales / Como pegar codigo en esta web y que aparezca con colores en: 2 Diciembre 2020, 22:20 pm
Gracias


Selecionando texto, si se hacerlo y veo los codigos, pero pegar codigo directamente como se hace?

Solucionado, donde pone "Código GeShi"  cuando pegamos código selecionamos otro codigo.
16  Programación / Ingeniería Inversa / Distinguir entre DATOS E INSTRUCCIONES? en: 21 Octubre 2020, 22:45 pm
Un saludo a todos:

¿Examinando  el código binario de un “ .EXE”, sabe alguien como distinguir entre DATOS E INSTRUCCIONES?

¿ Como encontrar la primera instrucción que se ejecuta ?

          Gracias….
17  Programación / Ingeniería Inversa / Ayuda complicada en: 19 Septiembre 2020, 21:05 pm
Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes:1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D and 4   
Vol. 2D A-29    OPCODE MAP

Esta página está en blanco, aquí vendría los Mapas de Instrucciones  VEX, EVEX y sus Grupos.

Alguien tan amable que tenga estos mapas de INTEL, podría pasármelos…………….   
Es para comprobar las literaturas……….  Y entender las distintas literaturas que veo por internet.
Intel al utilizar una literatura distinta en los Mapas de código me ayuda a entender mejor
Lo que me traigo entre manos.   Gracias de antemano……………………..jeje
18  Programación / ASM / Instrucción con definición contradictoria en: 25 Agosto 2020, 23:28 pm
Cambiando de tercio, me he encontrado con dos definiciones de la instrucción en assembler  " LSL  " Opcode  "0F-03"   una en el manual de Intel y otra en el manual de AMD.   Alguien me da la LUZ   💡
19  Programación / .NET (C#, VB.NET, ASP) / Compilador JIT en .NET en: 22 Agosto 2020, 18:40 pm
Compilador JIT en .NET,   Cuando una aplicación .NET se carga en memoria sigue estando en lenguaje intermedio????
20  Programación / Ingeniería Inversa / Para que sirve el desplazamiento en las instruciones aparte de Effective address en: 20 Julio 2020, 21:20 pm
Solo veo que se añaden 00 00 00 00   Ceros..............    en este ejemplo:

Example A-2.  Look-up Example for 2-Byte OpcodesLook-up opcode 0FA4050000000003H for a SHLD instruction using Table A-3.•The opcode is located in row A, column 4. The location indicates a SHLD instruction with operands Ev, Gv, and Ib. Interpret the operands as follows:—   Ev: The ModR/M byte follows the opcode to specify a word or doubleword operand.—   Gv: The reg field of the ModR/M byte selects a general-purpose register.—   Ib: Immediate data is encoded in the subsequent byte of the instruction.•The third byte is the ModR/M byte (05H). The mod and opcode/reg fields of ModR/M indicate that a 32-bit displacement is used to locate the first operand in memory and eAX as the second operand.•The next part of the opcode is the 32-bit displacement for the destination memory operand (00000000H). The last byte stores immediate byte that provides the count of the shift (03H).•By this breakdown, it has been shown that this opcode represents the instruction: SHLD DS:00000000H, EAX, 3.



En este ejemplo ocurre lo contrario


3DNOW  ?????

WEB Utlizada https://defuse.ca/online-x86-assembler.htm#disassembly


PFMUL  mm1, [ebx+eax*4+10]

67 0f 0f 4c 83 0a b4

Coincide con el ejemplo del manual  https://www.amd.com/system/files/TechDocs/21928.pdf



En teoria el 4C es el MOD/rm

En binario 01 001 100      01 disp 8           100 requiere SIB       001 ECX

el SIB   83

en Binario  10 000 011      10  *4              000 EAX                011 EBX

0A es el desplazamiento  = 10 en decimal

En este ejemplo el Desplazamiento es utilizado?????          
Páginas: 1 [2] 3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines