Linux Security
    Linux Security
    Linux Security

    PHP-Nuke & Post-Nuke Account Hijacking

    Date
    10578
    Posted By
    To exploit this vulnerability one must create an account into the target site, base64_decode his cookie,modify the username in the cookie to inject SQL,base64_encode his cookie and pass it with save=1 to article.php (which must be done throught modules.php). . .
    To exploit this vulnerability one must create an account into the target site, base64_decode his cookie,modify the username in the cookie to inject SQL,base64_encode his cookie and pass it with save=1 to article.php (which must be done throught modules.php)
     Date: Sun, 17 Mar 2002 23:56:57 +0800 From: Handle Nopman  To: [email protected] Subject: PHP-Nuke & Post-Nuke account hijacking.  Hi all BugTraq readers!  I've found a bug in PHP-Nuke and Post-Nuke that allows one to hijack other accounts.  Code in modules/News/article.php: if ($save AND is_user($user)) {     cookiedecode($user);     sql_query("update ".$user_prefix."_users set umode='$mode',  uorder='$order', thold='$thold' where uid='$cookie[0]'", $dbi);     getusrinfo($user);     $info = base64_encode("$userinfo[uid]:$userinfo[uname]:$userinfo[pass]: $userinfo[storynum]:$userinfo[umode]:$userinfo[uorder]:$userinfo[thold]: $userinfo[noscore]");     setcookie("user","$info",time()+$cookieusrtime); }  This code snippet cheks if user is logged in and allows he to change his mode,order and thold, then the code sends the cookie back with modified data.  There is a bug. Code checks if user is logged in by is_user, but it uses getusrinfo to send the data back. Function is_user verifies the cookie by checking that UID and password match, but getusrinfo gets the data by using USERNAME and password and the getusrinfo uses insecure SQL call.  So by specifying valid UID and PASSWORD combination one can get round the is_user check and his username is passed without any verification to insecure SQL call. By specifying specially crafted username one can fool the SQL call to return another users data.  To exploit this vulnerability one must create an account into the target site, base64_decode his cookie,modify the username in the cookie to inject SQL,base64_encode his cookie and pass it with save=1 to article.php (which must be done throught modules.php)  Post-Nuke is vulnerable to this too.  Vendor Status I contacted Francisco Burzi over 2 weeks ago and he did not reply. I delayed the relase because I found out that Post-Nuke has this bug too. I contacted authors of Post-Nuke and they replyed almost immediatly and a fixed version is now available.  Post-Nuke users should upgrade to the most recent version.  Best Regards, "NopMan" --   Powered by Outblaze 

    Advisories

    LinuxSecurity Poll

    How are you contributing to Open Source?

    No answer selected. Please try again.
    Please select either existing option or enter your own, however not both.
    Please select minimum 0 answer(s) and maximum 4 answer(s).
    /main-polls/37-how-are-you-contributing-to-open-source?task=poll.vote&format=json
    37
    radio
    [{"id":"127","title":"I'm involved with the development of an open-source project(s).","votes":"1","type":"x","order":"1","pct":100,"resources":[]},{"id":"128","title":"I've reported vulnerabilities I've discovered in open-source code.","votes":"0","type":"x","order":"2","pct":0,"resources":[]},{"id":"129","title":"I've provided developers with feedback on their projects.","votes":"0","type":"x","order":"3","pct":0,"resources":[]},{"id":"130","title":"I've helped another community member get started contributing to Open Source.","votes":"0","type":"x","order":"4","pct":0,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350


    VIEW MORE POLLS

    bottom 200

    Please enable / Bitte aktiviere JavaScript!
    Veuillez activer / Por favor activa el Javascript![ ? ]

    We use cookies to provide and improve our services. By using our site, you consent to our Cookie Policy.