티스토리 뷰
웹취약점 Tomcat http-Method 처리..TRACE
오랜만에 글을 작성 하게 되었다. 정규직으로 일을하다 4년전 부터 프리랜서 생활을 하면서 점점 잊혀져갔다.. 이제라도 다시 블로그 관리에 박차를 가하려 한다..
올해 1월부터 두달간 웹취약점 점검으로 계약하면서 일하던중 http-method 관련하여 trace명령어 제한이 잘안되면서 해당 처리 방법에 관련하여 글을 작성하게 되었다.
<security-constraint> <web-resource-collection> <web-resource-name>Protected Context</web-resource-name> <url-pattern>/*</url-pattern> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> <http-method>COPY</http-method> <http-method>HEAD</http-method> <http-method>PUT</http-method> <http-method>DELETE</http-method> <http-method>PATCH</http-method> <http-method>CONNECT</http-method> </web-resource-collection> <auth-constraint /> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>Protected Context</web-resource-name> <url-pattern>/servlet/org.apache.catalina.servlets.DefaultServlet/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> |
<구글링해서 찾은 방법1_tomcat/web.xml 하단에 추가>
<security-constraint> <display-name>Forbidden</display-name> <web-resource-collection> <web-resource-name>Protected Context</web-resource-name> <url-pattern>/*</url-pattern> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> <http-method>COPY</http-method> <http-method>HEAD</http-method> <http-method>PUT</http-method> <http-method>DELETE</http-method> <http-method>PATCH</http-method> <http-method>CONNECT</http-method> </web-resource-collection> <auth-constraint> <role-name></role-name> </auth-constraint> </security-constraint> |
<구글링에서 찾은 방법2_WEB-INF/web.xml 추가>
위 2가지 방법으로 명령어 제한을 걸어서 일반적인 메소드들(PUT, DELETE....등)은 동작하지 않았으나. 문제는 TRACE메소드... TRACE명령어를 실행하면..
위와 같이 Allow: POST, GET, DELETE, OPTIONS, PUT, HEAD는 사용가능한 METHOD들이 표시된다. 하지만 web.xml에 이미 해당 명령어 들은 수행 불가능하게 만들어 두었기 때문에 문제는 발생하지 않치만... 고객의 요구...로 Allow: POST, GET, DELETE, OPTIONS, PUT, HEAD요 문구가 표시되면 안된다고 한다!!!! 으아아악....
구글링 및 여러 검색 사이트를 이용해도 위 두가지 방법만 알려줄뿐..그러던중..
위와 같이 최근 tomcat은 server.xml allowTrace="true" 처럼 이미 trace명령어는 사용불가능하게 셋팅되어 있다. web.xml에서 TRACE 메소드를 제한하지 않더라도 이미 trace명령어는 사용불가능하게 설정되어 있던것이다.. 하지만 allow..표시가되니 하.... 그래서
혹시나 하는 마음에 위와 같이 allowTrace="false"로 변경 한 후.. 결국 trace명령어 사용은 tomcat에서 사용가능하게 한 후.. web.xml에서 메소드 제한한 상태에서 테스트를 진행 하였다.
하하하하하하하하하하.. 그랬더니.. 위와 같이 allow관련하여 메시지가 표시 안되게 되었다..ㅠ,.ㅠ
'Work > 웹취약점' 카테고리의 다른 글
BurpSuite Proxy 사용시 작동 안되는 경우 (0) | 2019.02.27 |
---|
- Total
- Today
- Yesterday
- Proxy 동작암함
- 백업 ora-12514
- ORA-12514
- 메소드 TRACE
- 오라클 exp ora-12514
- 이클립스 복사
- 글자깜빡임
- 이클립스 복사 느려짐
- 웹취약점 TRACE
- 오라클 exp
- BurpSuite Proxy 동작
- BurpSuite Proxy 작동안됨
- 이클립스 복사시 느려짐
- Allow: POST
- 이클립스 복사붙여넣기시 느려짐
- An invalid XML character (Unicode: 0x2)
- BurpSuite Proxy 해결
- An invalid XML character
- TNS리스너 에러
- BurpSuite Proxy
- 이클립스 복사시 멈춤
- http-Method
- 톰켓 TRACE
- 이클립스 복사 붙여넣기 느려짐
- method TRACE
- BurpSuite Proxy 사용법
- 이클립스 복사 멈춤
- exp tns리스너
- exp ora-12514
- Tomcat http-Method
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |