A Word Of Caution :Linux NewBies

Recently On Orkut,a user was Asking me that he executed some random comand which he doesnt know and all his files were deleted.Thank God He dint Have Root permissions.So I explained Him to not try anything he doesnt know (esp found on Forums or for that matter anywhere on Net) on a computer that has any physical connection to valuable data


He requested me to post a article to make the newbies aware of this..So here i Go… Here are some common examples of dangerous commands that shouldn’t be Run unless you are aware of what ur doing.Take caution for yourself when something just doesn’t “feel right”.
PLZ DO NOT TRY THESE

—>These Commands Delete all files, delete current directory, and delete files that arent hidden in current directory. It’s quite obvious why these commands can be dangerous to execute.

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

–>Deletes even the Hidden Files:

rm -r .*

—>Dont Execute Shell Scripts From the People you dont Trust.They may contain malicious commands…If Possible Have a Look at the Script…

wget ftp://path/file
sh ./file

—>Mkfs command destroys the data on the given device and recreates with a blank one.

mkfs
mkfs.ext3

–>This one causes raw data to be written to a block device. Often times this will thrash the filesystem and cause loss of data:

command > /dev/sda
dd if=ABC of=/dev/sda

Forkbomb:Fork is like cloning, If process make fork(); it duplicates itself and continues execution from the next line after fork();
Executes a huge number of processes recursively until system freezes.Took only 30 seconds For my slack to crash 🙂
It forces you to do a hard reset which may cause corruption or data damage

:(){:|:&};:

In Perl it is sumthing like
perl -e “fork while fork” &

In Python

import os
while(1):
os.fork()

As a bat file (Windows):

:bomb
start %0
goto bomb

UNIX style for Windows:

%0|%0

Tarbomb: Someone asks you to extract a tar archive into an existing directory. This tar archive can be crafted to explode into a million files, or inject files into the system by guessing filenames. You should make the habit of decompressing tars inside a cleanly made directory

Decompression bomb: Someone asks you to extract an archive which appears to be a small download. In reality it’s highly compressed data and will inflate to hundreds of GB’s, filling your hard drive. You should not touch data from an untrusted source

Thats All For now..If you Find anything as such you can Post as a comment.i shall add it…

One Reply to “A Word Of Caution :Linux NewBies”

Comments are closed.