Linux/x86 exit(0) Shellcode

5 bytes small Linux/x86 exit(0) shellcode.


MD5 | 97f77e037e6ad851dd4cb58e15f33372

/*
# Smallest Linux/x86 - exit(0) shellcode (5 bytes)
# Author: Anurag Srivastava
# Tested on: i686 GNU/Linux
# Shellcode Length: 5

exitchotu: file format elf32-i386

Disassembly of section .text:

08048060 <_start>:
8048060: 6a 01 push 0x1
8048062: 58 pop eax
8048063: cd 80 int 0x80
===============POC by Anurag Srivastava=========================
*/
#include<stdio.h>
#include<string.h>

unsigned char code[] = \

"\x6a\x01\x58\xcd\x80";

main()
{

printf("Shellcode Length: %d\n", strlen(code));

int (*ret)() = (int(*)())code;

ret();

}

Related Posts