ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • TRACE Method Disable하기
    Infomation Security/WEB 2015. 1. 5. 00:52

    보안 계통 일을 하다보니 취약점을 점검하고 보안 가이드를 전달해서 취약점 조치를 요청하는 경우가 많다.


    하지만 테스트 환경의 부재, 귀차니즘으로 인해 제대로된 가이드를 전달하지 않거나 무조건 조치하라는 식으로 밀어부치는 경우가 많다(나또한..ㅠ)


    시간이 많이 늦은 감은 있지만 Trace Method를 제한하는 방법을 소개하고자 한다.(실제 테스트 한!)


    [ IIS ]

     - IIS 6.0 (Server 2003)


    > URL Scan 설치 : http://www.microsoft.com/en-us/download/details.aspx?id=12719


    > urlscan.ini 파일 수정(위치 : C:\WINDOWS\system32\inetsrv\urlscan\urlscan.ini)


    - HTTP Response 값을 수정하는 설정 파일이라 생각하면 편하다.


    - TRACE Method를 Disable하기 위해서는 urlscan.ini 파일을 아래와 같이 수정한다.

    UseAllowVerbs=1


    [AllowVerbs]

    ;

    ; The verbs (aka HTTP methods) listed here are those commonly

    ; processed by a typical IIS server.

    ;

    ; Note that these entries are effective if "UseAllowVerbs=1"

    ; is set in the [Options] section above.

    ;


    GET

    HEAD

    POST


    - 추가적으로 HTTP Response에 IIS 6.0과 같은 버전 정보를 유추할 수 있는 값을 지우고 싶다면

    RemoveServerHeader=1           ; If 1, remove the 'Server' header from response.



    > 결과적으로 아래와 같은 응답이 온다.(IIS 버전 정보도 지워진 것을 알수있다)

    - OPTIONS 요청 시

    HTTP/1.1 404 Not Found

    Connection: close

    Date: Sun, 04 Jan 2015 15:46:09 GMT

    Content-Length: 92

    Content-Type: text/html


    <html><head><title>Error</title></head><body>지정된 파일을 찾을 수 없습니다.

    </body></html>


    - TRACE 요청 시

    HTTP/1.1 404 Not Found

    Connection: close

    Date: Sun, 04 Jan 2015 15:46:07 GMT

    Content-Length: 92

    Content-Type: text/html


    <html><head><title>Error</title></head><body>지정된 파일을 찾을 수 없습니다.

    </body></html>


    > URL SCAN 설치 후 IIS 재시작만 하면 적용되며, 설정 변경 후에도 IIS만 재시작하면 된다.

Designed by Tistory.