/* (Simple sys_exit Shellcode) Lenght : 12 ------------------ NASM Code : section .text global _start _start: xor eax,eax xor ebx,ebx xor ecx,ecx xor edx,edx mov al, 1 ; Exit int 80h */ #include <stdio.h> #include <string.h> void main(void) { char shellcode[] = "\x31\xc0\x31\xdb\x31\xc9\x31\xd2\xb0\x01\xcd\x80"; fprintf(stdout,"Lenght: %d\n",strlen(shellcode)); (*(void(*)()) shellcode)(); }
fr0g