diumenge, 20 de maig del 2012

dummy fork bomb debian squeeze

mirant logs de navegació veig que s'ha consultat switchroot.com, i vaig a veure la pàgina, amb un primer enllaç de How to create a Linux Fork Bomb. dit i fet , connectar al servidor, no fer prova abans en un entorn de prova, 12 de la nit, copy paste, i fi, perdua de connexió al servidor directament
[root@server ~]# :(){ :|: & };:
Details: The above can be explained as -
:( )     # 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. 
 
basicament comportament de 'dummy', potser?
 
bé, aprofitant "l'hazaña" per acabar de securitzar-ho poso un limit al fitxer /etc/security/limits.conf
 
 smx2a-11        hard    nproc   100

smx2b-11        hard    nproc   100

asix2-11        hard    nproc   100

dai2-11 hard    nproc   100

smx1a-11        hard    nproc   100

posant un limit de processos a 100 per evitar-ho, de totes maneres ningú no treballa directament al sistema.

Ara sí, faig la prova, procesos, load es dispara a més de 400 i 1000 pero rapidament finalitza i poc a poc es regualitza.