DM-FileManager 3.9.6 Cookie Injection and Authorization Bypass Vulnerability

The nDarkness community has recently been working with the wonderful developers over at DutchMonkey.com to review and point out security flaws in some of their freely available software.

During this review process, there were several issues found and we will be posting them in the coming weeks for educational purposes. It is our hope that this information will be used to help others write more secure code and realize the dangers involved with these mistakes.

The first major issue we found was with DM-Albums version 2.0. After reviewing this software and helping to add greater support for WPMU installations, we moved on to DM-FileManager version 3.9.6. The fist major issue we found with this software prompted us to take a deeper look at the authorization model used by this file manager software. Below is the vulnerable code and the method used to exploit it. Please be aware that this has since been fixed and is no longer vulnerable.

I discovered that cookie variables were being used to determine a users ability to access certain features of the software. The cookies I found that mattered were:

GROUP=ADMINISTRATORS; GROUPID=1;

The group id cookie gives you the admin.php button (footer.php, line 49) – Not necessary but it was a start.

if($GROUPID == 1)
{
	print(" <a href=\"admin.php\" class=\"admin\"><img src=\"ui/$USERINTERFACE/png/admin.png\" border=\"0\" height=\"15\"/></a> ");
}

Being in the administrator group (admin.php, line 116) lets you use the admin.php page.

if($GROUP != "ADMINISTRATORS") redirect("/?currdir=$currdir");

To exploit this we used javascript injection. From the log in page I entered the following in the address bar and reloaded the page:

javascript:void(document.cookie="GROUP=ADMINISTRATORS");void(document.cookie="GROUPID=1");

When the page reloaded, the admin button was in the footer of the page and it allowed me to use the admin.php page. Once in the admin interface you have full control of the file manager software and can for example, change the admins email address to yours and use the forgot password feature to receive the admins unencrypted password (more on this issue in future posts).

All DM-FileManager users are strongly encouraged to upgrade their software to the latest version.

Tags: , , , , ,

One Response to “DM-FileManager 3.9.6 Cookie Injection and Authorization Bypass Vulnerability”

  1. Frank December 23, 2009 at 3:02 pm #

    Thanks for the great post. This vulnerability has been closed and a patched version is available at http://www.dutchmonkey.com/.

Leave a Reply

*