How to crash a Linux server the Forkbomb way ?

What is a Forkbomb ?

A Forkbomb is a process that when initially launched create another process of the same process to an infinite number of processes. I will simplify it for you, Imagine you opened google chrome browser on your Laptop and on opening google chrome browser it opens 2 more browsers and the 2 browser opens 4 more browsers and it goes on until everything freezes. Its like rabbits reproducing at the speed of light.

The Linux Forkbomb command :

# :(){ :|:& };:



frkbomb

Just after Launching the command Poof everything freezes. Try this at your own risk I will not be accountable of any damages cause on the server.

The best part of it is that this command can be execute by every user, So you don’t need to have a root access to crash it 😀

How it works ?

We create a function name ” : ”

 :() {   }

Now inside the function we call the function and we push it in the function and finally put it in background.

:|:&

Finally we end the function with an ” ; ” and we run the function name ” : ”

;:

The scenario is that the “:” will call the function to run and will spawns new functions endless and will continue until the maximum process limit is reached. As the system itself can use any process it just hang up !!

We you guys want to try it, you can do it safe in a Virtual machine here.

Article by Ash

“Your eyes can deceive you. Don’t trust them.” – Obi-Wan Kenobi