Foro de elhacker.net

Seguridad Informática => Seguridad => Mensaje iniciado por: cybero en 4 Agosto 2012, 09:14 am



Título: phpshell
Publicado por: cybero en 4 Agosto 2012, 09:14 am
Como me puedo proteger de las phpshell ???

Administro un servidor web y me acabo de topar con la famosa c99


Título: Re: phpshell
Publicado por: int_0x40 en 4 Agosto 2012, 19:21 pm
Pues comienza por instalar el mod_security si estás usando Apache y agrega unas cuantas reglas, algo como:
 
Código:
SecRule ARGS "\.(dat|gif|jpg|png|bmp|txt|vir|dot)\?\&(cmd|inc|name)="

SecRule REQUEST_FILENAME "/(r57shell|TrYaG|TrYg|m0rtix|r0nin|c99shell|phpshell|sa3ekashell|crackit|c777|void\.ru|phpremoteview|directmail|bash_history|\.ru/|brute|c991)\.php"
SecRule REQUEST_FILENAME "\.pl"
SecRule REQUEST_FILENAME "perl .*\.pl(\s|\t)*\;"
SecRule REQUEST_FILENAME "\;(\s|\t)*perl .*\.pl"
SecRule RESPONSE_BODY "TrYaG"
SecRule RESPONSE_BODY "shell"
SecRule RESPONSE_BODY "Sniper"
SecRule RESPONSE_BODY "SnIpEr_SA"
SecRule RESPONSE_BODY "c99"

Deshabilita funciones shell , exec y system en php.ini, si tienes funciones que permitan interactuar con el sistema de archivos revísalas.

Saludos.