
Apache Struts 2 RCE CVE-2023-50164용 취약한 Docker 컨테이너
Apache는 최근 Apache Struts 2에 영향을 미치는 심각도 9.8의 치명적인 취약점인 CVE-2023-50164에 관한 권고를 발표했습니다.
CVE-2023-50164는 조직의 Apache Struts 아키텍처와 파일 업로드 기능을 사용하는 방식과 복잡하게 연관되어 있으며, 인증되지 않은 경로 탐색을 가능하게 하여 악성 파일을 업로드하고 원격 코드 실행(RCE)을 수행하는 데 악용될 수 있습니다.
이 저장소에는 취약점을 이해하고 조작하기 위한 Dockerfile이 포함되어 있습니다. 무기화된 익스플로잇 코드는 제공되지 않습니다.
아래는 실습 환경을 실행하는 명령어입니다(셸에 복사/붙여넣기 할 수 있습니다):
git clone https://github.com/Trackflaw/CVE-2023-50164-ApacheStruts2-Docker.git
cd CVE-2023-50164-ApacheStruts2-Docker
docker build --ulimit nofile=122880:122880 -m 3G -t cve-2023-50164 .
docker run -p 8080:8080 --ulimit nofile=122880:122880 -m 3G --rm -it --name cve-2023-50164 cve-2023-50164
curl http://localhost:8080/upload.action
CUrl로 앱 가용성을 확인합니다.
curl http://localhost:8080/upload.action
<html>
<head>
<title>File upload</title>
</head>
<body>
<h1>💣 CVE-2023-50164</h1>
<p>Welcome to CVE-2023-50164 lab. You can practice with the file upload feature below. Find a way yo bypass the filter 😉</p>
<form id="upload" name="upload" action="/upload.action" method="post" enctype="multipart/form-data">
<table class="wwFormTable">
<tr>
<td class="tdLabel"></td>
<td class="tdInput"><input type="file" name="upload" id="upload_upload" /></td>
</tr>
<tr>
<td colspan="2">
<div class="formButton"><input type="submit" value="Submit" id="upload_0" />
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
즐거운 해킹 되세요! 😉

이 프로젝트는 Jakabakos의 작업에서 많은 영감을 받았습니다.
아래는 취약점을 이해하기 위한 문서 목록입니다: