Destructive fun with Linux


Page 1 of 5 12345 LastLast
Results 1 to 15 of 69

Thread: Destructive fun with Linux

  1. #1
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794

    Destructive fun with Linux

    I've just rebuilt the server at home, and I was wondering how much fun you can have trashing a Linux system.

    As root, try this:

    > cd /
    > rm -rf *

    Has anyone managed to wipe out the entire filesystem (best set the immutable flag on rm) and still keep the system running?

    I managed to wipe out 98% (I'm guessing, but there wasn't much left) of the system before I accidentally wiped the rm command.

    Anyone else got some fun (destructive) commands no-one should ever try on a production system?

    How about echoing /dev/random into the swap partition on a running system? Or dd'ing random data to /dev/hda? Any other ideas?

    James
    Last edited by Satanic Atheist; 09-03-2003 at 09:40 AM.
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  2. #2
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    OK. I did it.

    > echo /dev/random > /dev/mem

    Wanna know what happened?

    Nothing. Absolutely Zip.

    I also tried:

    > echo /dev/random > /dev/hda5

    Which also managed to do nothing. That's the swap partition by the way.

    I would've expected a kernel panic or something.

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  3. #3
    Join Date
    Oct 2002
    Posts
    204
    try rm -rf * with other network drives mounted. that can be fun.....
    Have you ever thought that while you're killing time, time is returning the favor?

  4. #4
    Join Date
    Oct 2002
    Location
    Earth
    Posts
    1,616
    Isn't satanic atheist an oxymoron?
    -------------
    Folding is Fun

    I thought I made a mistake once, but, of course, I was mistaken.

  5. #5
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    I only wanted to kill one machine, not the network (although there are a few users I wouldn't mind killing off!).

    Next time I have my laptop powered up, I'll rig it to the network and share the Windows partition and try it. Hope those tapes still work...

    Yes - Satanic Atheist is an oxymoron, and I coined the name to cause mischief in religious chat rooms (great fun - how to make the God Squad swear at you).

    Does anyone know how to start rewriting random parts of the memory on a running system to crash it badly?

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  6. #6
    Join Date
    Sep 2002
    Posts
    1,291
    Originally posted by Satanic Atheist

    Does anyone know how to start rewriting random parts of the memory on a running system to crash it badly?

    James
    Well, i'm unsure, but I suppose you could try writing to /proc/kcore, but I doubt it will let you (I think it's read only).

    using the cat function is always fun... for example as root:
    Code:
    cat /proc/kcore > /dev/dsp
    cat /dev/random > /dev/dsp
    Make sure the volume is WAY up!!

    Of course, you can always do insane things like rm vmlinuz and then reboot.

  7. #7
    Join Date
    Aug 2002
    Location
    Essex, UK
    Posts
    937
    try:

    dd if=/dev/urandom of=/dev/kmem bs=1k count=128000

    That should put 128MB of random values into /dev/kmem. Try /dev/mem as well. I'm going to try all of these just before I reinstall Does anyone know what it sounds like if you cat /dev/zero or /dev/null to /dev/dsp?

    cat /dev/random > /dev/dsp
    Best be careful, do that for long enough and you might hear a copyrighted song
    Registered Linux User #325947

    Check out Feather Linux, my distro.
    (Yes, it's shameless self promotion, deal with it )

  8. #8
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    Deleting vmlinuz is a boring way to kill a machine. Effective, but boring.

    Rerouting /dev/random into the audio mixer. Hmmm.

    What about doing the same to /dev/video and pretending you're on a power trip?

    This is gonna be fun...

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  9. #9
    Join Date
    Mar 2003
    Location
    Augusta, GA
    Posts
    5,459
    Would "mv /proc/*** /etc" and/or "mv /etc/**** /proc" do anything? And how about "cat /usr/*** > /root?
    __________________________________________________ _______________________________________
    Bigboogie on boogienights.net:
    Ammo case
    Asus 8N32 SLI MB
    AMD Athlon x2 3800+
    2 GB Patriot Signature 400 DDR
    160 GB Hitachi 7200 IDE
    2 x-250 Seagate SATA2
    EVGA Nvidia 7900GT
    Dell 2007WFP
    Logitech 5.1 speakers
    Logitech MX1000 mouse
    Dell USB keyboard
    NEC 3500 DVD-RW
    Benq 1655 DVD-RW



    (God bless tax refunds)

  10. #10
    Join Date
    Oct 2002
    Posts
    204
    think it'd let you echo or cat /dev/random to the kernel or vmlinuz?
    Have you ever thought that while you're killing time, time is returning the favor?

  11. #11
    Join Date
    Feb 2000
    Location
    Scotland
    Posts
    1,163
    Originally posted by Satanic Atheist
    OK. I did it.

    > echo /dev/random > /dev/mem

    Wanna know what happened?

    Nothing. Absolutely Zip.
    I've never looked at that part of /dev before, but I'd assume that it did nothing because the kernel is in charge of seeing that each process has it's own memory space. It makes sense then that nothing happened; the process that command was running under (or whatever) would have had random values piped into it, but not the rest of the system.

  12. #12
    Join Date
    Mar 2003
    Location
    Hampton, VA
    Posts
    714
    I know that everybody is entitled to their own opinion and everyone has their own prerogative obviously, but why don't you do something productive with your time instead of breaking stuff. Just a suggestion.

    EVAC

  13. #13
    Join Date
    Aug 2002
    Location
    Essex, UK
    Posts
    937
    Because breaking things helps you learn
    Anyway, I'm only going to do this stuff just before a reinstall, so there's no harm done.

    How can you resist not creating funny sounds from /dev/urandom?
    Registered Linux User #325947

    Check out Feather Linux, my distro.
    (Yes, it's shameless self promotion, deal with it )

  14. #14
    Join Date
    Oct 2002
    Posts
    204
    breaking stuff is more fun, hence a better way to learn. break it then learn to fix it...
    Have you ever thought that while you're killing time, time is returning the favor?

  15. #15
    Join Date
    Mar 2003
    Location
    Hampton, VA
    Posts
    714

    A Philosophical Side Note...

    I always learned more by fixing things that are broke but not necessarily intentionally broken. I have also learned much more by creating things and making mistakes and learning from my mistakes (rather than destroying). There are somethings that you test the reliability of using a controlled system instead of a choatic system. Would you take a beautifully designed antique vase and break it by throwing it off a building? Or would you crash a brand new Porsche into a ditch? There is absolutely nothing to gain in these exercises unless you are actually testing the reliability of something else.

    Again that is just my opinion

    EVAC

Posting Permissions

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