https://krcert.or.kr/data/secNoticeView.do?bulletin_writing_sequence=66592 

 

KISA 인터넷 보호나라&KrCERT

KISA 인터넷 보호나라&KrCERT

www.boho.or.kr

 

위 링크의 krcert 에서 퍼왔습니다.

 

Spring Java 프레임워크 보안 업데이트 권고 2022.03.31
□ 개요
o Spring 보안팀에서 Spring 프레임워크 및 Spring Cloud Function 관련 원격코드 실행 취약점을 해결한 임시조치 방안 및 보안업데이트 권고
o 공격자는 해당 취약점을 이용하여 정상 서비스에 피해를 발생시킬 수 있으므로, 최신 버전으로 업데이트 권고
 
□ 주요 내용
o Spring Core에서 발생하는 원격코드실행 취약점(Spring4Shell 취약점)[1]
o Spring Cloud Function에서 발생하는 원격코드실행 취약점 (CVE-2022-22963)[2]
 
□ 영향을 받는 버전
o Spring4Shell
- 1) JDK 9 이상의 2) Spring 프레임워크 사용하는 경우
※ JDK 8 이하의 경우 취약점의 영향을 받지 않음

o CVE-2022-22963
- Spring Cloud Function 3.1.6 ~ 3.2.2 버전
※ 취약점이 해결된 버전 제외(3.1.7, 3.2.3 업데이트 버전 제외)
 
□ Spring4Shell 버전 확인 방법
o JDK 버전 확인
- “java -version” 명령 입력

o Spring 프레임워크 사용 유무 확인
- 프로젝트가 jar, war 패키지로 돼 있는 경우 zip 확장자로 변경하여 압축풀기
이후 아래와 같이 “spring-beans-.jar”, “spring.jar”, “CachedIntrospectionResuLts.class” 로 검색

find . -name spring-beans*.jar
  
□ 대응방안
o (Spring4Shell)
- 프로젝트 패키지 아래 해당 전역 클래스 생성 후 재컴파일(테스트 필요)※ 보안 업데이트가 공지될 경우 업로드 예정

import org.springwork.core.Ordered;
import org.springwork.core.annotation.Order;
import org.springwork.web.bind.WebDataBinder;
import org.springwork.web.bind.annotation.ControllerAdvice;
import org.springwork.web.bind.annotation.InitBinder;
 
@ControllerAdvice
@Order(10000)
public class BinderControllerAdvice {
@InitBinder
public setAllowedFields(WebDataBinder dataBinder) {
String[] denylist = new String[]{"class.*", "Class.*", "*.class.*", "*.Class.*"};
dataBinder.setDisallowedFields(denylist);
}
}

 
o CVE-2022-22963
- 제조사 홈페이지를 통해 최신버전으로 업데이트 적용
· Spring Cloud Function 3.1.7, 3.2.3 버전으로 업데이트[3]
 
□ 기타 문의사항
o 한국인터넷진흥원 사이버민원센터: 국번없이 118
 
참고사이트
[1] 취약점 정보: https://www.rapid7.com/blog/post/2022/03/30/spring4shell-zero-day-vulnerability-in-spring-framework/
[2] 취약점 정보: https://tanzu.vmware.com/security/cve-2022-22963
[3] 신규버전 다운로드: https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-function-context/3.1.7/

 
□ 작성 : 침해사고분석단 취약점분석팀

 

'etc' 카테고리의 다른 글

Gradle 빌드 시, Could not target platform: Java ... 에러  (0) 2022.03.23
Create dot files/directories on Windows  (0) 2018.07.04

 

Gradle build 시에 "Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)' 에러가 발생했다.

Execution failed for task ':compileJava'.
> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.

 

Java 11 도 깔려있고, Module 설정에서도 11 이고, 될 것 같은데 안되서 뭐지?뭐지? 했는데

이거 보고 해결했다!

 

https://twofootdog.tistory.com/57

 

IntelliJ "Could not target platform" 에러 해결방법

IntelliJ에서 스프링부트로 개발할 때(빌드툴은 Gradle) 이전 프로젝트는 JDK 8버전을 쓰다가 새로운 프로젝트에서 JDK 11버전으로 올려서 Gradle Build를 수행하니 CompileJava 명령어 수행 중 처음보는 에러

twofootdog.tistory.com

 

 

방법은 Settings > Build, Execution, Deployment > Build Tool > Gradle 에서

Gradle JVM 을 11로 설정해주는 것!

 

위에 해결방법 알려주신분께 감사드립니다 :)

'etc' 카테고리의 다른 글

Spring Java 프레임워크 보안 업데이트 권고  (0) 2022.03.31
Create dot files/directories on Windows  (0) 2018.07.04

 

Java 9 이하에서는 변수를 정의할 때 타입을 명시적으로 선언해야 했었다.



Java 10 에서는 var 키워드를 사용해서 타입 선언 없이 변수를 선언할 수 있다.



premitive type 뿐만 아니라 ArrayList<String> 타입도 var 키워드로 선언할 수 있다.



하지만 컴파일 에러가 발생하는 경우도 있다.

 

 

 

Java 10 Local Variable Type Inference

https://developer.oracle.com/java/jdk-10-local-variable-type-inference.html

 

Java 10 Local Variable Type Inference

Java 10 introduced a new shiny language feature called local variable type inference. Sounds fancy! What is it? Let’s work through two situations where Java makes things a little difficult for us as a Java developer. Context: Boilerplate and code readabi

developer.oracle.com

 

JEP 286: Local-Variable Type Inference

http://openjdk.java.net/jeps/286

 

JEP 286: Local-Variable Type Inference

JEP 286: Local-Variable Type Inference Summary Enhance the Java Language to extend type inference to declarations of local variables with initializers. Goals We seek to improve the developer experience by reducing the ceremony associated with writing Java

openjdk.java.net

 

 

 

 


https://gist.github.com/ozh/4131243

Baekjoon Online Judge

https://www.acmicpc.net/

+ Recent posts