diff options
Diffstat (limited to 'tools/shc')
| -rw-r--r-- | tools/shc/shellcode.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/shc/shellcode.c b/tools/shc/shellcode.c index e48b51d..011b5cc 100644 --- a/tools/shc/shellcode.c +++ b/tools/shc/shellcode.c @@ -4,7 +4,21 @@ typedef unsigned int uint32_t; -void shellcode(void) { - *(uint32_t*)0x41414141 = 0x42424242; -// __builtin_unreachable(); -}
\ No newline at end of file +//#define PRINTF_ADDR 0x2054a3b9 +//#define BASE_ADDR 0x42000000 + +void entry(void) { + *(uint32_t*)0x69696969 = (uint32_t)0x1; + /* + uint32_t dlsym_addr = *(uint32_t*)BASE_ADDR; + void* (*dlsym)(void* handle, char* s) = (void* (*)(void*, char*))dlsym_addr; + void (*abort)(void) = dlsym(0xfffffffe, "abort"); + abort();*/ +} + +/* +void shellcode_main(void) { + uint32_t puts_addr = *(uint32_t*)BASE_ADDR; + int (*puts)(char* s) = (int (*)(char* s))puts_addr; + puts("Hello from shellcode!\n"); +}*/
\ No newline at end of file |
