Skip to content

Commit

Permalink
fix elf_handles_t layout
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 7, 2024
1 parent 29c0bbc commit 838672a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,15 @@ typedef struct __attribute__((packed)) {
*/
elf_info_t *tmp;
elf_info_t *libc;
elf_info_t *liblzma;
elf_info_t *libcrypto;
} elf_handles_t;

assert_offset(elf_handles_t, main, 0x0);
assert_offset(elf_handles_t, tmp, 0x8);
assert_offset(elf_handles_t, libc, 0x10);
assert_offset(elf_handles_t, libcrypto, 0x18);
assert_offset(elf_handles_t, liblzma, 0x18);
assert_offset(elf_handles_t, libcrypto, 0x20);

typedef struct __attribute__((packed)) {
elf_handles_t *handles;
Expand Down Expand Up @@ -593,11 +595,6 @@ typedef struct __attribute__((packed)) backdoor_data {

elf_handles_t elf_handles;

/**
* @brief points to @ref libcrypto_info
*/
elf_info_t *libcrypto;

/**
* @brief points to the beginning of this struct
*/
Expand Down Expand Up @@ -636,7 +633,6 @@ assert_offset(backdoor_data_t, libcrypto_map, 0x18);
assert_offset(backdoor_data_t, libsystemd_map, 0x20);
assert_offset(backdoor_data_t, libc_map, 0x28);
assert_offset(backdoor_data_t, elf_handles, 0x30);
assert_offset(backdoor_data_t, libcrypto, 0x50);
assert_offset(backdoor_data_t, libc_info, 0x268);
assert_offset(backdoor_data_t, libcrypto_info, 0x468);
assert_offset(backdoor_data_t, libc_imports, 0x568);
Expand Down

0 comments on commit 838672a

Please sign in to comment.