Désactiver la méthode TRACE sur Apache

Par défaut sous Apache, la méthode TRACE est activée ce qui peut conduire à des vulnérabilités de type XSS :

# curl -X OPTIONS http://127.0.0.1 -i
HTTP/1.1 200 OK
Date: Tue, 28 Jul 2009 14:04:13 GMT
Server: Apache
Allow: GET,HEAD,POST,OPTIONS,TRACE
Content-Length: 0
Content-Type: text/html


En ajoutant la directive TraceEnable à Off dans le fichier de conf apache 2.x :

TraceEnable Off

on teste le bon support :

# apachectl -t
Syntax OK

puis on relance Apache et on teste de nouveau :

# apachectl restart
#  curl -X OPTIONS http://127.0.0.1 -i
HTTP/1.1 200 OK
Date: Tue, 28 Jul 2009 14:21:42 GMT
Server: Apache
Allow: GET,HEAD,POST,OPTIONS
Content-Length: 0
Content-Type: text/html

Voilà !

Post to Twitter

About SR

Expert Réseau et Sécurité. Vous pouvez me contacter sur sreytan.(at).randco.fr
This entry was posted in and tagged , , . Bookmark the permalink.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*

Vous pouvez utiliser ces balises et attributs HTML : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>