사용자 도구

사이트 도구


wiki:was:tomcat:tip:tomcat_보안

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
wiki:was:tomcat:tip:tomcat_보안 [2022/07/22 13:55]
bjlee
wiki:was:tomcat:tip:tomcat_보안 [2023/01/13 18:44] (현재)
줄 39: 줄 39:
 jar uf catalina.jar org/apache/catalina/util/ServerInfo.properties jar uf catalina.jar org/apache/catalina/util/ServerInfo.properties
 </code> </code>
- 
 \\ \\
 +-----
 2. Header(헤더) 버전 정보 제거 \\ 2. Header(헤더) 버전 정보 제거 \\
 server.xml 파일 수정 \\ server.xml 파일 수정 \\
줄 59: 줄 59:
 Date: Tue , 02 Jan 2018 04:33:57 GMT Date: Tue , 02 Jan 2018 04:33:57 GMT
 </code> </code>
- 
 \\ \\
 +-----
 3. ErrorReportValve 설정을 통한 정보 제거 \\ 3. ErrorReportValve 설정을 통한 정보 제거 \\
   * server.xml 파일 수정   * server.xml 파일 수정
줄 71: 줄 71:
 </code> </code>
 \\ \\
 +-----
 4. 불필요한 examples 디렉토리(/examples) 제거 4. 불필요한 examples 디렉토리(/examples) 제거
   * 서버에 대한 상세 정보를 제공하고 있고, 예제 프로그램 취약점 공격 예방을 위해서 삭제.   * 서버에 대한 상세 정보를 제공하고 있고, 예제 프로그램 취약점 공격 예방을 위해서 삭제.
     {$CATALINA_HOME}/webapps/examples 폴더 삭제     {$CATALINA_HOME}/webapps/examples 폴더 삭제
 \\ \\
 +\\
 +-----
 +
 5. 에러 페이지 처리 \\ 5. 에러 페이지 처리 \\
   * 공격자가 대상 시스템의 정보를 획득하기 위해 고의적으로 다양한 에러를 유발하여 돌아오는 에러 메시지를 통해 웹 프로그램의 구조 및 환경 설정을 추정할 수 있음. \\   * 공격자가 대상 시스템의 정보를 획득하기 위해 고의적으로 다양한 에러를 유발하여 돌아오는 에러 메시지를 통해 웹 프로그램의 구조 및 환경 설정을 추정할 수 있음. \\
  
-1) {$CATALINA_HOME}/webapps/ROOT 디렉토리에 error.jsp 에러 페이지 생성 +===== Ref ===== 
-<code bash> +[[wiki:was:tomcat:tip:tomcat_버전_정보_숨기기|tomcat 버전 정보 숨기기]]
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> +
-<html> +
-<head> +
-<title>404 Not Found</title> +
-</head> +
-<body> +
-<h1>Not Found</h1> +
-<p>The requested URL was not found on this server.</p> +
-<p>Additionally, a 404 Not Found +
-error was encountered while trying to use an ErrorDocument to handle the request.</p> +
-</body> +
-</html> +
-</code>+
  
-2) {$CATALINA_HOME}/conf web.xml에 에러 페이지 설정 +{{tag>톰캣 보안 밤즌}}
- +
-web.xml 제일 하단 </welcome-file-list</web-app> 사이에 넣고 톰캣 재시작 +
- +
-<code bash> +
-<error-page> +
-<error-code>401</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>402</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>403</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>404</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>405</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>406</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>407</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>408</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>409</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>410</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>411</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>412</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>413</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>414</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>415</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>500</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>501</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>502</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>503</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>504</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
- +
-<error-page> +
-<error-code>505</error-code> +
-<location>/error.jsp</location> +
-</error-page> +
-</code> +
-{{tag>pseudo-classes}}+
/volume1/web/dokuwiki/data/attic/wiki/was/tomcat/tip/tomcat_보안.1658465753.txt.gz · 마지막으로 수정됨: 2022/07/22 13:55 저자 bjlee