MAILTOP

Apache Struts2 원격 코드 실행 취약점 업데이트 권고 본문

카테고리 없음

Apache Struts2 원격 코드 실행 취약점 업데이트 권고

두 아이 아빠 2017. 7. 11. 10:10

□ 개요
 o Apache Struts에서 임의 코드 실행이 가능한 취약점이 발견 [1]
 o 취약한 버전을 사용 중인 서버의 담당자는 악성코드 감염 등의 위험이 있으므로 아래 해결 방안에 따른 조치 권고
 
 
□ 내용
 o 웹 애플리케이션 Showcase 내 ActionMessage.class에서 메시지를 처리할 때 특정 입력 값을 통해 원격 코드 실행이

    가능한 취약점(CVE-2017-9791)
 
 
□ 영향을 받는 제품 및 버전
 o Apache Struts 2.3.x 버전에서 Struts1 플러그인을 사용하는 경우
   ※ Apache Struts2는 Struts 1의 Action을 사용하기 위해 Struts1 플러그인 기본 제공
 
 
□ 해결 방안
 o 취약점에 영향을 받지 않는 버전으로 업데이트 수행
   - Apache Struts 2.5.10.1 버전 [2]
 o SaveGangsterAction.java에서 ActionMessage.class에 메시지를 전달할 때 값을 직접 전달하는 대신 리소스 키를 사용하도록

    소스코드 변경 후 컴파일
     ※ SaveGangsterAction.java 파일 경로 : showcase가 설치된 폴더 하위의 \src\org\apache\struts2\integration

         \SaveGangsterAction.java (설치 환경에 따라 경로 확인 필요)

 
기존 소스 코드messages.add("msg", new ActionMessage("Gangster " + gform.getName() + " was added"));
변경 소스 코드messages.add("msg", new ActionMessage("struts1.gangsterAdded", gform.getName()));
 
 o 보안규칙(2종) : 우회 취약경로(/struts2-showcase/integration/saveGangster.action)에 대한 추가 차단
    ※ 보안규칙은 각 기관 환경에 맞춰 검토 후 적용 필요
alert tcp any any -> any any (content:"/saveGangster.action"; nocase; content:"HTTP/1."; distance:0;)
alert tcp any any -> any any (content:"/struts2-showcase"; nocase; content:"HTTP/1."; distance:0;)
 
 
□ 기타 문의사항
 o 한국인터넷진흥원 인터넷침해대응센터: 국번없이 118
 
[참고사이트]
 [1] https://cwiki.apache.org/confluence/display/WW/S2-048
 [2] https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.10.1



출처: 인터넷보호나라

https://www.boho.or.kr/data/secNoticeView.do?bulletin_writing_sequence=26126