
CVE-2017-5638에 대한 익스플로잇 가능 대상
전적으로 https://github.com/piesecurity/apache-struts2-CVE-2017-5638 기반입니다.
프레임워크의 참조 프로젝트가 컨테이너에 배포되지만 끔찍한 결과를 초래하는 현실적인 시나리오입니다. 익숙해지려면 코드를 살펴보고 컴파일하세요. 또한 dockerfile을 조사해 보세요 - 우리의 주의를 끌 만한 특별한 것이 있나요?
일상적인 결정과 체인으로 연결된 여러 취약점이 얼마나 쉽게 악용될 수 있는지 보여줍니다.
전제 조건:
준비 방법:
./mvnw clean package를 실행합니다.docker build -t hackme \.를 실행합니다.docker run -d -p 9080:8080 hackme를 실행합니다.참고: Docker가 설치되어 있지 않으면 ./mvnw jetty:run을 실행할 수 있습니다.
RCE 테스트를 시작하려면 exploit.py 파일을 실행하세요:
python exploit.py http://localhost:9080/orders/3 "CMD"를 실행하세요.java -jar jython*.jar exploit.py http://localhost:9080/orders/3 "CMD"를 실행하세요.다음과 같은 다양한 CMD로 시도해 보세요:
pwd - 우리가 어디에 있나?whomai - 어떤 사용자로 실행 중인가?ls -la - 내 디렉터리에는 무엇이 있나?ls / - 내 머신은 무엇인가ls /etc - 그 밖에 무엇을 찾을 수 있나?Nexus Lifecycle의 구성 요소 정보 패널을 사용하여 취약하지 않은 struts2-core 버전을 식별하세요. POM을 해당 버전으로 업데이트하고 다시 빌드하세요. Docker 이미지를 다시 빌드하고 실행하여 공격을 재시도할 수도 있습니다.
또한 여기의 Issues에서 DepShield 결과를 확인하세요.
https://github.com/apache/struts/tree/master/apps/rest-showcase
README.txt - Rest Showcase Webapp
Rest Showcase is a simple example of REST app build with the REST plugin.
For more on getting started with Struts, see
* http://cwiki.apache.org/WW/home.html
I18N:
=====
Please note that this project was created with the assumption that it will be run
in an environment where the default locale is set to English. This means that
the default messages defined in package.properties are in English. If the default
locale for your server is different, then rename package.properties to package_en.properties
and create a new package.properties with proper values for your default locale.