UNIX Nasties

xiaoxiao2021-03-05  26

UNIX Nasties

By Shooting Shark Anjiang Zezhi

============================================================================================================================================================================================================= ===

Summary: Destroy some of the methods of your favorite UNIX system.

Order: I don't advocate any way I mentioned in the file. UNIX is a very Cool operating system, and many aspects may be designed in history.

One of the best operating systems. If you can access a UNIX system, you'd better learn Unix and learn C, because it is also a money tree in the computer world.

However, UNIX is also relatively easy to be unsafeful by my unsafe operating system. This document describes some ways to do this.

System hangs (Crash The System)

----------------

Unix has no built-in user maximum disk space. Therefore, a user can occupy the disk space of the entire system and effectively prevent anyone from writing magnetic

plate. A simple way to spend a disk is to create a subdirectory in a subdirectory until it cannot be. There are several ways to implement below.

1> Create a document containing the following line:

Mkdir Subdir

CD Subdir

Source / U1 / MyDir / Crash

Name it as Crash, the last line ("Source / U1 / MYDIR / CRASH") should be replaced to let it get in your own directory.

If your directory is / u3 / students / jeff, it should be "Source / U3 / Students / Jeff / Crash". Write a good text

After the item, type:

% Scource Crash

Then wait ... After a minute, the program will terminate because the disk space is no longer. There is no other person.

2> There is a simpler implementation method here. Create a "endless loop" shell script:

While:; do

Mkdir Subdir

CD Subdir

DONE

Then "Source" this file. If you are in the "SH" shell (if, there should be a "¥" prompt), you can play behind "$"

"While:; do". Then you get a> prompt. Type the remaining three-way generation.

3> If you want the process to keep executing and log out, assume that the file is named CRASH, type:

% Nohup Source Crash &

Then log out. This will start a background process, allowing you to continue executing after you log out. Missing, log out as soon as possible, because if you use the first example

If the Crash file, he will crazy and eat the whole system to destroy. This will make us ... Slow Down The System Immensely

------------------------------

There are many ways to achieve the goal, one way is to create a sufficient multi-backend process. There is a typical example here. Create a "slow1" containing the following lines

file:

W &

Source Slow1

Create a "Slow2" file:

Source Slow1 &

Source Slow2

Then perform SLOW2

% SLOW2

or

% SLOW2 &

This will start 25 background processes, each process runs 25 sub-process. The system will be full.

Make a directory (Messing Up A Direcotry)

----------------------

A lot of file operation commands use the "-" option. Create a file that starts with "-":

Cat> -filename

Now I'm going to take a few lines, such as "Haha you can't delete this file". ] Type ^ D (Control-D) end input. Now your directory

There is a file called -filename. Deleting this file will be very difficult. If you use rm -filename or

MV -FileName, RM or MV will explain -FileName as an option, not a file, and will prompt you to tell you

-FileName is not an effective option ... This, the file is always there!

Establishing a hundreds of documents that start with "-" to everyone's great pain! They may have to create a new account!

Conclusion

Using any of the above methods is very irresponsible, whoever doing this in my UNIX system will definitely provoke me. That's why I am strongly built

Never use these techniques.

转载请注明原文地址:https://www.9cbs.com/read-32152.html

New Post(0)