payload union within run_backdoor_commands
+
The documentation for this union was generated from the following file:
diff --git a/xzre_8h.html b/xzre_8h.html
index ff3835a..d544774 100644
--- a/xzre_8h.html
+++ b/xzre_8h.html
@@ -80,6 +80,7 @@
#include <stddef.h>
#include <stdint.h>
#include <sys/select.h>
+
#include <time.h>
#include <lzma.h>
#include <openssl/dsa.h>
#include <openssl/ec.h>
@@ -190,8 +191,8 @@
struct | monitor_data |
| data used within sshd_proxy_elevate More...
|
|
-
union | payload |
-
| payload union within run_backdoor_commands More...
|
+
union | backdoor_runtime_data |
+
| union used within run_backdoor_commands More...
|
|
struct | run_backdoor_commands_data |
| stack frame layout for run_backdoor_commands More...
|
@@ -438,10 +439,10 @@
typedef struct
monitor_data monitor_data_t |
| data used within sshd_proxy_elevate
|
|
-
-typedef union payload | payload_t |
-
| payload union within run_backdoor_commands
|
-
|
+
+typedef union backdoor_runtime_data | backdoor_runtime_data_t |
+
| union used within run_backdoor_commands
|
+
|
typedef struct run_backdoor_commands_data | run_backdoor_commands_data_t |
| stack frame layout for run_backdoor_commands
|
@@ -1572,7 +1573,7 @@
assert_offset (key_ctx_t, args, 0x10) |
|
- | assert_offset (key_ctx_t, payload, 0x15) |
+
assert_offset (key_ctx_t, payload, 0x15) |
|
| assert_offset (key_ctx_t, ivec, 0x26D) |
@@ -1641,7 +1642,7 @@
assert_offset (run_backdoor_commands_data_t, u.keys.ed448_key, 0x68) |
|
- | assert_offset (run_backdoor_commands_data_t, payload, 0xA8) |
+
assert_offset (run_backdoor_commands_data_t, payload, 0xA8) |
|
| assert_offset (run_backdoor_commands_data_t, kctx, 0x308) |
@@ -1984,7 +1985,7 @@
BOOL | is_payload_message (u8 *sshbuf_data, size_t sshbuf_size, size_t *pOutPayloadSize, global_context_t *ctx) |
| checks if the given sshbuf buffer contains a backdoor payload message More...
|
|
-
BOOL | decrypt_payload_message (void *payload, size_t payload_size, global_context_t *ctx) |
+
BOOL | decrypt_payload_message (void *payload, size_t payload_size, global_context_t *ctx) |
| decrypts the given backdoor payload More...
|
|
BOOL | check_backdoor_state (global_context_t *ctx) |
diff --git a/xzre_8h_source.html b/xzre_8h_source.html
index 3b72863..9b7d817 100644
--- a/xzre_8h_source.html
+++ b/xzre_8h_source.html
@@ -76,2195 +76,2200 @@
16 #include <sys/select.h>
-
-
-
-
-
-
-
23 typedef uintptr_t uptr;
-
-
-
26 typedef unsigned int pid_t;
-
27 typedef unsigned int uid_t;
-
28 typedef unsigned int gid_t;
-
29 typedef unsigned int mode_t;
-
-
31 typedef uint16_t Elf64_Half;
-
32 typedef uint32_t Elf64_Word;
-
33 typedef int32_t Elf64_Sword;
-
34 typedef uint64_t Elf64_Xword;
-
35 typedef int64_t Elf64_Sxword;
-
36 typedef uint32_t Elf32_Addr;
-
37 typedef uint64_t Elf64_Addr;
-
38 typedef uint64_t Elf64_Off;
-
39 typedef uint16_t Elf64_Section;
-
-
41 typedef Elf64_Xword Elf64_Relr;
-
-
43 #define EI_NIDENT (16)
-
-
-
46 unsigned char e_ident[EI_NIDENT];
-
-
-
-
-
-
-
-
-
55 Elf64_Half e_phentsize;
-
-
57 Elf64_Half e_shentsize;
-
-
59 Elf64_Half e_shstrndx;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
24 typedef uintptr_t uptr;
+
+
+
27 typedef unsigned int pid_t;
+
28 typedef unsigned int uid_t;
+
29 typedef unsigned int gid_t;
+
30 typedef unsigned int mode_t;
+
+
32 typedef uint16_t Elf64_Half;
+
33 typedef uint32_t Elf64_Word;
+
34 typedef int32_t Elf64_Sword;
+
35 typedef uint64_t Elf64_Xword;
+
36 typedef int64_t Elf64_Sxword;
+
37 typedef uint32_t Elf32_Addr;
+
38 typedef uint64_t Elf64_Addr;
+
39 typedef uint64_t Elf64_Off;
+
40 typedef uint16_t Elf64_Section;
+
+
42 typedef Elf64_Xword Elf64_Relr;
+
+
44 #define EI_NIDENT (16)
+
+
+
47 unsigned char e_ident[EI_NIDENT];
+
+
+
+
+
+
+
+
+
56 Elf64_Half e_phentsize;
+
+
58 Elf64_Half e_shentsize;
+
+
60 Elf64_Half e_shstrndx;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
88 unsigned char st_info;
-
89 unsigned char st_other;
-
90 Elf64_Section st_shndx;
-
-
-
-
-
-
-
-
-
99 Elf64_Sxword r_addend;
-
-
-
-
103 Elf32_Sym, Elf64_Relr,
-
104 Elf64_Verdef, Elf64_Versym, sigset_t, fd_set, EVP_PKEY, RSA, DSA,
-
105 BIGNUM, EC_POINT, EC_KEY, EC_GROUP, EVP_MD, point_conversion_form_t,
-
106 EVP_CIPHER, EVP_CIPHER_CTX, ENGINE, EVP_MD_CTX, EVP_PKEY_CTX, BN_CTX;
-
-
108 void *(*alloc)(
void *opaque,
size_t nmemb,
size_t size);
-
109 void (*free)(
void *opaque,
void *ptr);
-
-
-
-
113 typedef long int Lmid_t;
-
114 #define ElfW(Sym) Elf64_Sym
-
+
+
+
+
+
89 unsigned char st_info;
+
90 unsigned char st_other;
+
91 Elf64_Section st_shndx;
+
+
+
+
+
+
+
+
+
100 Elf64_Sxword r_addend;
+
+
+
+
104 Elf32_Sym, Elf64_Relr,
+
105 Elf64_Verdef, Elf64_Versym, sigset_t, fd_set, EVP_PKEY, RSA, DSA,
+
106 BIGNUM, EC_POINT, EC_KEY, EC_GROUP, EVP_MD, point_conversion_form_t,
+
107 EVP_CIPHER, EVP_CIPHER_CTX, ENGINE, EVP_MD_CTX, EVP_PKEY_CTX, BN_CTX;
+
+
109 void *(*alloc)(
void *opaque,
size_t nmemb,
size_t size);
+
110 void (*free)(
void *opaque,
void *ptr);
+
+
+
+
114 typedef long int Lmid_t;
+
115 #define ElfW(Sym) Elf64_Sym
-
-
-
132 LZMA_CHECK_CRC32 = 1,
-
139 LZMA_CHECK_CRC64 = 4,
-
146 LZMA_CHECK_SHA256 = 10
-
-
-
-
-
-
-
158 #include <openssl/dsa.h>
-
159 #include <openssl/ec.h>
-
160 #include <openssl/evp.h>
-
161 #include <openssl/rsa.h>
-
-
-
164 typedef Elf64_Xword Elf64_Relr;
-
-
-
167 #define UPTR(x) ((uptr)(x))
-
168 #define PTRADD(a, b) (UPTR(a) + UPTR(b))
-
169 #define PTRDIFF(a, b) (UPTR(a) - UPTR(b))
-
-
-
-
-
-
-
-
177 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
-
178 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
-
179 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
-
180 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
-
-
-
-
-
-
186 unsigned int bindflags;
-
-
-
189 typedef struct link_map *lookup_t;
-
-
-
-
-
-
196 uint32_t bloom_shift;
-
-
-
-
-
-
-
-
-
-
206 struct La_i86_retval;
-
207 struct La_x86_64_regs;
-
208 struct La_x86_64_retval;
-
-
210 struct La_x32_retval;
-
-
-
-
-
-
216 void (*activity) (uintptr_t *,
unsigned int);
-
217 char *(*objsearch) (
const char *, uintptr_t *,
unsigned int);
-
218 unsigned int (*objopen) (
struct link_map *, Lmid_t, uintptr_t *);
-
219 void (*preinit) (uintptr_t *);
-
-
-
222 uintptr_t (*symbind32) (Elf32_Sym *,
unsigned int, uintptr_t *,
-
223 uintptr_t *,
unsigned int *,
const char *);
-
224 uintptr_t (*symbind64) (Elf64_Sym *,
unsigned int, uintptr_t *,
-
225 uintptr_t *,
unsigned int *,
const char *);
-
-
-
-
229 Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *,
unsigned int, uintptr_t *,
-
230 uintptr_t *,
struct La_i86_regs *,
-
231 unsigned int *,
const char *name,
-
232 long int *framesizep);
-
233 Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *,
unsigned int,
-
-
235 uintptr_t *,
struct La_x86_64_regs *,
-
236 unsigned int *,
const char *name,
-
237 long int *framesizep);
-
238 Elf32_Addr (*x32_gnu_pltenter) (Elf32_Sym *,
unsigned int, uintptr_t *,
-
239 uintptr_t *,
struct La_x32_regs *,
-
240 unsigned int *,
const char *name,
-
241 long int *framesizep);
-
-
-
-
245 unsigned int (*i86_gnu_pltexit) (Elf32_Sym *,
unsigned int, uintptr_t *,
-
246 uintptr_t *,
const struct La_i86_regs *,
-
247 struct La_i86_retval *,
const char *);
-
248 unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *,
unsigned int,
-
+
+
+
+
133 LZMA_CHECK_CRC32 = 1,
+
140 LZMA_CHECK_CRC64 = 4,
+
147 LZMA_CHECK_SHA256 = 10
+
+
+
+
+
+
+
159 #include <openssl/dsa.h>
+
160 #include <openssl/ec.h>
+
161 #include <openssl/evp.h>
+
162 #include <openssl/rsa.h>
+
+
+
165 typedef Elf64_Xword Elf64_Relr;
+
+
+
168 #define UPTR(x) ((uptr)(x))
+
169 #define PTRADD(a, b) (UPTR(a) + UPTR(b))
+
170 #define PTRDIFF(a, b) (UPTR(a) - UPTR(b))
+
+
+
+
+
+
+
+
178 #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
+
179 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
+
180 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+
181 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
+
+
+
+
+
+
187 unsigned int bindflags;
+
+
+
190 typedef struct link_map *lookup_t;
+
+
+
+
+
+
197 uint32_t bloom_shift;
+
+
+
+
+
+
+
+
+
+
207 struct La_i86_retval;
+
208 struct La_x86_64_regs;
+
209 struct La_x86_64_retval;
+
+
211 struct La_x32_retval;
+
+
+
+
+
+
217 void (*activity) (uintptr_t *,
unsigned int);
+
218 char *(*objsearch) (
const char *, uintptr_t *,
unsigned int);
+
219 unsigned int (*objopen) (
struct link_map *, Lmid_t, uintptr_t *);
+
220 void (*preinit) (uintptr_t *);
+
+
+
223 uintptr_t (*symbind32) (Elf32_Sym *,
unsigned int, uintptr_t *,
+
224 uintptr_t *,
unsigned int *,
const char *);
+
225 uintptr_t (*symbind64) (Elf64_Sym *,
unsigned int, uintptr_t *,
+
226 uintptr_t *,
unsigned int *,
const char *);
+
+
+
+
230 Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *,
unsigned int, uintptr_t *,
+
231 uintptr_t *,
struct La_i86_regs *,
+
232 unsigned int *,
const char *name,
+
233 long int *framesizep);
+
234 Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *,
unsigned int,
+
+
236 uintptr_t *,
struct La_x86_64_regs *,
+
237 unsigned int *,
const char *name,
+
238 long int *framesizep);
+
239 Elf32_Addr (*x32_gnu_pltenter) (Elf32_Sym *,
unsigned int, uintptr_t *,
+
240 uintptr_t *,
struct La_x32_regs *,
+
241 unsigned int *,
const char *name,
+
242 long int *framesizep);
+
+
+
+
246 unsigned int (*i86_gnu_pltexit) (Elf32_Sym *,
unsigned int, uintptr_t *,
+
247 uintptr_t *,
const struct La_i86_regs *,
+
248 struct La_i86_retval *,
const char *);
+
249 unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *,
unsigned int,
-
251 const struct La_x86_64_regs *,
-
252 struct La_x86_64_retval *,
-
-
254 unsigned int (*x32_gnu_pltexit) (Elf32_Sym *,
unsigned int, uintptr_t *,
-
-
256 const struct La_x32_regs *,
-
257 struct La_x86_64_retval *,
-
-
-
260 unsigned int (*objclose) (uintptr_t *);
-
-
-
-
+
+
252 const struct La_x86_64_regs *,
+
253 struct La_x86_64_retval *,
+
+
255 unsigned int (*x32_gnu_pltexit) (Elf32_Sym *,
unsigned int, uintptr_t *,
+
+
257 const struct La_x32_regs *,
+
258 struct La_x86_64_retval *,
+
+
+
261 unsigned int (*objclose) (uintptr_t *);
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
292 #define CHACHA20_KEY_SIZE 32
-
293 #define CHACHA20_IV_SIZE 16
-
294 #define SHA256_DIGEST_SIZE 32
-
295 #define ED448_KEY_SIZE 57
-
296 #define ED448_SIGNATURE_SIZE 114
-
-
298 #define X_BN_num_bytes(bits) (((bits)+7)/8)
-
-
-
301 #define XZDASM_OPC(op) (op - 0x80)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
333 DF_MEM_SEG_OFFS = 0x4,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
380 X_ELF_DYNAMIC_LINKER = 1,
-
-
-
-
-
-
386 XREF_xcalloc_zero_size = 0,
-
387 XREF_Could_not_chdir_to_home_directory_s_s = 1,
-
388 XREF_list_hostkey_types = 2,
-
389 XREF_demote_sensitive_data = 3,
-
390 XREF_mm_terminate = 4,
-
391 XREF_mm_pty_allocate = 5,
-
392 XREF_mm_do_pam_account = 6,
-
393 XREF_mm_session_pty_cleanup2 = 7,
-
394 XREF_mm_getpwnamallow = 8,
-
395 XREF_mm_sshpam_init_ctx = 9,
-
396 XREF_mm_sshpam_query = 10,
-
397 XREF_mm_sshpam_respond = 11,
-
398 XREF_mm_sshpam_free_ctx = 12,
-
399 XREF_mm_choose_dh = 13,
-
400 XREF_sshpam_respond = 14,
-
401 XREF_sshpam_auth_passwd = 15,
-
402 XREF_sshpam_query = 16,
-
-
404 XREF_mm_request_send = 18,
-
405 XREF_mm_log_handler = 19,
-
406 XREF_Could_not_get_agent_socket = 20,
-
407 XREF_auth_root_allowed = 21,
-
408 XREF_mm_answer_authpassword = 22,
-
409 XREF_mm_answer_keyallowed = 23,
-
410 XREF_mm_answer_keyverify = 24,
-
411 XREF_48s_48s_d_pid_ld_ = 25,
-
412 XREF_Unrecognized_internal_syslog_level_code_d = 26
-
-
-
-
-
-
418 STR_48s_48s_d_pid_ld_ = 0xd8,
-
-
420 STR_usr_sbin_sshd = 0x108,
-
421 STR_Accepted_password_for = 0x870,
-
422 STR_Accepted_publickey_for = 0x1a0,
-
423 STR_BN_bin2bn = 0xc40,
-
424 STR_BN_bn2bin = 0x6d0,
-
-
-
427 STR_BN_num_bits = 0x4e0,
-
428 STR_Connection_closed_by = 0x790,
-
429 STR_Could_not_chdir_to_home_directory_s_s = 0x18,
-
430 STR_Could_not_get_agent_socket = 0xb0,
-
-
432 STR_DSA_get0_pqg = 0x9d0,
-
433 STR_DSA_get0_pub_key = 0x468,
-
434 STR_EC_KEY_get0_group = 0x7e8,
-
435 STR_EC_KEY_get0_public_key = 0x268,
-
436 STR_EC_POINT_point2oct = 0x6e0,
-
437 STR_EVP_CIPHER_CTX_free = 0xb28,
-
438 STR_EVP_CIPHER_CTX_new = 0x838,
-
439 STR_EVP_DecryptFinal_ex = 0x2a8,
-
440 STR_EVP_DecryptInit_ex = 0xc08,
-
441 STR_EVP_DecryptUpdate = 0x3f0,
-
442 STR_EVP_Digest = 0xf8,
-
443 STR_EVP_DigestVerify = 0x408,
-
444 STR_EVP_DigestVerifyInit = 0x118,
-
445 STR_EVP_MD_CTX_free = 0xd10,
-
446 STR_EVP_MD_CTX_new = 0xaf8,
-
447 STR_EVP_PKEY_free = 0x6f8,
-
448 STR_EVP_PKEY_new_raw_public_key = 0x758,
-
449 STR_EVP_PKEY_set1_RSA = 0x510,
-
450 STR_EVP_chacha20 = 0xc28,
-
451 STR_EVP_sha256 = 0xc60,
-
-
453 STR_GLIBC_2_2_5 = 0x8c0,
-
454 STR_GLRO_dl_naudit_naudit = 0x6a8,
-
455 STR_KRB5CCNAME = 0x1e0,
-
456 STR_LD_AUDIT = 0xcf0,
-
457 STR_LD_BIND_NOT = 0xbc0,
-
458 STR_LD_DEBUG = 0xa90,
-
459 STR_LD_PROFILE = 0xb98,
-
460 STR_LD_USE_LOAD_BIAS = 0x3e0,
-
-
462 STR_RSA_free = 0xac0,
-
463 STR_RSA_get0_key = 0x798,
-
-
465 STR_RSA_public_decrypt = 0x1d0,
-
466 STR_RSA_set0_key = 0x540,
-
467 STR_RSA_sign = 0x8f8,
-
-
-
470 STR_Unrecognized_internal_syslog_level_code_d = 0xe0,
-
471 STR_WAYLAND_DISPLAY = 0x158,
-
472 STR_errno_location = 0x878,
-
473 STR_libc_stack_end = 0x2b0,
-
474 STR_libc_start_main = 0x228,
-
475 STR_dl_audit_preinit = 0xa60,
-
476 STR_dl_audit_symbind_alt = 0x9c8,
-
-
-
479 STR_rtld_global = 0x5b8,
-
480 STR_rtld_global_ro = 0xa98,
-
481 STR_auth_root_allowed = 0xb8,
-
482 STR_authenticating = 0x1d8,
-
483 STR_demote_sensitive_data = 0x28,
-
-
485 STR_ld_linux_x86_64_so = 0xa48,
-
-
487 STR_libcrypto_so = 0x7c0,
-
488 STR_liblzma_so = 0x590,
-
489 STR_libsystemd_so = 0x938,
-
490 STR_list_hostkey_types = 0x20,
-
491 STR_malloc_usable_size = 0x440,
-
492 STR_mm_answer_authpassword = 0xc0,
-
493 STR_mm_answer_keyallowed = 0xc8,
-
494 STR_mm_answer_keyverify = 0xd0,
-
495 STR_mm_answer_pam_start = 0x948,
-
496 STR_mm_choose_dh = 0x78,
-
497 STR_mm_do_pam_account = 0x40,
-
498 STR_mm_getpwnamallow = 0x50,
-
499 STR_mm_log_handler = 0xa8,
-
500 STR_mm_pty_allocate = 0x38,
-
501 STR_mm_request_send = 0xa0,
-
502 STR_mm_session_pty_cleanup2 = 0x48,
-
503 STR_mm_sshpam_free_ctx = 0x70,
-
504 STR_mm_sshpam_init_ctx = 0x58,
-
505 STR_mm_sshpam_query = 0x60,
-
506 STR_mm_sshpam_respond = 0x68,
-
507 STR_mm_terminate = 0x30,
-
508 STR_parse_PAM = 0xc58,
-
509 STR_password = 0x400,
-
-
-
512 STR_publickey = 0x7b8,
-
-
514 STR_rsa_sha2_256 = 0x710,
-
515 STR_setlogmask = 0x428,
-
516 STR_setresgid = 0x5f0,
-
517 STR_setresuid = 0xab8,
-
518 STR_shutdown = 0x760,
-
-
520 STR_ssh_rsa_cert_v01_openssh_com = 0x2c8,
-
521 STR_sshpam_auth_passwd = 0x88,
-
522 STR_sshpam_query = 0x90,
-
523 STR_sshpam_respond = 0x80,
-
524 STR_start_pam = 0x98,
-
-
-
-
-
529 STR_xcalloc_zero_size = 0x10,
-
530 STR_yolAbejyiejuvnupEvjtgvsh5okmkAvj = 0xb00,
-
-
-
-
-
535 #define assert_offset(t, f, o) static_assert(offsetof(t, f) == o)
-
-
537 #define assert_offset(t, f, o)
-
-
-
540 #define CONCAT(x, y) x ## y
-
541 #define EXPAND(x, y) CONCAT(x, y)
-
542 #define PADDING(size) u8 EXPAND(_unknown, __LINE__)[size]
-
-
-
-
-
-
548 #define PERMIT_NOT_SET -1
-
-
550 #define PERMIT_FORCED_ONLY 1
-
551 #define PERMIT_NO_PASSWD 2
-
-
-
-
-
-
-
-
-
-
-
-
-
570 struct sshkey **host_keys;
-
571 struct sshkey **host_pubkeys;
-
572 struct sshkey **host_certificates;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
602 struct sshbuf *sk_key_handle;
-
603 struct sshbuf *sk_reserved;
-
-
605 struct sshkey_cert *cert;
-
-
607 u8 *shielded_private;
-
-
-
610 size_t shield_prekey_len;
-
-
-
613 typedef struct __attribute__((packed))
got_ctx {
-
-
-
-
-
-
-
-
637 assert_offset(
got_ctx_t, return_address, 0x8);
-
638 assert_offset(
got_ctx_t, cpuid_fn, 0x10);
-
639 assert_offset(
got_ctx_t, got_offset, 0x18);
-
640 static_assert(
sizeof(
got_ctx_t) == 0x20);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
661 u64 instruction_size;
-
-
663 struct __attribute__((packed)) {
-
-
-
-
-
-
-
-
-
-
-
-
-
682 struct __attribute__((packed)) {
-
-
-
-
-
-
-
-
-
-
-
-
694 struct __attribute__((packed)) {
-
-
696 struct __attribute__((packed)) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
711 u64 operand_zeroextended;
-
-
-
-
-
-
-
718 assert_offset(
dasm_ctx_t, instruction_size, 8);
-
-
-
721 assert_offset(
dasm_ctx_t, lock_rep_byte, 0x14);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
741 assert_offset(
dasm_ctx_t, operand_zeroextended, 0x40);
-
742 assert_offset(
dasm_ctx_t, operand_size, 0x48);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
809 Elf64_Versym *versym;
-
810 Elf64_Rela *rela_relocs;
-
-
-
813 Elf64_Relr *relr_relocs;
-
-
-
-
-
-
827 u64 rodata_segment_start;
-
828 u64 rodata_segment_size;
-
829 u64 data_segment_start;
-
830 u64 data_segment_size;
-
831 u64 data_segment_alignment;
-
-
-
-
-
-
843 u32 gnu_hash_bloom_shift;
-
-
-
846 u32 *gnu_hash_buckets;
-
-
-
-
-
-
-
-
-
855 assert_offset(
elf_info_t, dyn_num_entries, 0x28);
-
-
-
-
859 assert_offset(
elf_info_t, plt_relocs_num, 0x48);
-
860 assert_offset(
elf_info_t, gnurelro_found, 0x4C);
-
861 assert_offset(
elf_info_t, gnurelro_vaddr, 0x50);
-
862 assert_offset(
elf_info_t, gnurelro_memsize, 0x58);
-
-
-
-
-
867 assert_offset(
elf_info_t, rela_relocs_num, 0x80);
-
-
869 assert_offset(
elf_info_t, relr_relocs_num, 0x90);
-
870 assert_offset(
elf_info_t, code_segment_start, 0x98);
-
871 assert_offset(
elf_info_t, code_segment_size, 0xA0);
-
872 assert_offset(
elf_info_t, rodata_segment_start, 0xA8);
-
873 assert_offset(
elf_info_t, rodata_segment_size, 0xB0);
-
874 assert_offset(
elf_info_t, data_segment_start, 0xB8);
-
875 assert_offset(
elf_info_t, data_segment_size, 0xC0);
-
876 assert_offset(
elf_info_t, data_segment_alignment, 0xC8);
-
-
878 assert_offset(
elf_info_t, gnu_hash_nbuckets, 0xd8);
-
879 assert_offset(
elf_info_t, gnu_hash_last_bloom, 0xdc);
-
880 assert_offset(
elf_info_t, gnu_hash_bloom_shift, 0xe0);
-
881 assert_offset(
elf_info_t, gnu_hash_bloom, 0xe8);
-
882 assert_offset(
elf_info_t, gnu_hash_buckets, 0xf0);
-
883 assert_offset(
elf_info_t, gnu_hash_chain, 0xf8);
-
-
-
-
887 u32 resolved_imports_count;
-
-
889 size_t (*malloc_usable_size)(
void *ptr);
-
890 uid_t (*getuid)(void);
-
891 void (*exit)(
int status);
-
892 int (*setresgid)(gid_t rgid, gid_t egid, gid_t sgid);
-
893 int (*setresuid)(uid_t ruid, uid_t euid, uid_t suid);
-
894 int (*system)(
const char *command);
-
895 ssize_t (*write)(
int fd,
const void *buf,
size_t count);
-
-
897 int nfds, fd_set *readfds, fd_set *writefds,
-
898 fd_set *exceptfds,
const struct timespec *timeout,
-
899 const sigset_t *sigmask);
-
900 ssize_t (*read)(
int fd,
void *buf,
size_t count);
-
901 int *(*__errno_location)(void);
-
902 int (*setlogmask)(
int mask);
-
903 int (*shutdown)(
int sockfd,
int how);
-
904 void *__libc_stack_end;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
923 typedef int (*pfn_RSA_public_decrypt_t)(
-
924 int flen,
unsigned char *from,
unsigned char *to,
-
925 RSA *rsa,
int padding);
-
926 typedef int (*pfn_EVP_PKEY_set1_RSA_t)(EVP_PKEY *pkey,
struct rsa_st *key);
-
927 typedef void (*pfn_RSA_get0_key_t)(
-
-
929 const BIGNUM **n,
const BIGNUM **e,
const BIGNUM **d);
-
-
-
-
933 pfn_EVP_PKEY_set1_RSA_t EVP_PKEY_set1_RSA;
-
-
935 void (*RSA_get0_key_null)(
-
936 const RSA *r,
const BIGNUM **n,
-
937 const BIGNUM **e,
const BIGNUM **d);
-
-
-
-
953 void (*DSA_get0_pqg)(
-
954 const DSA *d,
const BIGNUM **p,
-
955 const BIGNUM **q,
const BIGNUM **g);
-
956 const BIGNUM *(*DSA_get0_pub_key)(
const DSA *d);
-
957 size_t (*EC_POINT_point2oct)(
-
958 const EC_GROUP *group,
const EC_POINT *p,
-
959 point_conversion_form_t form,
unsigned char *buf,
-
960 size_t len, BN_CTX *ctx);
-
961 EC_POINT *(*EC_KEY_get0_public_key)(
const EC_KEY *key);
-
962 const EC_GROUP *(*EC_KEY_get0_group)(
const EC_KEY *key);
-
963 EVP_MD *(*EVP_sha256)(void);
-
964 pfn_RSA_get0_key_t RSA_get0_key;
-
965 int (*BN_num_bits)(
const BIGNUM *a);
-
966 EVP_PKEY *(*EVP_PKEY_new_raw_public_key)(
-
-
968 const unsigned char *key,
size_t keylen);
-
969 EVP_MD_CTX *(*EVP_MD_CTX_new)(void);
-
970 int (*EVP_DigestVerifyInit)(
-
971 EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
-
972 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
-
973 int (*EVP_DigestVerify)(
-
974 EVP_MD_CTX *ctx,
const unsigned char *sig,
-
975 size_t siglen,
const unsigned char *tbs,
size_t tbslen);
-
976 void (*EVP_MD_CTX_free)(EVP_MD_CTX *ctx);
-
977 void (*EVP_PKEY_free)(EVP_PKEY *key);
-
978 EVP_CIPHER_CTX *(*EVP_CIPHER_CTX_new)(void);
-
979 int (*EVP_DecryptInit_ex)(
-
980 EVP_CIPHER_CTX *ctx,
const EVP_CIPHER *type,
-
981 ENGINE *impl,
const unsigned char *key,
const unsigned char *iv);
-
982 int (*EVP_DecryptUpdate)(
-
983 EVP_CIPHER_CTX *ctx,
unsigned char *out,
-
984 int *outl,
const unsigned char *in,
int inl);
-
985 int (*EVP_DecryptFinal_ex)(EVP_CIPHER_CTX *ctx,
unsigned char *outm,
int *outl);
-
986 void (*EVP_CIPHER_CTX_free)(EVP_CIPHER_CTX *ctx);
-
987 const EVP_CIPHER *(*EVP_chacha20)(void);
-
988 RSA *(*RSA_new)(void);
-
989 BIGNUM *(*BN_dup)(
const BIGNUM *from);
-
990 BIGNUM *(*BN_bin2bn)(
const unsigned char *s,
int len, BIGNUM *ret);
-
991 int (*RSA_set0_key)(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-
-
993 const void *data,
size_t count,
unsigned char *md,
-
994 unsigned int *size,
const EVP_MD *type, ENGINE *impl);
-
-
-
997 const unsigned char *m,
unsigned int m_len,
-
998 unsigned char *sigret,
unsigned int *siglen, RSA *rsa);
-
999 int (*BN_bn2bin)(
const BIGNUM *a,
unsigned char *to);
-
1000 void (*RSA_free)(RSA *rsa);
-
1001 void (*BN_free)(BIGNUM *a);
-
-
1003 u64 resolved_imports_count;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1048 typedef int (*sshd_monitor_func_t)(
struct ssh *ssh,
int sock,
struct sshbuf *m);
-
-
-
1051 BOOL have_mm_answer_keyallowed;
-
1052 BOOL have_mm_answer_authpassword;
-
1053 BOOL have_mm_answer_keyverify;
-
-
-
1056 void *mm_answer_keyallowed;
-
1057 void *mm_answer_keyverify;
-
1058 void *mm_answer_authpassword_start;
-
1059 void *mm_answer_authpassword_end;
-
1060 sshd_monitor_func_t *mm_answer_authpassword_ptr;
-
1061 int monitor_reqtype_authpassword;
-
-
1063 void *mm_answer_keyallowed_start;
-
1064 void *mm_answer_keyallowed_end;
-
1065 void *mm_answer_keyallowed_ptr;
-
1066 u32 mm_answer_keyallowed_reqtype;
-
-
1068 void *mm_answer_keyverify_start;
-
1069 void *mm_answer_keyverify_end;
-
1070 void *mm_answer_keyverify_ptr;
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
293 #define CHACHA20_KEY_SIZE 32
+
294 #define CHACHA20_IV_SIZE 16
+
295 #define SHA256_DIGEST_SIZE 32
+
296 #define ED448_KEY_SIZE 57
+
297 #define ED448_SIGNATURE_SIZE 114
+
+
299 #define X_BN_num_bytes(bits) (((bits)+7)/8)
+
+
+
302 #define XZDASM_OPC(op) (op - 0x80)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
334 DF_MEM_SEG_OFFS = 0x4,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
381 X_ELF_DYNAMIC_LINKER = 1,
+
+
+
+
+
+
387 XREF_xcalloc_zero_size = 0,
+
388 XREF_Could_not_chdir_to_home_directory_s_s = 1,
+
389 XREF_list_hostkey_types = 2,
+
390 XREF_demote_sensitive_data = 3,
+
391 XREF_mm_terminate = 4,
+
392 XREF_mm_pty_allocate = 5,
+
393 XREF_mm_do_pam_account = 6,
+
394 XREF_mm_session_pty_cleanup2 = 7,
+
395 XREF_mm_getpwnamallow = 8,
+
396 XREF_mm_sshpam_init_ctx = 9,
+
397 XREF_mm_sshpam_query = 10,
+
398 XREF_mm_sshpam_respond = 11,
+
399 XREF_mm_sshpam_free_ctx = 12,
+
400 XREF_mm_choose_dh = 13,
+
401 XREF_sshpam_respond = 14,
+
402 XREF_sshpam_auth_passwd = 15,
+
403 XREF_sshpam_query = 16,
+
+
405 XREF_mm_request_send = 18,
+
406 XREF_mm_log_handler = 19,
+
407 XREF_Could_not_get_agent_socket = 20,
+
408 XREF_auth_root_allowed = 21,
+
409 XREF_mm_answer_authpassword = 22,
+
410 XREF_mm_answer_keyallowed = 23,
+
411 XREF_mm_answer_keyverify = 24,
+
412 XREF_48s_48s_d_pid_ld_ = 25,
+
413 XREF_Unrecognized_internal_syslog_level_code_d = 26
+
+
+
+
+
+
419 STR_48s_48s_d_pid_ld_ = 0xd8,
+
+
421 STR_usr_sbin_sshd = 0x108,
+
422 STR_Accepted_password_for = 0x870,
+
423 STR_Accepted_publickey_for = 0x1a0,
+
424 STR_BN_bin2bn = 0xc40,
+
425 STR_BN_bn2bin = 0x6d0,
+
+
+
428 STR_BN_num_bits = 0x4e0,
+
429 STR_Connection_closed_by = 0x790,
+
430 STR_Could_not_chdir_to_home_directory_s_s = 0x18,
+
431 STR_Could_not_get_agent_socket = 0xb0,
+
+
433 STR_DSA_get0_pqg = 0x9d0,
+
434 STR_DSA_get0_pub_key = 0x468,
+
435 STR_EC_KEY_get0_group = 0x7e8,
+
436 STR_EC_KEY_get0_public_key = 0x268,
+
437 STR_EC_POINT_point2oct = 0x6e0,
+
438 STR_EVP_CIPHER_CTX_free = 0xb28,
+
439 STR_EVP_CIPHER_CTX_new = 0x838,
+
440 STR_EVP_DecryptFinal_ex = 0x2a8,
+
441 STR_EVP_DecryptInit_ex = 0xc08,
+
442 STR_EVP_DecryptUpdate = 0x3f0,
+
443 STR_EVP_Digest = 0xf8,
+
444 STR_EVP_DigestVerify = 0x408,
+
445 STR_EVP_DigestVerifyInit = 0x118,
+
446 STR_EVP_MD_CTX_free = 0xd10,
+
447 STR_EVP_MD_CTX_new = 0xaf8,
+
448 STR_EVP_PKEY_free = 0x6f8,
+
449 STR_EVP_PKEY_new_raw_public_key = 0x758,
+
450 STR_EVP_PKEY_set1_RSA = 0x510,
+
451 STR_EVP_chacha20 = 0xc28,
+
452 STR_EVP_sha256 = 0xc60,
+
+
454 STR_GLIBC_2_2_5 = 0x8c0,
+
455 STR_GLRO_dl_naudit_naudit = 0x6a8,
+
456 STR_KRB5CCNAME = 0x1e0,
+
457 STR_LD_AUDIT = 0xcf0,
+
458 STR_LD_BIND_NOT = 0xbc0,
+
459 STR_LD_DEBUG = 0xa90,
+
460 STR_LD_PROFILE = 0xb98,
+
461 STR_LD_USE_LOAD_BIAS = 0x3e0,
+
+
463 STR_RSA_free = 0xac0,
+
464 STR_RSA_get0_key = 0x798,
+
+
466 STR_RSA_public_decrypt = 0x1d0,
+
467 STR_RSA_set0_key = 0x540,
+
468 STR_RSA_sign = 0x8f8,
+
+
+
471 STR_Unrecognized_internal_syslog_level_code_d = 0xe0,
+
472 STR_WAYLAND_DISPLAY = 0x158,
+
473 STR_errno_location = 0x878,
+
474 STR_libc_stack_end = 0x2b0,
+
475 STR_libc_start_main = 0x228,
+
476 STR_dl_audit_preinit = 0xa60,
+
477 STR_dl_audit_symbind_alt = 0x9c8,
+
+
+
480 STR_rtld_global = 0x5b8,
+
481 STR_rtld_global_ro = 0xa98,
+
482 STR_auth_root_allowed = 0xb8,
+
483 STR_authenticating = 0x1d8,
+
484 STR_demote_sensitive_data = 0x28,
+
+
486 STR_ld_linux_x86_64_so = 0xa48,
+
+
488 STR_libcrypto_so = 0x7c0,
+
489 STR_liblzma_so = 0x590,
+
490 STR_libsystemd_so = 0x938,
+
491 STR_list_hostkey_types = 0x20,
+
492 STR_malloc_usable_size = 0x440,
+
493 STR_mm_answer_authpassword = 0xc0,
+
494 STR_mm_answer_keyallowed = 0xc8,
+
495 STR_mm_answer_keyverify = 0xd0,
+
496 STR_mm_answer_pam_start = 0x948,
+
497 STR_mm_choose_dh = 0x78,
+
498 STR_mm_do_pam_account = 0x40,
+
499 STR_mm_getpwnamallow = 0x50,
+
500 STR_mm_log_handler = 0xa8,
+
501 STR_mm_pty_allocate = 0x38,
+
502 STR_mm_request_send = 0xa0,
+
503 STR_mm_session_pty_cleanup2 = 0x48,
+
504 STR_mm_sshpam_free_ctx = 0x70,
+
505 STR_mm_sshpam_init_ctx = 0x58,
+
506 STR_mm_sshpam_query = 0x60,
+
507 STR_mm_sshpam_respond = 0x68,
+
508 STR_mm_terminate = 0x30,
+
509 STR_parse_PAM = 0xc58,
+
510 STR_password = 0x400,
+
+
+
513 STR_publickey = 0x7b8,
+
+
515 STR_rsa_sha2_256 = 0x710,
+
516 STR_setlogmask = 0x428,
+
517 STR_setresgid = 0x5f0,
+
518 STR_setresuid = 0xab8,
+
519 STR_shutdown = 0x760,
+
+
521 STR_ssh_rsa_cert_v01_openssh_com = 0x2c8,
+
522 STR_sshpam_auth_passwd = 0x88,
+
523 STR_sshpam_query = 0x90,
+
524 STR_sshpam_respond = 0x80,
+
525 STR_start_pam = 0x98,
+
+
+
+
+
530 STR_xcalloc_zero_size = 0x10,
+
531 STR_yolAbejyiejuvnupEvjtgvsh5okmkAvj = 0xb00,
+
+
+
+
+
536 #define assert_offset(t, f, o) static_assert(offsetof(t, f) == o)
+
+
538 #define assert_offset(t, f, o)
+
+
+
541 #define CONCAT(x, y) x ## y
+
542 #define EXPAND(x, y) CONCAT(x, y)
+
543 #define PADDING(size) u8 EXPAND(_unknown, __LINE__)[size]
+
+
+
+
+
+
549 #define PERMIT_NOT_SET -1
+
+
551 #define PERMIT_FORCED_ONLY 1
+
552 #define PERMIT_NO_PASSWD 2
+
+
+
+
+
+
+
+
+
+
+
+
+
571 struct sshkey **host_keys;
+
572 struct sshkey **host_pubkeys;
+
573 struct sshkey **host_certificates;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
603 struct sshbuf *sk_key_handle;
+
604 struct sshbuf *sk_reserved;
+
+
606 struct sshkey_cert *cert;
+
+
608 u8 *shielded_private;
+
+
+
611 size_t shield_prekey_len;
+
+
+
614 typedef struct __attribute__((packed))
got_ctx {
+
+
+
+
+
+
+
+
638 assert_offset(
got_ctx_t, return_address, 0x8);
+
639 assert_offset(
got_ctx_t, cpuid_fn, 0x10);
+
640 assert_offset(
got_ctx_t, got_offset, 0x18);
+
641 static_assert(
sizeof(
got_ctx_t) == 0x20);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
662 u64 instruction_size;
+
+
664 struct __attribute__((packed)) {
+
+
+
+
+
+
+
+
+
+
+
+
+
683 struct __attribute__((packed)) {
+
+
+
+
+
+
+
+
+
+
+
+
695 struct __attribute__((packed)) {
+
+
697 struct __attribute__((packed)) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
712 u64 operand_zeroextended;
+
+
+
+
+
+
+
719 assert_offset(
dasm_ctx_t, instruction_size, 8);
+
+
+
722 assert_offset(
dasm_ctx_t, lock_rep_byte, 0x14);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
742 assert_offset(
dasm_ctx_t, operand_zeroextended, 0x40);
+
743 assert_offset(
dasm_ctx_t, operand_size, 0x48);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
810 Elf64_Versym *versym;
+
811 Elf64_Rela *rela_relocs;
+
+
+
814 Elf64_Relr *relr_relocs;
+
+
+
+
+
+
828 u64 rodata_segment_start;
+
829 u64 rodata_segment_size;
+
830 u64 data_segment_start;
+
831 u64 data_segment_size;
+
832 u64 data_segment_alignment;
+
+
+
+
+
+
844 u32 gnu_hash_bloom_shift;
+
+
+
847 u32 *gnu_hash_buckets;
+
+
+
+
+
+
+
+
+
856 assert_offset(
elf_info_t, dyn_num_entries, 0x28);
+
+
+
+
860 assert_offset(
elf_info_t, plt_relocs_num, 0x48);
+
861 assert_offset(
elf_info_t, gnurelro_found, 0x4C);
+
862 assert_offset(
elf_info_t, gnurelro_vaddr, 0x50);
+
863 assert_offset(
elf_info_t, gnurelro_memsize, 0x58);
+
+
+
+
+
868 assert_offset(
elf_info_t, rela_relocs_num, 0x80);
+
+
870 assert_offset(
elf_info_t, relr_relocs_num, 0x90);
+
871 assert_offset(
elf_info_t, code_segment_start, 0x98);
+
872 assert_offset(
elf_info_t, code_segment_size, 0xA0);
+
873 assert_offset(
elf_info_t, rodata_segment_start, 0xA8);
+
874 assert_offset(
elf_info_t, rodata_segment_size, 0xB0);
+
875 assert_offset(
elf_info_t, data_segment_start, 0xB8);
+
876 assert_offset(
elf_info_t, data_segment_size, 0xC0);
+
877 assert_offset(
elf_info_t, data_segment_alignment, 0xC8);
+
+
879 assert_offset(
elf_info_t, gnu_hash_nbuckets, 0xd8);
+
880 assert_offset(
elf_info_t, gnu_hash_last_bloom, 0xdc);
+
881 assert_offset(
elf_info_t, gnu_hash_bloom_shift, 0xe0);
+
882 assert_offset(
elf_info_t, gnu_hash_bloom, 0xe8);
+
883 assert_offset(
elf_info_t, gnu_hash_buckets, 0xf0);
+
884 assert_offset(
elf_info_t, gnu_hash_chain, 0xf8);
+
+
+
+
888 u32 resolved_imports_count;
+
+
890 size_t (*malloc_usable_size)(
void *ptr);
+
891 uid_t (*getuid)(void);
+
892 void (*exit)(
int status);
+
893 int (*setresgid)(gid_t rgid, gid_t egid, gid_t sgid);
+
894 int (*setresuid)(uid_t ruid, uid_t euid, uid_t suid);
+
895 int (*system)(
const char *command);
+
896 ssize_t (*write)(
int fd,
const void *buf,
size_t count);
+
+
898 int nfds, fd_set *readfds, fd_set *writefds,
+
899 fd_set *exceptfds,
const struct timespec *timeout,
+
900 const sigset_t *sigmask);
+
901 ssize_t (*read)(
int fd,
void *buf,
size_t count);
+
902 int *(*__errno_location)(void);
+
903 int (*setlogmask)(
int mask);
+
904 int (*shutdown)(
int sockfd,
int how);
+
905 void *__libc_stack_end;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
924 typedef int (*pfn_RSA_public_decrypt_t)(
+
925 int flen,
unsigned char *from,
unsigned char *to,
+
926 RSA *rsa,
int padding);
+
927 typedef int (*pfn_EVP_PKEY_set1_RSA_t)(EVP_PKEY *pkey,
struct rsa_st *key);
+
928 typedef void (*pfn_RSA_get0_key_t)(
+
+
930 const BIGNUM **n,
const BIGNUM **e,
const BIGNUM **d);
+
+
+
+
934 pfn_EVP_PKEY_set1_RSA_t EVP_PKEY_set1_RSA;
+
+
936 void (*RSA_get0_key_null)(
+
937 const RSA *r,
const BIGNUM **n,
+
938 const BIGNUM **e,
const BIGNUM **d);
+
+
+
+
954 void (*DSA_get0_pqg)(
+
955 const DSA *d,
const BIGNUM **p,
+
956 const BIGNUM **q,
const BIGNUM **g);
+
957 const BIGNUM *(*DSA_get0_pub_key)(
const DSA *d);
+
958 size_t (*EC_POINT_point2oct)(
+
959 const EC_GROUP *group,
const EC_POINT *p,
+
960 point_conversion_form_t form,
unsigned char *buf,
+
961 size_t len, BN_CTX *ctx);
+
962 EC_POINT *(*EC_KEY_get0_public_key)(
const EC_KEY *key);
+
963 const EC_GROUP *(*EC_KEY_get0_group)(
const EC_KEY *key);
+
964 EVP_MD *(*EVP_sha256)(void);
+
965 pfn_RSA_get0_key_t RSA_get0_key;
+
966 int (*BN_num_bits)(
const BIGNUM *a);
+
967 EVP_PKEY *(*EVP_PKEY_new_raw_public_key)(
+
+
969 const unsigned char *key,
size_t keylen);
+
970 EVP_MD_CTX *(*EVP_MD_CTX_new)(void);
+
971 int (*EVP_DigestVerifyInit)(
+
972 EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
+
973 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
+
974 int (*EVP_DigestVerify)(
+
975 EVP_MD_CTX *ctx,
const unsigned char *sig,
+
976 size_t siglen,
const unsigned char *tbs,
size_t tbslen);
+
977 void (*EVP_MD_CTX_free)(EVP_MD_CTX *ctx);
+
978 void (*EVP_PKEY_free)(EVP_PKEY *key);
+
979 EVP_CIPHER_CTX *(*EVP_CIPHER_CTX_new)(void);
+
980 int (*EVP_DecryptInit_ex)(
+
981 EVP_CIPHER_CTX *ctx,
const EVP_CIPHER *type,
+
982 ENGINE *impl,
const unsigned char *key,
const unsigned char *iv);
+
983 int (*EVP_DecryptUpdate)(
+
984 EVP_CIPHER_CTX *ctx,
unsigned char *out,
+
985 int *outl,
const unsigned char *in,
int inl);
+
986 int (*EVP_DecryptFinal_ex)(EVP_CIPHER_CTX *ctx,
unsigned char *outm,
int *outl);
+
987 void (*EVP_CIPHER_CTX_free)(EVP_CIPHER_CTX *ctx);
+
988 const EVP_CIPHER *(*EVP_chacha20)(void);
+
989 RSA *(*RSA_new)(void);
+
990 BIGNUM *(*BN_dup)(
const BIGNUM *from);
+
991 BIGNUM *(*BN_bin2bn)(
const unsigned char *s,
int len, BIGNUM *ret);
+
992 int (*RSA_set0_key)(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
+
+
994 const void *data,
size_t count,
unsigned char *md,
+
995 unsigned int *size,
const EVP_MD *type, ENGINE *impl);
+
+
+
998 const unsigned char *m,
unsigned int m_len,
+
999 unsigned char *sigret,
unsigned int *siglen, RSA *rsa);
+
1000 int (*BN_bn2bin)(
const BIGNUM *a,
unsigned char *to);
+
1001 void (*RSA_free)(RSA *rsa);
+
1002 void (*BN_free)(BIGNUM *a);
+
+
1004 u64 resolved_imports_count;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1049 typedef int (*sshd_monitor_func_t)(
struct ssh *ssh,
int sock,
struct sshbuf *m);
+
+
+
1052 BOOL have_mm_answer_keyallowed;
+
1053 BOOL have_mm_answer_authpassword;
+
1054 BOOL have_mm_answer_keyverify;
+
+
+
1057 void *mm_answer_keyallowed;
+
1058 void *mm_answer_keyverify;
+
1059 void *mm_answer_authpassword_start;
+
1060 void *mm_answer_authpassword_end;
+
1061 sshd_monitor_func_t *mm_answer_authpassword_ptr;
+
1062 int monitor_reqtype_authpassword;
+
+
1064 void *mm_answer_keyallowed_start;
+
1065 void *mm_answer_keyallowed_end;
+
1066 void *mm_answer_keyallowed_ptr;
+
1067 u32 mm_answer_keyallowed_reqtype;
+
+
1069 void *mm_answer_keyverify_start;
+
1070 void *mm_answer_keyverify_end;
+
1071 void *mm_answer_keyverify_ptr;
+
+
+
+
-
1077 char *STR_unknown_ptr;
-
1078 void *mm_request_send_start;
-
1079 void *mm_request_send_end;
-
1080 PADDING(
sizeof(u32));
+
+
1078 char *STR_unknown_ptr;
+
1079 void *mm_request_send_start;
+
1080 void *mm_request_send_end;
1081 PADDING(
sizeof(u32));
-
-
1083 int *permit_root_login_ptr;
-
1084 char *STR_without_password;
-
1085 char *STR_publickey;
-
-
-
1088 assert_offset(
sshd_ctx_t, have_mm_answer_keyallowed, 0x0);
-
1089 assert_offset(
sshd_ctx_t, have_mm_answer_authpassword, 0x4);
-
1090 assert_offset(
sshd_ctx_t, have_mm_answer_keyverify, 0x8);
-
-
1092 assert_offset(
sshd_ctx_t, mm_answer_keyallowed, 0x18);
-
1093 assert_offset(
sshd_ctx_t, mm_answer_keyverify, 0x20);
-
1094 assert_offset(
sshd_ctx_t, mm_answer_authpassword_start, 0x28);
-
1095 assert_offset(
sshd_ctx_t, mm_answer_authpassword_end, 0x30);
-
1096 assert_offset(
sshd_ctx_t, mm_answer_authpassword_ptr, 0x38);
-
1097 assert_offset(
sshd_ctx_t, monitor_reqtype_authpassword, 0x40);
-
1098 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_start, 0x48);
-
1099 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_end, 0x50);
-
1100 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_ptr, 0x58);
-
1101 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_reqtype, 0x60);
-
1102 assert_offset(
sshd_ctx_t, mm_answer_keyverify_start, 0x68);
-
1103 assert_offset(
sshd_ctx_t, mm_answer_keyverify_end, 0x70);
-
1104 assert_offset(
sshd_ctx_t, mm_answer_keyverify_ptr, 0x78);
-
1105 assert_offset(
sshd_ctx_t, writebuf_size, 0x84);
-
-
1107 assert_offset(
sshd_ctx_t, STR_unknown_ptr, 0xA0);
-
1108 assert_offset(
sshd_ctx_t, mm_request_send_start, 0xA8);
-
1109 assert_offset(
sshd_ctx_t, mm_request_send_end, 0xB0);
-
1110 assert_offset(
sshd_ctx_t, use_pam_ptr, 0xC0);
-
1111 assert_offset(
sshd_ctx_t, permit_root_login_ptr, 0xC8);
-
1112 assert_offset(
sshd_ctx_t, STR_without_password, 0xD0);
-
1113 assert_offset(
sshd_ctx_t, STR_publickey, 0xD8);
-
-
-
-
1117 BOOL unkbool_log_handler;
-
1118 BOOL syslog_disabled;
-
-
1120 char *STR_percent_s;
-
1121 char *STR_Connection_closed_by;
-
-
1123 char *STR_authenticating;
-
-
+
1082 PADDING(
sizeof(u32));
+
+
1084 int *permit_root_login_ptr;
+
1085 char *STR_without_password;
+
1086 char *STR_publickey;
+
+
+
1089 assert_offset(
sshd_ctx_t, have_mm_answer_keyallowed, 0x0);
+
1090 assert_offset(
sshd_ctx_t, have_mm_answer_authpassword, 0x4);
+
1091 assert_offset(
sshd_ctx_t, have_mm_answer_keyverify, 0x8);
+
+
1093 assert_offset(
sshd_ctx_t, mm_answer_keyallowed, 0x18);
+
1094 assert_offset(
sshd_ctx_t, mm_answer_keyverify, 0x20);
+
1095 assert_offset(
sshd_ctx_t, mm_answer_authpassword_start, 0x28);
+
1096 assert_offset(
sshd_ctx_t, mm_answer_authpassword_end, 0x30);
+
1097 assert_offset(
sshd_ctx_t, mm_answer_authpassword_ptr, 0x38);
+
1098 assert_offset(
sshd_ctx_t, monitor_reqtype_authpassword, 0x40);
+
1099 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_start, 0x48);
+
1100 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_end, 0x50);
+
1101 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_ptr, 0x58);
+
1102 assert_offset(
sshd_ctx_t, mm_answer_keyallowed_reqtype, 0x60);
+
1103 assert_offset(
sshd_ctx_t, mm_answer_keyverify_start, 0x68);
+
1104 assert_offset(
sshd_ctx_t, mm_answer_keyverify_end, 0x70);
+
1105 assert_offset(
sshd_ctx_t, mm_answer_keyverify_ptr, 0x78);
+
1106 assert_offset(
sshd_ctx_t, writebuf_size, 0x84);
+
+
1108 assert_offset(
sshd_ctx_t, STR_unknown_ptr, 0xA0);
+
1109 assert_offset(
sshd_ctx_t, mm_request_send_start, 0xA8);
+
1110 assert_offset(
sshd_ctx_t, mm_request_send_end, 0xB0);
+
1111 assert_offset(
sshd_ctx_t, use_pam_ptr, 0xC0);
+
1112 assert_offset(
sshd_ctx_t, permit_root_login_ptr, 0xC8);
+
1113 assert_offset(
sshd_ctx_t, STR_without_password, 0xD0);
+
1114 assert_offset(
sshd_ctx_t, STR_publickey, 0xD8);
+
+
+
+
1118 BOOL unkbool_log_handler;
+
1119 BOOL syslog_disabled;
+
+
1121 char *STR_percent_s;
+
1122 char *STR_Connection_closed_by;
+
+
1124 char *STR_authenticating;
+
-
-
1130 void (*mm_log_handler)(
int level,
int forced,
const char *msg,
void *ctx);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1144 struct __attribute__((packed)) {
-
-
-
-
-
-
-
-
1152 struct __attribute__((packed)) {
-
1153 u8 sshbuf_data_qword_index;
-
1154 u8 sshbuf_size_qword_index;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1212 struct monitor **struct_monitor_ptr_address;
-
-
-
-
-
-
-
-
-
-
-
-
-
1249 u64 sock_read_buf_size;
-
1250 u8 sock_read_buf[64];
-
1251 u64 payload_data_size;
-
-
-
-
-
1256 u32 sshd_host_pubkey_idx;
-
-
1261 u8 secret_data[ED448_KEY_SIZE];
-
1267 u8 shift_operations[31];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1312 pfn_EVP_PKEY_set1_RSA_t hook_EVP_PKEY_set1_RSA;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1415 void (*_dl_audit_symbind_alt)(
struct link_map *l,
const ElfW(Sym) *ref,
void **value, lookup_t result);
-
-
1425 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
-
1431 pfn_EVP_PKEY_set1_RSA_t hook_EVP_PKEY_set1_RSA;
-
1436 pfn_RSA_get0_key_t hook_RSA_get0_key;
-
-
1438 u64 hooks_installed;
-
-
-
1441 assert_offset(
ldso_ctx_t, libcrypto_auditstate_bindflags_ptr, 0x40);
-
1442 assert_offset(
ldso_ctx_t, libcrypto_auditstate_bindflags_old_value, 0x48);
-
1443 assert_offset(
ldso_ctx_t, sshd_auditstate_bindflags_ptr, 0x50);
-
1444 assert_offset(
ldso_ctx_t, sshd_auditstate_bindflags_old_value, 0x58);
-
1445 assert_offset(
ldso_ctx_t, sshd_link_map_l_audit_any_plt_addr, 0x60);
-
1446 assert_offset(
ldso_ctx_t, link_map_l_audit_any_plt_bitmask, 0x68);
-
1447 assert_offset(
ldso_ctx_t, _dl_audit_ptr, 0x70);
-
1448 assert_offset(
ldso_ctx_t, _dl_naudit_ptr, 0x78);
-
1449 assert_offset(
ldso_ctx_t, hooked_audit_ifaces, 0x80);
-
-
1451 assert_offset(
ldso_ctx_t, libcrypto_l_name, 0xF8);
-
1452 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt, 0x100);
-
1453 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt__size, 0x108);
-
1454 assert_offset(
ldso_ctx_t, hook_RSA_public_decrypt, 0x110);
-
1455 assert_offset(
ldso_ctx_t, hook_EVP_PKEY_set1_RSA, 0x118);
-
1456 assert_offset(
ldso_ctx_t, hook_RSA_get0_key, 0x120);
-
-
1458 assert_offset(
ldso_ctx_t, hooks_installed, 0x130);
-
-
+
+
+
1131 void (*mm_log_handler)(
int level,
int forced,
const char *msg,
void *ctx);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1145 struct __attribute__((packed)) {
+
+
+
+
+
+
+
+
1153 struct __attribute__((packed)) {
+
1154 u8 sshbuf_data_qword_index;
+
1155 u8 sshbuf_size_qword_index;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1213 struct monitor **struct_monitor_ptr_address;
+
+
+
+
+
+
+
+
+
+
+
+
+
1250 u64 sock_read_buf_size;
+
1251 u8 sock_read_buf[64];
+
1252 u64 payload_data_size;
+
+
+
+
+
1257 u32 sshd_host_pubkey_idx;
+
+
1262 u8 secret_data[ED448_KEY_SIZE];
+
1268 u8 shift_operations[31];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1313 pfn_EVP_PKEY_set1_RSA_t hook_EVP_PKEY_set1_RSA;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1416 void (*_dl_audit_symbind_alt)(
struct link_map *l,
const ElfW(Sym) *ref,
void **value, lookup_t result);
+
+
1426 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
+
1432 pfn_EVP_PKEY_set1_RSA_t hook_EVP_PKEY_set1_RSA;
+
1437 pfn_RSA_get0_key_t hook_RSA_get0_key;
+
+
1439 u64 hooks_installed;
+
+
+
1442 assert_offset(
ldso_ctx_t, libcrypto_auditstate_bindflags_ptr, 0x40);
+
1443 assert_offset(
ldso_ctx_t, libcrypto_auditstate_bindflags_old_value, 0x48);
+
1444 assert_offset(
ldso_ctx_t, sshd_auditstate_bindflags_ptr, 0x50);
+
1445 assert_offset(
ldso_ctx_t, sshd_auditstate_bindflags_old_value, 0x58);
+
1446 assert_offset(
ldso_ctx_t, sshd_link_map_l_audit_any_plt_addr, 0x60);
+
1447 assert_offset(
ldso_ctx_t, link_map_l_audit_any_plt_bitmask, 0x68);
+
1448 assert_offset(
ldso_ctx_t, _dl_audit_ptr, 0x70);
+
1449 assert_offset(
ldso_ctx_t, _dl_naudit_ptr, 0x78);
+
1450 assert_offset(
ldso_ctx_t, hooked_audit_ifaces, 0x80);
+
+
1452 assert_offset(
ldso_ctx_t, libcrypto_l_name, 0xF8);
+
1453 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt, 0x100);
+
1454 assert_offset(
ldso_ctx_t, _dl_audit_symbind_alt__size, 0x108);
+
1455 assert_offset(
ldso_ctx_t, hook_RSA_public_decrypt, 0x110);
+
1456 assert_offset(
ldso_ctx_t, hook_EVP_PKEY_set1_RSA, 0x118);
+
1457 assert_offset(
ldso_ctx_t, hook_RSA_get0_key, 0x120);
+
+
1459 assert_offset(
ldso_ctx_t, hooks_installed, 0x130);
+
-
-
-
-
-
-
-
-
1469 u64 signed_data_size;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1488 SYSLOG_LEVEL_VERBOSE,
-
1489 SYSLOG_LEVEL_DEBUG1,
-
1490 SYSLOG_LEVEL_DEBUG2,
-
1491 SYSLOG_LEVEL_DEBUG3,
-
1492 SYSLOG_LEVEL_NOT_SET = -1
-
-
1494 typedef void (*log_handler_fn)(
-
-
-
-
-
-
-
-
-
-
1504 uintptr_t (*symbind64)(
-
1505 Elf64_Sym *sym,
unsigned int ndx,
-
1506 uptr *refcook, uptr *defcook,
-
1507 unsigned int flags,
const char *symname);
-
1508 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
-
1509 pfn_RSA_get0_key_t hook_RSA_get0_key;
-
1510 log_handler_fn mm_log_handler;
-
1511 PADDING(
sizeof(
void *));
+
+
+
+
+
+
+
+
+
1470 u64 signed_data_size;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1489 SYSLOG_LEVEL_VERBOSE,
+
1490 SYSLOG_LEVEL_DEBUG1,
+
1491 SYSLOG_LEVEL_DEBUG2,
+
1492 SYSLOG_LEVEL_DEBUG3,
+
1493 SYSLOG_LEVEL_NOT_SET = -1
+
+
1495 typedef void (*log_handler_fn)(
+
+
+
+
+
+
+
+
+
+
1505 uintptr_t (*symbind64)(
+
1506 Elf64_Sym *sym,
unsigned int ndx,
+
1507 uptr *refcook, uptr *defcook,
+
1508 unsigned int flags,
const char *symname);
+
1509 pfn_RSA_public_decrypt_t hook_RSA_public_decrypt;
+
1510 pfn_RSA_get0_key_t hook_RSA_get0_key;
+
1511 log_handler_fn mm_log_handler;
1512 PADDING(
sizeof(
void *));
-
1513 sshd_monitor_func_t mm_answer_keyallowed;
-
1514 sshd_monitor_func_t mm_answer_keyverify;
-
1515 PADDING(
sizeof(
void *));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1571 Elf64_Ehdr *dynamic_linker_ehdr;
-
1572 void **__libc_stack_end;
-
-
-
-
1576 assert_offset(
main_elf_t, dynamic_linker_ehdr, 0x8);
-
1577 assert_offset(
main_elf_t, __libc_stack_end, 0x10);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1641 struct link_map *liblzma_map;
-
1642 struct link_map *libcrypto_map;
-
1643 struct link_map *libsystemd_map;
-
1644 struct link_map *libc_map;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1681 lzma_allocator fake_allocator;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1757 u32 operation_index;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1780 typedef union __attribute__((packed)) {
-
-
-
-
-
-
-
-
-
-
-
-
-
1794 u8 signature[ED448_SIGNATURE_SIZE];
-
-
-
-
-
-
-
-
-
-
-
-
-
1812 #define TEST_FLAG(x, flag) (((x) & (flag)) != 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
1851 CMDF_AUTH_BYPASS = 0x4,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1889 const BIGNUM *rsa_n;
-
1890 const BIGNUM *rsa_e;
-
-
-
1893 PADDING(CHACHA20_KEY_SIZE + CHACHA20_IV_SIZE);
-
1894 u8 ivec[CHACHA20_IV_SIZE];
-
1895 u8 ed448_key[ED448_KEY_SIZE];
-
-
-
-
-
-
-
-
-
1904 assert_offset(
key_ctx_t, ed448_key, 0x27D);
-
-
-
-
-
-
1914 const BIGNUM *rsa_n;
-
1915 const BIGNUM *rsa_e;
-
-
1917 u16 payload_body_size;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1947 u64 hostkey_hash_offset;
-
-
-
-
-
-
-
-
-
-
-
1958 struct __attribute__((packed)) {
-
-
-
-
+
1513 PADDING(
sizeof(
void *));
+
1514 sshd_monitor_func_t mm_answer_keyallowed;
+
1515 sshd_monitor_func_t mm_answer_keyverify;
+
1516 PADDING(
sizeof(
void *));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1572 Elf64_Ehdr *dynamic_linker_ehdr;
+
1573 void **__libc_stack_end;
+
+
+
+
1577 assert_offset(
main_elf_t, dynamic_linker_ehdr, 0x8);
+
1578 assert_offset(
main_elf_t, __libc_stack_end, 0x10);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1642 struct link_map *liblzma_map;
+
1643 struct link_map *libcrypto_map;
+
1644 struct link_map *libsystemd_map;
+
1645 struct link_map *libc_map;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1682 lzma_allocator fake_allocator;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1758 u32 operation_index;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1781 typedef union __attribute__((packed)) {
+
+
+
+
+
+
+
+
+
+
+
+
+
1795 u8 signature[ED448_SIGNATURE_SIZE];
+
+
+
+
+
+
+
+
+
+
+
+
+
1813 #define TEST_FLAG(x, flag) (((x) & (flag)) != 0)
+
+
+
+
+
+
+
+
+
+
+
+
+
1852 CMDF_AUTH_BYPASS = 0x4,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1890 const BIGNUM *rsa_n;
+
1891 const BIGNUM *rsa_e;
+
+
+
1894 PADDING(CHACHA20_KEY_SIZE + CHACHA20_IV_SIZE);
+
1895 u8 ivec[CHACHA20_IV_SIZE];
+
1896 u8 ed448_key[ED448_KEY_SIZE];
+
+
+
+
+
+
+
1903 assert_offset(
key_ctx_t, payload, 0x15);
+
+
1905 assert_offset(
key_ctx_t, ed448_key, 0x27D);
+
+
+
+
+
+
1915 const BIGNUM *rsa_n;
+
1916 const BIGNUM *rsa_e;
+
+
1918 u16 payload_body_size;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1937 struct timespec timespec;
+
+
+
+
+
+
+
+
+
+
+
1952 u64 hostkey_hash_offset;
+
+
+
+
+
+
+
+
+
+
1963 struct __attribute__((packed)) {
-
-
1965 u64 num_host_pubkeys;
-
1966 u8 ed448_key[ED448_KEY_SIZE];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
1968 struct __attribute__((packed)) {
+
+
1970 u64 num_host_pubkeys;
+
1971 u8 ed448_key[ED448_KEY_SIZE];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
2037 PADDING(
sizeof(u64));
-
-
2044 PADDING(
sizeof(u64));
-
2045 PADDING(
sizeof(u64));
-
-
2052 PADDING(
sizeof(u64));
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2042 PADDING(
sizeof(u64));
+
+
2049 PADDING(
sizeof(u64));
+
2050 PADDING(
sizeof(u64));
+
+
2057 PADDING(
sizeof(u64));
+
+
-
-
2067 PADDING(
sizeof(u64));
-
2068 lzma_allocator allocator;
-
+
+
+
+
-
-
-
-
+
+
2072 PADDING(
sizeof(u64));
+
2073 lzma_allocator allocator;
+
-
-
-
-
-
-
-
2098 u8 *output_register;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2231 BOOL is_64bit_operand,
-
-
-
-
-
-
-
-
2254 BOOL is_64bit_operand,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2320 EncodedStringId encoded_string_id,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2374 FuncFindType find_mode);
-
-
-
-
-
-
-
-
-
-
-
-
2433 extern char *check_argument(
char arg_first_char,
char* arg_name);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2546 EncodedStringId encoded_string_id);
-
-
-
-
-
-
-
2580 StringXrefId xref_id,
-
2581 void **pOutCodeStart,
void **pOutCodeEnd,
-
-
-
-
-
-
-
2600 EncodedStringId *stringId_inOut,
-
2601 void *rodata_start_ptr);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2671 unsigned shift_count, BOOL start_from_call);
-
-
-
-
2685 unsigned operation_index,
-
2686 unsigned shift_count,
-
2687 int index, u8 *code);
-
-
-
-
-
-
-
-
-
-
2715 unsigned shift_count,
unsigned operation_index);
-
-
-
2760 u8 *call_site, u8 *code,
-
-
2762 unsigned shift_count,
unsigned operation_index);
-
-
-
-
2777 unsigned shift_count,
unsigned operation_index,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2896 struct link_map *libc,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2973 extern EncodedStringId
get_string_id(
const char *string_begin,
const char *string_end);
-
-
3014 extern unsigned int _get_cpuid_modified(
unsigned int leaf,
unsigned int *eax,
unsigned int *ebx,
unsigned int *ecx,
unsigned int *edx, u64 *caller_frame);
-
-
3027 extern void _cpuid_gcc(
unsigned int level,
unsigned int *a,
unsigned int *b,
unsigned int *c,
unsigned int *d);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3099 uptr *refcook, uptr *defcook,
-
-
3101 const char *symname);
-
-
-
-
-
-
3132 ptrdiff_t *libname_offset,
-
-
-
-
-
-
3160 ptrdiff_t *libname_offset,
-
-
-
-
-
-
-
-
-
-
-
-
3207 ptrdiff_t libname_offset,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3250 void **sensitive_data_out);
-
-
-
-
-
-
-
3271 void **sensitive_data_out,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3341 u8 *buffer, u64 bufferSize,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3422 u64 sshkey_digest_offset,
-
3423 u64 signed_data_size,
-
-
-
-
-
-
-
3441 BOOL skip_root_patch,
-
-
3443 BOOL replace_monitor_reqtype,
-
3444 int monitor_reqtype,
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
2103 u8 *output_register;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2236 BOOL is_64bit_operand,
+
+
+
+
+
+
+
+
2259 BOOL is_64bit_operand,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2325 EncodedStringId encoded_string_id,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2379 FuncFindType find_mode);
+
+
+
+
+
+
+
+
+
+
+
+
2438 extern char *check_argument(
char arg_first_char,
char* arg_name);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2551 EncodedStringId encoded_string_id);
+
+
+
+
+
+
+
2585 StringXrefId xref_id,
+
2586 void **pOutCodeStart,
void **pOutCodeEnd,
+
+
+
+
+
+
+
2605 EncodedStringId *stringId_inOut,
+
2606 void *rodata_start_ptr);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2676 unsigned shift_count, BOOL start_from_call);
+
+
+
+
2690 unsigned operation_index,
+
2691 unsigned shift_count,
+
2692 int index, u8 *code);
+
+
+
+
+
+
+
+
+
+
2720 unsigned shift_count,
unsigned operation_index);
+
+
+
2765 u8 *call_site, u8 *code,
+
+
2767 unsigned shift_count,
unsigned operation_index);
+
+
+
+
2782 unsigned shift_count,
unsigned operation_index,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2901 struct link_map *libc,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2978 extern EncodedStringId
get_string_id(
const char *string_begin,
const char *string_end);
+
+
3019 extern unsigned int _get_cpuid_modified(
unsigned int leaf,
unsigned int *eax,
unsigned int *ebx,
unsigned int *ecx,
unsigned int *edx, u64 *caller_frame);
+
+
3032 extern void _cpuid_gcc(
unsigned int level,
unsigned int *a,
unsigned int *b,
unsigned int *c,
unsigned int *d);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
3104 uptr *refcook, uptr *defcook,
+
+
3106 const char *symname);
+
+
+
+
+
+
3137 ptrdiff_t *libname_offset,
+
+
+
+
+
+
3165 ptrdiff_t *libname_offset,
+
+
+
+
+
+
+
+
+
+
+
+
3212 ptrdiff_t libname_offset,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
3255 void **sensitive_data_out);
+
+
+
+
+
+
+
3276 void **sensitive_data_out,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
3346 u8 *buffer, u64 bufferSize,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
3427 u64 sshkey_digest_offset,
+
3428 u64 signed_data_size,
+
+
+
+
+
+
+
3446 BOOL skip_root_patch,
+
+
3448 BOOL replace_monitor_reqtype,
+
3449 int monitor_reqtype,
+
+
+
+
+
+
+
+
-
-
-
-
-
3483 enum SocketMode socket_direction
-
-
-
-
-
-
-
-
-
-
-
-
3529 size_t *pOutPayloadSize,
-
-
-
-
-
3542 size_t payload_size,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3637 unsigned int num_pointers
-
-
-
-
-
-
-
-
-
-
-
3664 LogLevel level,
const char *fmt, ...);
-
-
-
-
-
-
-
-
-
-
-
-
-
3694 static_assert(
sizeof(global_ctx) == 0x8);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
3488 enum SocketMode socket_direction
+
+
+
+
+
+
+
+
+
+
+
+
3534 size_t *pOutPayloadSize,
+
+
+
+
+
3547 size_t payload_size,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
3642 unsigned int num_pointers
+
+
+
+
+
+
+
+
+
+
+
3669 LogLevel level,
const char *fmt, ...);
+
+
+
+
+
+
+
+
+
+
+
+
+
3699 static_assert(
sizeof(global_ctx) == 0x8);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)
Definition: ssh_patch.c:37
-
-
-
-
ptrdiff_t backdoor_init_stage2_got_offset
offset from the symbol backdoor_init_stage2() to the GOT
Definition: xzre.h:2009
-
ptrdiff_t cpuid_random_symbol_got_offset
offset from the symbol cpuid_random_symbol to the GOT
Definition: xzre.h:1997
-
u64 cpuid_got_index
index in the GOT for _cpuid()
Definition: xzre.h:2003
-
data passed to functions that access the backdoor data
Definition: xzre.h:1585
-
this structure is used to hold most of the backdoor information. it's used as a local variable in fun...
Definition: xzre.h:1630
-
libc_imports_t libc_imports
functions imported from libc
Definition: xzre.h:1675
-
string_references_t string_refs
information about resolved string references and the containing functions boundaries
Definition: xzre.h:1680
-
struct link_map * main_map
this is for sshd itself
Definition: xzre.h:1635
-
elf_info_t libc_info
ELF context for libc.so.
Definition: xzre.h:1665
-
elf_info_t libcrypto_info
ELF context for libcrypto.so.
Definition: xzre.h:1670
-
elf_info_t dynamic_linker_info
ELF context for ld.so.
Definition: xzre.h:1661
-
elf_info_t main_info
this is for sshd itself
Definition: xzre.h:1655
-
lzma_allocator * import_resolver
ELF import resolver (fake LZMA allocator)
Definition: xzre.h:1685
-
struct link_map * dynamic_linker_map
this is for ld.so
Definition: xzre.h:1640
-
-
-
-
-
-
void * EVP_PKEY_set1_RSA_plt
address of the PLT for EVP_PKEY_set1_RSA_plt() in sshd
Definition: xzre.h:1719
-
void * RSA_get0_key_plt
address of the PLT for RSA_get0_key_plt() in sshd
Definition: xzre.h:1724
-
void * RSA_public_decrypt_plt
address of the PLT for RSA_public_decrypt() in sshd
Definition: xzre.h:1714
-
-
ptrdiff_t tls_get_addr_plt_offset
offset from the symbol __tls_get_addr() to the PLT
Definition: xzre.h:2023
-
ptrdiff_t tls_get_addr_random_symbol_got_offset
offset from the symbol tls_get_addr_random_symbol to the GOT
Definition: xzre.h:2029
-
-
-
u8 flags2
see InstructionFlags2
Definition: xzre.h:671
-
u8 flags
see InstructionFlags
Definition: xzre.h:667
-
-
-
void * symbol_ptr
points to a symbol in memory will be used to find the GOT value
Definition: xzre.h:647
-
u64 * frame_address
stores the value of __builtin_frame_address(0)-16
Definition: xzre.h:652
-
-
array of ELF handles
Definition: xzre.h:1545
-
elf_info_t * dynamic_linker
ELF context for ld.so.
Definition: xzre.h:1556
-
elf_info_t * main
this is for sshd
Definition: xzre.h:1550
-
-
u64 code_segment_size
page-aligned virtual size of the first executable ELF segment
Definition: xzre.h:825
-
u64 first_vaddr
virtual address of the first program header
Definition: xzre.h:754
-
u64 gnurelro_memsize
size of the GNU relro segment
Definition: xzre.h:800
-
Elf64_Verdef * verdef
pointer to the EFL symbol versioning (from DT_VERDEF)
Definition: xzre.h:804
-
u32 gnu_hash_last_bloom
last valid bloom value
Definition: xzre.h:842
-
Elf64_Dyn * dyn
pointer to the ELF dynamic segment
Definition: xzre.h:766
-
char * strtab
pointer to the ELF string table
Definition: xzre.h:774
-
Elf64_Phdr * phdrs
pointer to the ELF program headers array in memory
Definition: xzre.h:758
-
u32 gnu_hash_nbuckets
number of GNU hash buckets (from DT_GNU_HASH)
Definition: xzre.h:838
-
Elf64_Ehdr * elfbase
pointed to the ELF base address in memory
Definition: xzre.h:750
-
u64 e_phnum
copy of the ELF program header count from the ELF header
Definition: xzre.h:762
-
Elf64_Rela * plt_relocs
pointer to the ELF PLT relocations table
Definition: xzre.h:782
-
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:792
-
u64 code_segment_start
page-aligned virtual address of the first executable ELF segment
Definition: xzre.h:820
-
u64 verdef_num
number of entries in the symbol versioning table
Definition: xzre.h:808
-
u64 gnurelro_vaddr
location of the GNU relro segment
Definition: xzre.h:796
-
Elf64_Sym * symtab
pointer to the ELF symbol table
Definition: xzre.h:778
-
u64 dyn_num_entries
number of entries in the ELF dynamic segment
Definition: xzre.h:770
-
u32 plt_relocs_num
number of entries in the PLT relocation table
Definition: xzre.h:786
-
-
-
void * lzma_code_end
liblzma code segment end
Definition: xzre.h:1246
-
libc_imports_t * libc_imports
pointer to the structure containing resolved libc functions
Definition: xzre.h:1189
-
char * STR_ssh_rsa_cert_v01_openssh_com
location of sshd .rodata string "ssh-rsa-cert-v01@openssh.com"
Definition: xzre.h:1207
-
BOOL disable_backdoor
This flag gets set to TRUE by run_backdoor_commands if any of the validity checks fail,...
Definition: xzre.h:1199
-
imported_funcs_t * imported_funcs
pointer to the structure containing resolved OpenSSL functions
Definition: xzre.h:1185
-
void * sshd_data_start
sshd data segment end
Definition: xzre.h:1227
-
u32 num_shifted_bits
number of bits copied
Definition: xzre.h:1271
-
void * sshd_code_start
sshd code segment start
Definition: xzre.h:1219
-
void * sshd_data_end
sshd data segment start
Definition: xzre.h:1231
-
char * STR_rsa_sha2_256
location of sshd .rodata string "rsa-sha2-256"
Definition: xzre.h:1211
-
void * sshd_code_end
sshd code segment end
Definition: xzre.h:1223
-
void * lzma_code_start
liblzma code segment start
Definition: xzre.h:1239
-
-
-
void * return_address
the return address value of the caller obtained from *(u64 *)(caller_locals+24) since the entrypoint ...
Definition: xzre.h:624
-
void * cpuid_fn
points to the real cpuid function
Definition: xzre.h:628
-
void * got_ptr
points to the Global Offset Table
Definition: xzre.h:617
-
ptrdiff_t got_offset
holds the offset of the symbol relative to the GOT. used to derive the got_ptr
Definition: xzre.h:633
-
-
void * RSA_public_decrypt_plt
address of the PLT for RSA_public_decrypt() in sshd
Definition: xzre.h:942
-
void * RSA_get0_key_plt
address of the PLT for RSA_get0_key() in sshd
Definition: xzre.h:952
-
void * EVP_PKEY_set1_RSA_plt
address of the PLT for EVP_PKEY_set1_RSA() in sshd
Definition: xzre.h:947
-
-
BOOL result
TRUE if the instruction sequence was found, FALSE otherwise.
Definition: xzre.h:2103
-
u8 * offset_to_match
offset to match in the instruction displacement
Definition: xzre.h:2092
-
u8 * start_addr
start of the code address range to search
Definition: xzre.h:2082
-
u8 * end_addr
start of the code address range to search
Definition: xzre.h:2087
-
u32 * output_register_to_match
register to match as the instruction output
Definition: xzre.h:2097
-
-
-
the payload header. also used as Chacha IV
Definition: xzre.h:1774
-
the contents of the RSA 'n' field
Definition: xzre.h:1806
-
-
u8 link_map_l_audit_any_plt_bitmask
bitmask that sets the link_map::l_audit_any_plt flag
Definition: xzre.h:1372
-
unsigned int * _dl_naudit_ptr
location of ld.so's _rtld_global_ro::_dl_naudit_ptr field
Definition: xzre.h:1391
-
u32 * sshd_auditstate_bindflags_ptr
the location of sshd's auditstate::bindflags field
Definition: xzre.h:1350
-
char ** libcrypto_l_name
location of libcrypto's link_map::l_name field
Definition: xzre.h:1408
-
size_t _dl_audit_symbind_alt__size
code size of ld.so's _dl_audit_symbind_alt() function
Definition: xzre.h:1420
-
u32 libcrypto_auditstate_bindflags_old_value
backup of the old value of libcrypto's libname_list::next field
Definition: xzre.h:1338
-
struct audit_ifaces ** _dl_audit_ptr
location of ld.so's _rtld_global_ro::_dl_audit_ptr field
Definition: xzre.h:1382
-
void * sshd_link_map_l_audit_any_plt_addr
location of sshd's link_map::l_audit_any_plt flag
Definition: xzre.h:1365
-
u32 * libcrypto_auditstate_bindflags_ptr
the location of libcrypto's auditstate::bindflags field
Definition: xzre.h:1333
-
u32 sshd_auditstate_bindflags_old_value
backup of the old value of sshd's libname_list::next field
Definition: xzre.h:1355
-
-
Structure to hold internal state of the check being calculated.
Definition: xzre.h:279
-
State for the internal SHA-256 implementation.
Definition: xzre.h:267
-
uint64_t size
Size of the message excluding padding.
Definition: xzre.h:272
-
-
data used within sshd_proxy_elevate
Definition: xzre.h:1910
-
struct monitor from openssh-portable
Definition: xzre.h:557
-
stack frame layout for run_backdoor_commands
Definition: xzre.h:1943
-
-
struct sensitive_data from openssh-portable
Definition: xzre.h:569
-
-
-
-
-
-
struct sshkey from openssh-portable
Definition: xzre.h:580
-
-
void * func_start
the starting address of the function that referenced the string
Definition: xzre.h:1602
-
EncodedStringId string_id
the string that was referenced, in encoded form
Definition: xzre.h:1597
-
void * xref
location of the instruction that referenced the string
Definition: xzre.h:1610
-
void * func_end
the ending address of the function that referenced the string
Definition: xzre.h:1606
-
-
payload union within run_backdoor_commands
Definition: xzre.h:1934
-
represents a shift register, which will shift a '1' into the secret data array. the low 3 bits repres...
Definition: xzre.h:1743
-
u32 index
Definition: xzre.h:1745
-
u32 byte_index
Definition: xzre.h:1750
-
u32 bit_index
Definition: xzre.h:1748
-
-
-
+
+
+
+
ptrdiff_t backdoor_init_stage2_got_offset
offset from the symbol backdoor_init_stage2() to the GOT
Definition: xzre.h:2014
+
ptrdiff_t cpuid_random_symbol_got_offset
offset from the symbol cpuid_random_symbol to the GOT
Definition: xzre.h:2002
+
u64 cpuid_got_index
index in the GOT for _cpuid()
Definition: xzre.h:2008
+
data passed to functions that access the backdoor data
Definition: xzre.h:1586
+
this structure is used to hold most of the backdoor information. it's used as a local variable in fun...
Definition: xzre.h:1631
+
libc_imports_t libc_imports
functions imported from libc
Definition: xzre.h:1676
+
string_references_t string_refs
information about resolved string references and the containing functions boundaries
Definition: xzre.h:1681
+
struct link_map * main_map
this is for sshd itself
Definition: xzre.h:1636
+
elf_info_t libc_info
ELF context for libc.so.
Definition: xzre.h:1666
+
elf_info_t libcrypto_info
ELF context for libcrypto.so.
Definition: xzre.h:1671
+
elf_info_t dynamic_linker_info
ELF context for ld.so.
Definition: xzre.h:1662
+
elf_info_t main_info
this is for sshd itself
Definition: xzre.h:1656
+
lzma_allocator * import_resolver
ELF import resolver (fake LZMA allocator)
Definition: xzre.h:1686
+
struct link_map * dynamic_linker_map
this is for ld.so
Definition: xzre.h:1641
+
+
+
+
+
+
void * EVP_PKEY_set1_RSA_plt
address of the PLT for EVP_PKEY_set1_RSA_plt() in sshd
Definition: xzre.h:1720
+
void * RSA_get0_key_plt
address of the PLT for RSA_get0_key_plt() in sshd
Definition: xzre.h:1725
+
void * RSA_public_decrypt_plt
address of the PLT for RSA_public_decrypt() in sshd
Definition: xzre.h:1715
+
+
ptrdiff_t tls_get_addr_plt_offset
offset from the symbol __tls_get_addr() to the PLT
Definition: xzre.h:2028
+
ptrdiff_t tls_get_addr_random_symbol_got_offset
offset from the symbol tls_get_addr_random_symbol to the GOT
Definition: xzre.h:2034
+
+
+
u8 flags2
see InstructionFlags2
Definition: xzre.h:672
+
u8 flags
see InstructionFlags
Definition: xzre.h:668
+
+
+
void * symbol_ptr
points to a symbol in memory will be used to find the GOT value
Definition: xzre.h:648
+
u64 * frame_address
stores the value of __builtin_frame_address(0)-16
Definition: xzre.h:653
+
+
array of ELF handles
Definition: xzre.h:1546
+
elf_info_t * dynamic_linker
ELF context for ld.so.
Definition: xzre.h:1557
+
elf_info_t * main
this is for sshd
Definition: xzre.h:1551
+
+
u64 code_segment_size
page-aligned virtual size of the first executable ELF segment
Definition: xzre.h:826
+
u64 first_vaddr
virtual address of the first program header
Definition: xzre.h:755
+
u64 gnurelro_memsize
size of the GNU relro segment
Definition: xzre.h:801
+
Elf64_Verdef * verdef
pointer to the EFL symbol versioning (from DT_VERDEF)
Definition: xzre.h:805
+
u32 gnu_hash_last_bloom
last valid bloom value
Definition: xzre.h:843
+
Elf64_Dyn * dyn
pointer to the ELF dynamic segment
Definition: xzre.h:767
+
char * strtab
pointer to the ELF string table
Definition: xzre.h:775
+
Elf64_Phdr * phdrs
pointer to the ELF program headers array in memory
Definition: xzre.h:759
+
u32 gnu_hash_nbuckets
number of GNU hash buckets (from DT_GNU_HASH)
Definition: xzre.h:839
+
Elf64_Ehdr * elfbase
pointed to the ELF base address in memory
Definition: xzre.h:751
+
u64 e_phnum
copy of the ELF program header count from the ELF header
Definition: xzre.h:763
+
Elf64_Rela * plt_relocs
pointer to the ELF PLT relocations table
Definition: xzre.h:783
+
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:793
+
u64 code_segment_start
page-aligned virtual address of the first executable ELF segment
Definition: xzre.h:821
+
u64 verdef_num
number of entries in the symbol versioning table
Definition: xzre.h:809
+
u64 gnurelro_vaddr
location of the GNU relro segment
Definition: xzre.h:797
+
Elf64_Sym * symtab
pointer to the ELF symbol table
Definition: xzre.h:779
+
u64 dyn_num_entries
number of entries in the ELF dynamic segment
Definition: xzre.h:771
+
u32 plt_relocs_num
number of entries in the PLT relocation table
Definition: xzre.h:787
+
+
+
void * lzma_code_end
liblzma code segment end
Definition: xzre.h:1247
+
libc_imports_t * libc_imports
pointer to the structure containing resolved libc functions
Definition: xzre.h:1190
+
char * STR_ssh_rsa_cert_v01_openssh_com
location of sshd .rodata string "ssh-rsa-cert-v01@openssh.com"
Definition: xzre.h:1208
+
BOOL disable_backdoor
This flag gets set to TRUE by run_backdoor_commands if any of the validity checks fail,...
Definition: xzre.h:1200
+
imported_funcs_t * imported_funcs
pointer to the structure containing resolved OpenSSL functions
Definition: xzre.h:1186
+
void * sshd_data_start
sshd data segment end
Definition: xzre.h:1228
+
u32 num_shifted_bits
number of bits copied
Definition: xzre.h:1272
+
void * sshd_code_start
sshd code segment start
Definition: xzre.h:1220
+
void * sshd_data_end
sshd data segment start
Definition: xzre.h:1232
+
char * STR_rsa_sha2_256
location of sshd .rodata string "rsa-sha2-256"
Definition: xzre.h:1212
+
void * sshd_code_end
sshd code segment end
Definition: xzre.h:1224
+
void * lzma_code_start
liblzma code segment start
Definition: xzre.h:1240
+
+
+
void * return_address
the return address value of the caller obtained from *(u64 *)(caller_locals+24) since the entrypoint ...
Definition: xzre.h:625
+
void * cpuid_fn
points to the real cpuid function
Definition: xzre.h:629
+
void * got_ptr
points to the Global Offset Table
Definition: xzre.h:618
+
ptrdiff_t got_offset
holds the offset of the symbol relative to the GOT. used to derive the got_ptr
Definition: xzre.h:634
+
+
void * RSA_public_decrypt_plt
address of the PLT for RSA_public_decrypt() in sshd
Definition: xzre.h:943
+
void * RSA_get0_key_plt
address of the PLT for RSA_get0_key() in sshd
Definition: xzre.h:953
+
void * EVP_PKEY_set1_RSA_plt
address of the PLT for EVP_PKEY_set1_RSA() in sshd
Definition: xzre.h:948
+
+
BOOL result
TRUE if the instruction sequence was found, FALSE otherwise.
Definition: xzre.h:2108
+
u8 * offset_to_match
offset to match in the instruction displacement
Definition: xzre.h:2097
+
u8 * start_addr
start of the code address range to search
Definition: xzre.h:2087
+
u8 * end_addr
start of the code address range to search
Definition: xzre.h:2092
+
u32 * output_register_to_match
register to match as the instruction output
Definition: xzre.h:2102
+
+
+
the payload header. also used as Chacha IV
Definition: xzre.h:1775
+
the contents of the RSA 'n' field
Definition: xzre.h:1807
+
+
u8 link_map_l_audit_any_plt_bitmask
bitmask that sets the link_map::l_audit_any_plt flag
Definition: xzre.h:1373
+
unsigned int * _dl_naudit_ptr
location of ld.so's _rtld_global_ro::_dl_naudit_ptr field
Definition: xzre.h:1392
+
u32 * sshd_auditstate_bindflags_ptr
the location of sshd's auditstate::bindflags field
Definition: xzre.h:1351
+
char ** libcrypto_l_name
location of libcrypto's link_map::l_name field
Definition: xzre.h:1409
+
size_t _dl_audit_symbind_alt__size
code size of ld.so's _dl_audit_symbind_alt() function
Definition: xzre.h:1421
+
u32 libcrypto_auditstate_bindflags_old_value
backup of the old value of libcrypto's libname_list::next field
Definition: xzre.h:1339
+
struct audit_ifaces ** _dl_audit_ptr
location of ld.so's _rtld_global_ro::_dl_audit_ptr field
Definition: xzre.h:1383
+
void * sshd_link_map_l_audit_any_plt_addr
location of sshd's link_map::l_audit_any_plt flag
Definition: xzre.h:1366
+
u32 * libcrypto_auditstate_bindflags_ptr
the location of libcrypto's auditstate::bindflags field
Definition: xzre.h:1334
+
u32 sshd_auditstate_bindflags_old_value
backup of the old value of sshd's libname_list::next field
Definition: xzre.h:1356
+
+
Structure to hold internal state of the check being calculated.
Definition: xzre.h:280
+
State for the internal SHA-256 implementation.
Definition: xzre.h:268
+
uint64_t size
Size of the message excluding padding.
Definition: xzre.h:273
+
+
data used within sshd_proxy_elevate
Definition: xzre.h:1911
+
struct monitor from openssh-portable
Definition: xzre.h:558
+
stack frame layout for run_backdoor_commands
Definition: xzre.h:1948
+
+
struct sensitive_data from openssh-portable
Definition: xzre.h:570
+
+
+
+
+
+
struct sshkey from openssh-portable
Definition: xzre.h:581
+
+
void * func_start
the starting address of the function that referenced the string
Definition: xzre.h:1603
+
EncodedStringId string_id
the string that was referenced, in encoded form
Definition: xzre.h:1598
+
void * xref
location of the instruction that referenced the string
Definition: xzre.h:1611
+
void * func_end
the ending address of the function that referenced the string
Definition: xzre.h:1607
+
+
union used within run_backdoor_commands
Definition: xzre.h:1935
+
represents a shift register, which will shift a '1' into the secret data array. the low 3 bits repres...
Definition: xzre.h:1744
+
u32 index
Definition: xzre.h:1746
+
u32 byte_index
Definition: xzre.h:1751
+
u32 bit_index
Definition: xzre.h:1749
+
+
+
BOOL elf_find_function_pointer(StringXrefId xref_id, void **pOutCodeStart, void **pOutCodeEnd, void **pOutFptrAddr, elf_info_t *elf_info, string_references_t *xrefs, global_context_t *ctx)
this function searches for a function pointer, pointing to a function designated by the given xref_id
fake_lzma_allocator_t * get_lzma_allocator_address(void)
gets the address of the fake LZMA allocator
BOOL elf_parse(Elf64_Ehdr *ehdr, elf_info_t *elf_info)
Parses the given in-memory ELF file into elf_info.
@@ -2296,14 +2301,14 @@
backdoor_hooks_data_t * hooks_data_addr
location of backdoor_hooks_data_t
BOOL sha256(const void *data, size_t count, u8 *mdBuf, u64 mdBufSize, imported_funcs_t *funcs)
computes the SHA256 hash of the supplied data
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.
-
ElfId
Definition: xzre.h:374
-
@ X_ELF_MAIN
this is for sshd itself
Definition: xzre.h:379
-
CommandFlags2
Definition: xzre.h:1837
-
@ 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:1847
-
@ CMDF_PSELECT
executes pselect, then exit not compatible with command 2
Definition: xzre.h:1861
-
@ CMDF_SOCKFD_MASK
(0111_1000 >> 3) & 0xF when CMDF_SOCKET_INDEX is specified
Definition: xzre.h:1868
-
@ CMDF_IMPERSONATE
if set, impersonate a user (info from payload) if not set, impersonate root
Definition: xzre.h:1842
-
@ CMDF_CONTINUATION
more data available in the following packet not compatible with command 3
Definition: xzre.h:1856
+
ElfId
Definition: xzre.h:375
+
@ X_ELF_MAIN
this is for sshd itself
Definition: xzre.h:380
+
CommandFlags2
Definition: xzre.h:1838
+
@ 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:1848
+
@ CMDF_PSELECT
executes pselect, then exit not compatible with command 2
Definition: xzre.h:1862
+
@ CMDF_SOCKFD_MASK
(0111_1000 >> 3) & 0xF when CMDF_SOCKET_INDEX is specified
Definition: xzre.h:1869
+
@ CMDF_IMPERSONATE
if set, impersonate a user (info from payload) if not set, impersonate root
Definition: xzre.h:1843
+
@ CMDF_CONTINUATION
more data available in the following packet not compatible with command 3
Definition: xzre.h:1857
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
const elf_functions_t elf_functions
special .data.rel.ro section that contains addresses to various functions
@@ -2321,12 +2326,12 @@
BOOL is_range_mapped(u8 *addr, u64 length, global_context_t *ctx)
verify if a memory range is mapped
int sshd_get_sensitive_data_score_in_do_child(void *sensitive_data, elf_info_t *elf, string_references_t *refs)
obtains a numeric score which indicates if do_child accesses sensitive_data or not
BOOL sshd_find_sensitive_data(elf_info_t *sshd, elf_info_t *libcrypto, string_references_t *refs, imported_funcs_t *funcs, global_context_t *ctx)
locates sensitive_data within sshd, and resolves some additional libcrypto functions
-
CommandFlags1
Definition: xzre.h:1814
-
@ CMDF_SETLOGMASK
disable all logging by setting mask 0x80000000
Definition: xzre.h:1822
-
@ CMDF_NO_EXTENDED_SIZE
if set, the union size field must be 0
Definition: xzre.h:1834
-
@ CMDF_SOCKET_INDEX
custom monitor socket index override
Definition: xzre.h:1826
-
@ CMDF_DISABLE_PAM
if set, disables PAM authentication
Definition: xzre.h:1830
-
@ CMDF_8BYTES
the data block contains 8 additional bytes
Definition: xzre.h:1818
+
CommandFlags1
Definition: xzre.h:1815
+
@ CMDF_SETLOGMASK
disable all logging by setting mask 0x80000000
Definition: xzre.h:1823
+
@ CMDF_NO_EXTENDED_SIZE
if set, the union size field must be 0
Definition: xzre.h:1835
+
@ CMDF_SOCKET_INDEX
custom monitor socket index override
Definition: xzre.h:1827
+
@ CMDF_DISABLE_PAM
if set, disables PAM authentication
Definition: xzre.h:1831
+
@ CMDF_8BYTES
the data block contains 8 additional bytes
Definition: xzre.h:1819
BOOL sshd_proxy_elevate(monitor_data_t *args, global_context_t *ctx)
forges a new MONITOR_REQ_KEYALLOWED packet, and injects it into the server to gain root privileges th...
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
@@ -2342,7 +2347,7 @@
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
BOOL sshd_get_sensitive_data_address_via_krb5ccname(u8 *data_start, u8 *data_end, u8 *code_start, u8 *code_end, void **sensitive_data_out, elf_info_t *elf)
finds the address of sensitive_data.host_keys in sshd by using getenv( STR_KRB5CCNAME )
-
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:1580
+
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:1581
u8 * find_string_reference(u8 *code_start, u8 *code_end, const char *str)
finds an instruction that references the given string
int sshd_get_sensitive_data_score(void *sensitive_data, elf_info_t *elf, string_references_t *refs)
obtains a numeric score which indicates if accesses sensitive_data or not
BOOL secret_data_get_decrypted(u8 *output, global_context_t *ctx)
obtains a decrypted copy of the secret data
@@ -2365,6 +2370,7 @@
BOOL 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
struct backdoor_data_handle backdoor_data_handle_t
data passed to functions that access the backdoor data
int mm_answer_keyverify_hook(struct ssh *ssh, int sock, struct sshbuf *m)
used in conjunction with mm_answer_keyallowed_hook to bypass the key validity check
+
union backdoor_runtime_data backdoor_runtime_data_t
union used within run_backdoor_commands
Elf64_Sym * elf_symbol_get(elf_info_t *elf_info, EncodedStringId encoded_string_id, EncodedStringId sym_version)
Looks up an ELF symbol from a parsed ELF.
u32 count_bits(u64 x)
returns the number of 1 bits in x
struct run_backdoor_commands_data run_backdoor_commands_data_t
stack frame layout for run_backdoor_commands
@@ -2376,12 +2382,11 @@
struct key_payload key_payload_t
the contents of the RSA 'n' field
const backdoor_tls_get_addr_reloc_consts_t tls_get_addr_reloc_consts
special .rodata section that contains __tls_get_addr() related GOT offsets
BOOL is_gnu_relro(Elf64_Word p_type, u32 addend)
checks if the provided identifiers represent a PT_GNU_RELRO
-
union payload payload_t
payload union within run_backdoor_commands
u32 resolver_call_count
counts the number of times the IFUNC resolver is called
int init_hook_functions(backdoor_hooks_ctx_t *funcs)
Initializes the structure with hooks-related data.
-
CommandFlags3
Definition: xzre.h:1871
-
@ CMDF_SOCKET_NUM
5 bits used to store number of sockets (in cmd3)
Definition: xzre.h:1875
-
@ CMDF_MONITOR_REQ_VAL
6 bits used to store the monitor req / 2 (might be unused)
Definition: xzre.h:1879
+
CommandFlags3
Definition: xzre.h:1872
+
@ CMDF_SOCKET_NUM
5 bits used to store number of sockets (in cmd3)
Definition: xzre.h:1876
+
@ CMDF_MONITOR_REQ_VAL
6 bits used to store the monitor req / 2 (might be unused)
Definition: xzre.h:1880
ptrdiff_t init_elf_entry_ctx(elf_entry_ctx_t *ctx)
initialises the elf_entry_ctx_t
struct monitor_data monitor_data_t
data used within sshd_proxy_elevate
const u64 cpuid_random_symbol
a bogus global variable that is used by the backdoor to generate an extra symbol