Further improvements in the rootkit configuration by the user

This commit is contained in:
h3xduck
2021-12-31 12:02:35 -05:00
parent 0863566292
commit d18b0aa23c
11 changed files with 1274 additions and 59 deletions

View File

@@ -1,14 +0,0 @@
#ifndef __MODULES_H
#define __MODULES_H
#define RETURN_VALUE_MODULE_NONACTIVE -1
//Access user-defined config
#include "../../user/include/modules/module_manager.h"
#define CHECK_MODULE_ACTIVE(module, func)\
if( module_config. module##_module.all != ON){\
return RETURN_VALUE_MODULE_NONACTIVE;\
}
#endif

View File

@@ -32,7 +32,6 @@
#include "utils/strings.h"
//BPF modules to load
#include "include/utils/modules.h" //Config
#include "include/bpf/sched.h"
char LICENSE[] SEC("license") = "Dual BSD/GPL";
@@ -47,7 +46,6 @@ struct eth_hdr {
SEC("xdp_prog")
int xdp_receive(struct xdp_md *ctx){
CHECK_MODULE_ACTIVE(xdp, __FUNCTION__);
//bpf_printk("BPF triggered\n");
void *data_end = (void *)(long)ctx->data_end;