Skip to content

Commit

Permalink
sshd_ctx: new fields/asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 19, 2024
1 parent b63113c commit d4e7254
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,16 @@ assert_offset(imported_funcs_t, libc, 0x118);
assert_offset(imported_funcs_t, resolved_imports_count, 0x120);
static_assert(sizeof(imported_funcs_t) == 0x128);

struct ssh;
struct sshbuf;

typedef struct __attribute__((packed)) sshd_ctx {
BOOL have_mm_answer_keyallowed;
BOOL have_mm_answer_authpassword;
BOOL have_mm_answer_keyverify;
PADDING(0x14);
PADDING(0x4);
int (*monitor_req_fn)(struct ssh *ssh, int sock, struct sshbuf *m);
PADDING(0x8);
PADDING(sizeof(void *));
void *mm_answer_authpassword_start;
void *mm_answer_authpassword_end;
Expand Down Expand Up @@ -879,6 +884,10 @@ typedef struct __attribute__((packed)) sshd_ctx {
char *STR_publickey;
} sshd_ctx_t;

assert_offset(sshd_ctx_t, have_mm_answer_keyallowed, 0x0);
assert_offset(sshd_ctx_t, have_mm_answer_authpassword, 0x4);
assert_offset(sshd_ctx_t, have_mm_answer_keyverify, 0x8);
assert_offset(sshd_ctx_t, monitor_req_fn, 0x10);
assert_offset(sshd_ctx_t, mm_answer_authpassword_start, 0x28);
assert_offset(sshd_ctx_t, mm_answer_authpassword_end, 0x30);
assert_offset(sshd_ctx_t, monitor_req_authpassword, 0x38);
Expand Down

0 comments on commit d4e7254

Please sign in to comment.