Forkbombs

forkbomb icon

About

These scripts are published for research purposes only. A forkbomb is a localized denial of service (DNS) attack. A program opens copies of itself, which open copies of themselves, which open copies of themselves, and so on until system resources are exhausted. A forkbomb is not a virus, as it doesn't spread to other computers (though a virus may incorporate a forkbomb as part of its payload).

Example

#include <unistd.h>;

int main(void) {
	for(;;)
		fork();

	return 0;
}

Safety

The forkbombs are provided as source code, a safe medium. They are only executed upon user request, and a reboot kills them.

Procedures

  1. Save and close important documents.
  2. Download the forkbomb scripts.
  3. Select a script and execute it.
  4. The computer will begin to slow down and may become unresponsive.
  5. Restart the computer.
  6. Normal operation resumes.

Erlang, Light as a Feather

Erlang is well-known for its concurrent capabilities, fault tolerance, and incredibly lightweight processes. The bomb listed above spawns 134217727 of them. Here's a screenshot of the Activity Monitor during its run:

screenshot

A CPU running at 128.6% capacity seems unlikely. Even more surprising is that while bomb.erl ran, it did not visibly slow the rest of the operating system. Erlang processes really are lightweight!