Título: Ayuda!! Como se estructura => PE image data directory exceptions en Binario Publicado por: FFernandez 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 (https://i2.wp.com/blog.trailofbits.com/wp-content/uploads/2019/01/exceptionblog-1.jpg?resize=690%2C334&ssl=1) 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 |