systemadmin.es » LAMP y web » Eliminar el metodo TRACE en apache

Eliminar el metodo TRACE en apache

Tal como se explica en este paper de WhiteHat Security los sistemas con el TRACE habilitado pueden ser suceptibles a XSS y robo de crendenciales.

Para provar si es el caso se puede comprovar haciendo un telnet al pueto 80 del servidor web para introducir las siguientes lineas:

TRACE / HTTP/1.1
Host: nombrededominio.es
TRACE: yes

La salida que se obtendría en un servidor con el TRACE habilitado sería:

[root@shuVak conf]# telnet systemadmin.es 80
Trying 91.121.113.59...
Connected to systemadmin.es.
Escape character is '^]'.
TRACE / HTTP/1.1
Host: systemadmin.es
TRACE: yes

HTTP/1.1 200 OK
Date: Thu, 30 Oct 2008 19:32:33 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: message/http

36
TRACE / HTTP/1.1
Host: systemadmin.es
TRACE: yes

0

Connection closed by foreign host.

Para solucionar esto solo hace falta añadir al final del todo del fichero de configuració del apache (httpd.conf) la siguiente linea:

TraceEnable off

Por lo que una vez recargada la configuración el servidor respondería así:

[root@shuVak conf]# telnet systemadmin.es 80
Trying 91.121.113.59...
Connected to systemadmin.es.
Escape character is '^]'.
TRACE / HTTP/1.1
Host: systemadmin.es
TRACE: yes

HTTP/1.1 405 Method Not Allowed
Date: Thu, 30 Oct 2008 19:33:46 GMT
Server: Apache
Allow:
Content-Length: 223
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method TRACE is not allowed for the URL /.</p>
</body></html>
Connection closed by foreign host.

Relacionados

Imprimir Imprimir

Deja un comentario:

XHTML - Tags permitidos:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>