Menu

#1 local file inclusion through cookie = remote cmd xctn

open
Stephen
9
2006-04-24
2006-04-18
Fr0zen
No

/*
tested software:
http://sourceforge.net/project/showfiles.php?group_id=71894

description: "Php-ZeroNet is a script comprised of php
allowing webmasters to start a online community.
Php-ZeroNet features Content Management, News posting,
User CP, interactive sytem, etc. Php-ZeroNet uses a
wide range of different cases in its script, it can adapt."

vulnerable code in function.php at lines 34-44:
...
if (isset($_COOKIE['specifiedlayout'])) {
//well it seems that the cookie to the layout that
the user wants to see exists so display it
$defaultlayout = $_COOKIE['specifiedlayout'];
$result = $DB->query ("SELECT SiteName FROM
preferences");
list($sitename) = $DB->getrow($result);
} else {
//well it doesnt seem to exist so get the normal
defaultlayout
$result = $DB->query ("SELECT
SiteName,defaultlayout FROM preferences");
list($sitename, $defaultlayout) = $DB->getrow($result);
}
require("themes/$defaultlayout/index.php");
...

if magic quotes off we can include local file through
$defaultlayout
which is set by COOKIE['specifiedlayout']

this can be exploited by web browser however here is my POC
*/

Discussion

  • Fr0zen

    Fr0zen - 2006-04-18

    POC exploit

     
  • Fr0zen

    Fr0zen - 2006-04-24
    • priority: 5 --> 9
    • assigned_to: nobody --> yeochins
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.