In this article, we will learn about why fork bombs are so deadly, alongside preventative measures so your system becomes immune to them. A fork bomb

How I Destroyed my Linux System with a Single Command

submited by
Style Pass
2024-09-05 14:30:05

In this article, we will learn about why fork bombs are so deadly, alongside preventative measures so your system becomes immune to them.

A fork bomb is a denial-of-service attack where a process continuously creates child processes at an exponential rate, consuming system resources like CPU, memory, and process slots, ultimately causing the system to crash.

It’s important to note that fork bombs are not exclusive to Bash. You can write a fork bomb in python, Windows CMD… but we'll use the Bash version in this tutorial since it’s the most common one.

Using your new knowledge, watch from T2:48 and try to understand what is happening by looking at the process table to the left:

By reducing the number of available processes, the impact of a fork bomb is minimized. A fork bomb is only effective if it can consume all system resources, which requires most of the process slots.

Configuring system-wide limits is similar to setting user limits, but involves editing a different file that manages system-wide process rules.

Leave a Comment