I was having a discussion about code obscurity relative to different programming languages and had to mention this particular piece of malicious code from the unix shell.
WARNING! – DO NOT RUN THIS COMMAND – YOU WILL LIKELY BRING DOWN YOUR SYSTEM BEFORE YOU CAN RECOVER:
This is a fork bomb and works like this:
:(){ :|:& };:
The :() defines a function called ':'
The {:|: &} says to run the function : and sends the output to the : function again.
That allows it to run in the background which prevents the children from being killed once the parents are auto-killed.
The ; is a command separator and the following : calls the function the first time and initiates the chain reaction.
The worst/best part of this is there’s nothing about this sort of code that requires and administrative/root privilege to run.
![Share on Facebook Facebook](http://geekworldliving.com/gwl/wp-content/plugins/social-media-feather/synved-social/image/social/regular/32x32/facebook.png)
![Share on Twitter twitter](http://geekworldliving.com/gwl/wp-content/plugins/social-media-feather/synved-social/image/social/regular/32x32/twitter.png)
![Share by email mail](http://geekworldliving.com/gwl/wp-content/plugins/social-media-feather/synved-social/image/social/regular/32x32/mail.png)
Leave a Reply
You must be logged in to post a comment.