From dcddf83a4414d7bdb1595f575b7a832721cd0225 Mon Sep 17 00:00:00 2001 From: Stefano Moioli Date: Sat, 13 Apr 2024 04:26:41 +0200 Subject: [PATCH] global_context_t: add disable_backdoor field --- xzre.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xzre.h b/xzre.h index 6b8be6e..92dd2e5 100644 --- a/xzre.h +++ b/xzre.h @@ -662,6 +662,14 @@ typedef struct __attribute__((packed)) global_context { */ imported_funcs_t *imported_funcs; libc_imports_t* libc_imports; + /** + * @brief + * This flag gets set to TRUE by @ref run_backdoor_commands if any of the validity checks fail, + * making future invocations return immediately. + * + * It's likely both a safety check and an anti tampering mechanism. + */ + BOOL disable_backdoor; PADDING(0x68); /** * @brief @@ -701,6 +709,7 @@ typedef struct __attribute__((packed)) global_context { assert_offset(global_context_t, imported_funcs, 0x8); assert_offset(global_context_t, libc_imports, 0x10); +assert_offset(global_context_t, disable_backdoor, 0x18) assert_offset(global_context_t, code_range_start, 0x80); assert_offset(global_context_t, code_range_end, 0x88); assert_offset(global_context_t, secret_data, 0x108);