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
|-+  Programación
| |-+  Programación General
| | |-+  ASM (Moderador: Eternal Idol)
| | | |-+  Ayuda!! Como se estructura => PE image data directory exceptions en Binario
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Ayuda!! Como se estructura => PE image data directory exceptions en Binario  (Leído 3,328 veces)
FFernandez

Desconectado Desconectado

Mensajes: 128



Ver Perfil
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


« Última modificación: 29 Septiembre 2021, 23:53 pm por Eternal Idol » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Ayuda: Local data exceeds data segment size limit
Programación C/C++
mjpedia 2 3,622 Último mensaje 4 Junio 2010, 22:10 pm
por Gallu
obtener URL de data:image/jpeg;base64
Dudas Generales
ganondolf 6 5,853 Último mensaje 16 Diciembre 2014, 05:06 am
por engel lex
[ESTRUCTURA DE DATOS] Árbol binario [C++]
Programación C/C++
2Fac3R 0 1,813 Último mensaje 29 Julio 2015, 20:48 pm
por 2Fac3R
Problema con fichero binario en estructura
Programación C/C++
phantoxG 0 1,734 Último mensaje 30 Noviembre 2016, 17:29 pm
por phantoxG
PE image data directory exceptions
Ingeniería Inversa
FFernandez 0 1,701 Último mensaje 19 Septiembre 2021, 22:47 pm
por FFernandez
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines