/*
# Smallest Linux/x86 - exit(0) shellcode (5 bytes)
# Author: Anurag Srivastava
# Tested on: i686 GNU/Linux
# Shellcode Length: 5
exitchotu: file format elf32- /*
# 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[] =
"x6ax01x58xcdx80";
main()
{
printf("Shellcode Length: %d
", strlen(code));
int (*ret)() = (int(*)())code;
ret();
}