News for hackers. Stuff that matters.
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by chuhnk on Thursday November 25, 2010 @02:54PM (#1940892)
Wait, is this run locally because I could just do :(){:|:&}; :& which is pretty effective.
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by JoachimSchipper on Thursday November 25, 2010 @03:06PM (#1940909)
Not on a competently-run (multiuser) system, which will have process limits etc in place.
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by nailer on Thursday November 25, 2010 @04:07PM (#1941003)
Indeed. I'm wondering if the parent attack somehow bypasses open file hard limits.
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by rcfox on Thursday November 25, 2010 @03:19PM (#1940933)
Am I the only one who initially thought this was a sequence of emoticons?
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by johnswamps on Thursday November 25, 2010 @05:04PM (#1941108)
I'm not sure why : has been chosen as the canonical fork bomb function name, but it's more readable with something like

resurse() { recurse | recurse &}; recurse

Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by marbu on Thursday November 25, 2010 @06:44PM (#1941267)
In this example, the poor readability is a feature. Nevertheless the ":" character is bash inner function, which tells the shell to do nothing (except the arguments expansion), like pass in python. This means that you can redefine it and use it to confuse others. Most of other special characters are not functions so you are not able to redefine them that easily.
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by kmort on Thursday November 25, 2010 @05:58PM (#1941188)
And it's usually accompanied by the adjective "elegant", which I find rather baffling.

"Cute" or "cryptic", perhaps.

Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by zandorg on Thursday November 25, 2010 @04:02PM (#1940993)
Confuse the computer by making it sad?
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by chuhnk on Thursday November 25, 2010 @03:57PM (#1940987)
haha yes I can see it now. Its a bash function that gets called recursively. Nice and simple, I've tested it in a few different environments, linux 2.4, linux 2.6, open bsd, solaris. All vanilla installs. Solaris is the only one I havent seen die.
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by pyre on Thursday November 25, 2010 @03:38PM (#1940957)
For the uninitiated see the Wikipedia entry on "fork bombs"
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by hdx on Thursday November 25, 2010 @05:04PM (#1941111)
u mind sharing what ":(){:|:&}; :&" means?
Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by chuhnk on Thursday November 25, 2010 @05:19PM (#1941138)
:() is a function that accepts no arguments, it calls itself (recursion) then pipes the output to another call to itself that is backgrounded, basically two calls to the function. That is the function definition, it is then called and backgrounded via :&

I am a true believer in the power of bash and despite the fact that it is not a programming language I will still try use it in that form just for fun.

Re:Simple kernel attack: Eat 100% CPU, works under guest, no... by callahad on Thursday November 25, 2010 @05:09PM (#1941126)