OS Apache나, Tomcat 버젼 노출 취약점
2019.12.09 19:56
Apache나, Tomcat 버젼 노출 취약점
아파치는 httpd.conf 에 아래 라인 추가해 준다
ServerTokens Prod # (ProductOnly) 아파치 버젼 정보 안나타 나게 설정 , Apache 만 나타냄
ServerSignature off
TraceEnable Off
톰캣에서 오류를 일으켜 보면 아래와 같은 화면을 만날 수 있습니다.
위 화면에서는 Tomcat의 버젼이 표시 되어 있습니다.
따라서 해당 버젼의 보안 취약점을 이용해서 공격이 들어 올 수도 있겠죠 ^^;;
cd [톰캣 설치 위치]/lib/org/apache/catalina/util
vi ServerInfo.properties
열어 보시면 아래와 같이 되어 있을 겁니다.
Server.info=Apache Tomcat/톰캣 버젼
server.number=톰캣 버젼
server.built=빌드 날짜
아래와 비슷하게 수정하시면 됩니다.
server.info=Apache Tomcat
server.number=
server.built=
그리고, 저파일이 저위치에 없을 경우에는
cd [톰캣 설치 위치]/lib/
하시면
catalina.jar 파일이 있습니다.
이파일을 압축을 푸시면 해당 폴더가 생깁니다.
jar xf catalina.jar
그리고 압축을 해제한 jar 파일은 다른곳에 백업해 두십시오.
mv catalina.jar ../catalina.jar.bak
그리고 해당 위치에 가셔서 다시 저 작업을 수행한 후에
톰캣을 재실행하시면 됩니다.
그리고 다시 동일한 오류를 일으켜 보시면
위와 같이 보이시면 해결 된 것입니다. ^^;;
아래와 같이 리눅스 wget 명령어로 호출 하였습니다.
wget -S localhost:8080
--2019-11-11 10:44:00-- http://localhost:8080/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"24-1573008436000"
Last-Modified: Wed, 06 Nov 2019 02:47:16 GMT
Content-Type: text/html
Content-Length: 24
Date: Mon, 11 Nov 2019 01:44:00 GMT
Length: 24 [text/html]
Saving to: 'index.html.1'
Server: Apache-Coyote/1.1 는 서버 정보 노출 취약점이 있습니다.
아래와 같이 조치합니다.
해당 표시 부분은 conf/server.xml 부분에 server 속성을 추가 합니다.
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" useBodyEncodingForURI="true"
URIEncoding="UTF-8"
server="test" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" server="test" />
위 문서 처럼 Connector 태그를 찾아서 server="test" 라 써 주시면 됩니다.
변경전
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
변경후
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" server="test"/>
변경전 <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 변경후 <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" server="test" />
|
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
19 | Restore Database And Rename Database Files Example | 2019.03.26 | 77424 |
18 | HP-UX networking - 11.31 10G NIC | 2019.03.19 | 1233 |
17 | hpux cmsnmpd daemon 중지 | 2019.02.28 | 442 |
16 | 아파치 2.2.29 버젼에서 SSLProtocol 중 TLSv1.2로 설정 | 2019.02.27 | 4555 |
15 | usage: raspistill [options] - Image parameter commands | 2018.11.16 | 1342 |
14 | hpux cron job 실행 에러 처리 방안 | 2018.07.06 | 713 |
13 | Parameters for Web Server Plug-Ins | 2018.05.10 | 2520 |
12 | SUN 솔라리스 보안취약점 조치 방안 | 2018.03.05 | 769 |
11 | hpux ndd tuning | 2018.02.28 | 1040 |
10 | UNIX,Linux Command 비교 | 2018.02.27 | 2742 |
9 | hpux 소프트웨어 설치및 제거 | 2018.02.27 | 636 |
8 | HPUX Trust Mode | 2018.02.21 | 1427 |
7 | Linux 보안및 성능향상을 위한 sysctl.conf 설정 | 2018.02.20 | 4361 |
6 | HP-UX 보안가이드라인 | 2018.02.14 | 1137 |
5 | [리눅스] 다른 서버에 있는 파일 가져오기(SCP 이용) | 2018.01.25 | 588 |
4 | /etc/xinetd.conf 설정 값 | 2017.11.09 | 274 |
3 |
command
![]() | 2017.11.01 | 1546 |
2 |
어플리케이션 보안
![]() | 2017.11.01 | 243 |
1 |
윈도우용 wget
![]() | 2017.09.28 | 4271 |