+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 25
*nix Thread, Ways to break Linux... in Technical; I'm having a play around with various different flavours of Linux in VM form, and we were wondering in the ...
  1. #1
    kirchie's Avatar
    Join Date
    Jul 2012
    Location
    Oxfordshire
    Posts
    83
    Thank Post
    16
    Thanked 5 Times in 5 Posts
    Rep Power
    4

    Ways to break Linux...

    I'm having a play around with various different flavours of Linux in VM form, and we were wondering in the office, is there an equivalent in Linux of deleting system32 from Terminal? Just want to see what happens!

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    rm -rf /

    (you can be assured it won't work well after you've done the above)

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,800
    Thank Post
    110
    Thanked 582 Times in 503 Posts
    Blog Entries
    1
    Rep Power
    223
    As a normal user, you can't break anything other than your own stuff in your home directory (depending on the limits set by root, for example you could still max the CPU, fill the memory or the disk as a normal user if there were no process limits or disk quotas imposed on you). You can test if this is the case by running a fork bomb.

    Code:
    #!/bin/sh 
    :(){ :|:& };:

    As root you can destroy the file system and its contents and even destroy physical hardware if you so choose to (overwriting firmware or the bios that linux exposes rw to root via /dev).

    Remember with Linux there are no safety nets. It assumes you know what you are doing and will follow your requests to the letter. With all the terrible consequences that entails.
    Last edited by Geoff; 30th November 2012 at 12:54 PM.

  4. Thanks to Geoff from:

    kmount (30th November 2012)

  5. #4

    Oaktech's Avatar
    Join Date
    Jul 2011
    Location
    Bournemouth
    Posts
    2,463
    Thank Post
    678
    Thanked 451 Times in 363 Posts
    Rep Power
    229
    don't adjust logging on your linux webserver, let the log files fill up and and the system will grind to a halt... it's not deleting the OS, but you can break it like that!

    [/got the tshirt]

  6. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,800
    Thank Post
    110
    Thanked 582 Times in 503 Posts
    Blog Entries
    1
    Rep Power
    223
    Quote Originally Posted by Oaktech View Post
    don't adjust logging on your linux webserver, let the log files fill up and and the system will grind to a halt... it's not deleting the OS, but you can break it like that!

    [/got the tshirt]
    man logrotate

  7. #6


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    338
    Quote Originally Posted by Geoff View Post
    man logrotate
    and put /var onto another filesystem

  8. #7
    CAM
    CAM is offline

    CAM's Avatar
    Join Date
    Mar 2008
    Location
    Burgh Heath, Surrey
    Posts
    3,703
    Thank Post
    755
    Thanked 296 Times in 233 Posts
    Blog Entries
    60
    Rep Power
    243
    Re-installed it quite a few times already the last few weeks due to some "soft trashings" of my Linux installs...

    - Swapping from GNOME to KDE once broke my auto-updates with 'permission errors.'
    - Install compiz-config and disable OpenGL compositing whilst set to auto-login. All you will see is your desktop wallpaper.
    - Attempt to run Guild Wars 2 with the latest version of Wine. Watch as Compiz proceeds to hog 100% CPU and require you to use TTY1 to restart the system.
    - Delete every icon from the desktop and every single KDE launcher. If you don't know how to get them back...

    I'm sure there are thousands of commands or config tweaks that will cripple your system forcing you to restart or re-install.

    That said, learning to use the CTRL+ALT+Fx combo helps greatly for recovering a botched config or rogue program.

  9. #8


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    338
    Quote Originally Posted by CAM View Post
    I'm sure there are thousands of commands or config tweaks that will cripple your system forcing you to restart or re-install.
    I'm sure there are - but I don't think any of the things you mentioned are beyond fixing.

  10. #9
    kirchie's Avatar
    Join Date
    Jul 2012
    Location
    Oxfordshire
    Posts
    83
    Thank Post
    16
    Thanked 5 Times in 5 Posts
    Rep Power
    4
    Quote Originally Posted by kmount View Post
    rm -rf /

    (you can be assured it won't work well after you've done the above)
    Lovely! I had to stick --no-preserve-root on the end for it to work though. Poor thing won't even shutdown any more

  11. #10

    twin--turbo's Avatar
    Join Date
    Jun 2012
    Location
    Carlisle
    Posts
    2,334
    Thank Post
    1
    Thanked 381 Times in 340 Posts
    Rep Power
    149
    Ahh, i remember switching to the wrong machine on remote terminal and instead of being in /var/spool/xyxyxy , I was in /

    After thinkg for a few moments that it was taking longer than expected I realised that I was in the process of wiping the filesystem of our proxy server...

    HayHo.. It was a bit screwed.. But it had not got as far as TAR... So just untared the backup file back to the files system

    Rob

  12. #11


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    338
    Quote Originally Posted by twin--turbo View Post
    Ahh, i remember switching to the wrong machine on remote terminal and instead of being in /var/spool/xyxyxy , I was in /

    After thinkg for a few moments that it was taking longer than expected I realised that I was in the process of wiping the filesystem of our proxy server...

    yep. been there and done that. Many years back I managed to rm -rf an entire UNIX web server.

  13. #12
    kirchie's Avatar
    Join Date
    Jul 2012
    Location
    Oxfordshire
    Posts
    83
    Thank Post
    16
    Thanked 5 Times in 5 Posts
    Rep Power
    4
    Quote Originally Posted by CyberNerd View Post
    yep. been there and done that. Many years back I managed to rm -rf an entire UNIX web server.
    So it's safe to say that Linux assumes that you know what you're doing, hence the lack of pop ups every other minute asking if you're sure you want to delete/do something?

  14. #13

    X-13's Avatar
    Join Date
    Jan 2011
    Location
    /dev/null
    Posts
    8,004
    Thank Post
    508
    Thanked 1,591 Times in 1,122 Posts
    Blog Entries
    19
    Rep Power
    700
    Quote Originally Posted by kirchie View Post
    So it's safe to say that Linux assumes that you know what you're doing, hence the lack of pop ups every other minute asking if you're sure you want to delete/do something?
    TBF, Linux is usually on backend stuff. So it's managed by people with experience of it.

    Linux needs a n00bmode command...

  15. #14

    unixman_again's Avatar
    Join Date
    Nov 2011
    Posts
    585
    Thank Post
    24
    Thanked 109 Times in 84 Posts
    Rep Power
    129
    Quote Originally Posted by kirchie View Post
    Lovely! I had to stick --no-preserve-root on the end for it to work though. Poor thing won't even shutdown any more
    Back in the days of SCO/Unix on the 386, this command would run right up until it removed the rm executable, and then it would stop. After your timeslice is up, your session gets rolled out. When it gets rolled in again, it reloads the binary and continues from where it left off, but of course the binary isn't there anymore.

    One way to break a Linux system is dd if=/dev/zero of=/dev/sda bs=1024 count=a big number. Of course, you might have to change the disk assignment.

  16. #15

    bladedanny's Avatar
    Join Date
    May 2009
    Location
    Sheffield
    Posts
    1,199
    Thank Post
    174
    Thanked 272 Times in 203 Posts
    Rep Power
    123
    I'm sure this has been posted on here before but it's relevant to the thread.

    How Pixar Almost Deleted Toy Story 2 | Software Testing Blog

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. best way to run windows apps on ubuntu linux?
    By misterfriendly in forum Thin Client and Virtual Machines
    Replies: 14
    Last Post: 9th June 2011, 06:12 PM
  2. Best way to install .exe accross the network through GPO
    By tosca925 in forum How do you do....it?
    Replies: 2
    Last Post: 12th December 2005, 09:45 PM
  3. Replies: 24
    Last Post: 6th September 2005, 12:26 PM
  4. Five reasons NOT to use Linux. :)
    By Geoff in forum *nix
    Replies: 2
    Last Post: 31st August 2005, 07:38 AM
  5. STS-114: Discovery - Way To Go
    By zippy in forum General Chat
    Replies: 1
    Last Post: 26th July 2005, 08:16 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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