웹 취약점/Method 취약점

tomcat 서버 trace method 제한하기

샤이릴라 2019. 10. 2. 17:10

1. tomcat  서버 trace method 제한하기

기본적으로

web.xml 파일을 열어

차단할 method 작성한다

 

차단할 method 설정

 

trace method 를 확인하면 405로 차단되었지만

Allow에 method 정보가 나온다

왜죠???

 

해결책 검

  1. ' server.xml ' 파일을여십시오.
  2. ' < Connector ...> '태그를 찾아 ' allowTrace '변수를 찾으십시오.
  3. ' allowTrace '변수가 없거나 정의되어 ' false '로 설정된 경우 HTTP 추적이 비활성화됩니다.
  4. 존재하고 ' true '로 설정 되면 HTTP 추적 메소드가 사용됩니다 (기본값이 아니며 특정 시점에서 수동으로 변경되었음을 나타냄)
  • 'Connector' tag with HTTP Trace explicitly disabled:
    <Connector URIEncoding="UTF-8" acceptCount="100" clientAuth="false" debug="0" disableUploadTimeout="true" enableLookups="false" keystoreFile="conf/.keystore" keystorePass="protect" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="443" scheme="https" secure="true" sslProtocol="TLS" allowTrace="false" />

  • 'Connector' tag with HTTP Trace explicity enabled:
    <Connector URIEncoding="UTF-8" acceptCount="100" clientAuth="false" debug="0" disableUploadTimeout="true" enableLookups="false" keystoreFile="conf/.keystore" keystorePass="protect" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="443" scheme="https" secure="true" sslProtocol="TLS" allowTrace="true" />

 

 

 

 

fales 바꾸고 테스트진행

 

변경해도 정보가노출된다

 

??

 

 

반대로 true 변경

 

안나온다?

 

왜일까?

모르것다 ㅠㅠ