WiFiles HD 1.3 iOS - Local File Inclusion








Document Title:
WiFiles HD v1.3 iOS - File Include Web Vulnerability

References (Source):

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

Product & Service Introduction:
WiFiles HD for iPad is an easy to use file storage/sharing app. Transfer files using wifi or iTunes File Transfer to & from your Mac/PC with ease.
Updated- transfer files in background now supported. Store movies, photos, music, and any other file you wish. In app filesharing supports opening 
files in supporting third party apps.

( Copy of the Homepage: https://itunes.apple.com/us/app/wifiles-hd/id436227200 )

Abstract Advisory Information:
The Vulnerability Laboratory Research team discovered a local file include web vulnerability in the official Mr Burns - WiFiles HD v1.4 iOS mobile web-application. 

Vulnerability Disclosure Timeline:
2014-02-22:	Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Affected Product(s):
Apple AppStore
Product: WiFiles HD - iOS Web Server & Web Application 1.3

Exploitation Technique:

Severity Level:

Technical Details & Description:
A local file include vulnerability has been discovered in the official WiFiles HD v1.4 iOS mobile web-application. 
The local file include web vulnerability allows remote attackers to unauthorized include local file/path requests 
or system specific path commands to compromise the web-application/device.

The vulnerability is located in the upload module of the mobile web-application interface. Remote attackers can 
manipulate the `upload > submit` POST method request with the vulnerable `filename` value to compromise the application 
or connected device components. 

The issue allows remote attackers to include local app path values or wifi web-server files. The exploitation appears 
on the application-side and the inject request method is POST. The exection occurs in the main index file dir list. 
The security risk of the local file include web vulnerability is estimated as high(+) with a cvss (common vulnerability 
scoring system) count of 7.0(+)|(-)7.1.

Exploitation of the local file include vulnerability requires no user interaction or privileged mobile application user account. 
Successful exploitation of the file include web vulnerability results in mobile application compromise, connected device compromise 
or web-server compromise.

Request Method(s):
				[+] POST

Vulnerable Module(s):
				[+] Upload

Vulnerable Procedure(s):
				[+] Submit

Vulnerable Parameter(s):
				[+] filename

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

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

PoC: Exploit - filename

<html><head><title>Files from WiFiles HD</title><style>html {background-color:#000000} body 
{ background-color:#96969b; font-family:Tahoma,Arial,Helvetica,sans-serif; font-size:18x; margin-left:15%; 
margin-right:15%; border:3px groove #006600; padding:15px; } </style></head><body><h1> WiFiles HD:</h1>
<bq>Please do not leave this page until transfers are complete.
Refresh the page before attempting to transfer files if you close the server in WiFiles HD.
</bq><p style="color:white"><a href="137.png">137.png</a>		
(   279.0 Kb, 2014-02-22 14:04:01 +0000)<br>
<a href="e4c167621c2e61.jpg">e4c167621c2e61.jpg</a>		
(    23.8 Kb, 2014-02-22 14:04:10 +0000)<br>
<a href="<iframe src=a>"><./<[LOCAL FILE INCLUDE VULNERABILITY!]>"></a>		
(    23.8 Kb, 2014-02-22 14:09:20 +0000)<br />
</p><form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"><label><input type="file" name="file" id="file" /></label>
<label><input type="submit" name="button" id="button" value="Submit" /></label></form></body></html></iframe></a></p></body></html>

--- PoC Session Logs [POST] ---

04:02:59.326[191ms][total 1633ms] Status: 200[OK]
POST http://localhost:8080/ Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Gr��e des Inhalts[1056] Mime Type[application/x-unknown-content-type]
   Request Header:
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0]
      Accept-Encoding[gzip, deflate]
Content-Disposition: form-data; name="file"; filename="./<[LOCAL FILE INCLUDE VULNERABILITY!]>"
Content-Type: image/jpeg

Solution - Fix & Patch:
The vulnerability can be patched by a secure encode, parse and restriction of the vulnerable filename value in the upload POST method request.

Security Risk:
The security risk of the local file include web vulnerability is estimated as high.

Credits & Authors:
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [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:    admin@vulnerability-lab.com 	- research@vulnerability-lab.com 	       - admin@evolution-sec.com
Section:    www.vulnerability-lab.com/dev 	- forum.vulnerability-db.com 		       - magazine.vulnerability-db.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, 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 (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.

				Copyright � 2014 | Vulnerability Laboratory [Evolution Security]

DOMAIN: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com