diff options
| author | spv420 <unomilliono@gmail.com> | 2022-05-31 19:51:14 -0400 |
|---|---|---|
| committer | spv420 <unomilliono@gmail.com> | 2022-05-31 19:51:14 -0400 |
| commit | b040db45dfc9ef9a902e48bc2718a94cd099f505 (patch) | |
| tree | 7b361fbd03f866b225473a54f837ec388f9fa4fb /tools/shc/shellcode.c | |
| parent | fe765137cd79a671dc3e6932bb867ef333611e73 (diff) | |
I live in a constant state of fear and misery
Do you miss me anymore?
And I don't even notice
When it hurts anymore
Anymore
Anymore
Anymore
Diffstat (limited to 'tools/shc/shellcode.c')
| -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 |
