Exploit-DB #26496
Description: eFile Wifi Transfer Manager 1.0 - Multiple Vulnerabilities
Type: webapps
Platform: hardware
Date: 2013-06-30
Author: Vulnerability-Lab

Exploit:
Title:
======
eFile Wifi Transfer Manager 1.0 iOS - Multiple Vulnerabilities


Date:
=====
2013-06-24


References:
===========
http://www.vulnerability-lab.com/get_content.php?id=982


VL-ID:
=====
982


Common Vulnerability Scoring System:
====================================
6.8


Introduction:
=============
eFile is the File Manager for ios device. You can use your device as a Wi-Fi flash disk. You can connect to iPhone 
from a Mac, Windows, or Linux computer (on the same Wi-Fi network). No special software required on your computer. 
You can transfer mp3 files via bluetooth, Wi-Fi or iTunes. Support most of the document formats. Folder Password 
Protected: Provide password protection for each folder Http Pasword Protected: Provide Password protection for Http 
file transfer. File Operations: New Folder, delete, move, copy, email, share with bluetooth or Wi-Fi, zip,unzip ...

File sharing with other ios devices via Bluetooth or Wi-Fi
File upload via your PC/Mac/Linux web browser or USB via iTunes.
Provide download email attachments
Provide download Safari browser attachments
Save and Get images to and from Photos
iWork (Pages, Numbers, Keynote)
Microsoft Office (Word, Excel, PowerPoint)
PDF, RTF, RTFD, TXT
MP3, MP4, MOV, MPV, M4V
JPG, PNG, GIF, BMP, TIF, TIFF, ICO
ZIP,RAR
TXT,C,CPP,H,M

(Copy of the Homepage: https://itunes.apple.com/de/app/efile-lite-file-sharing-file/id606822182 )


Abstract:
=========
The Vulnerability Laboratory Research Team discovered multiple vulnerabilities in the eFile Wifi Manager v1.0 iOS mobile application.


Report-Timeline:
================
2013-06-24:	Public Disclosure


Status:
========
Published


Exploitation-Technique:
=======================
Remote


Severity:
=========
Critical


Details:
========
1.1
A local file include and an arbitrary file upload web vulnerability via POST request method is detected in the eFile Wifi Manager v1.0 
iOS mobile application for the apple ipad & iphone. The vulnerability allows remote attackers via POST method to inject local app webserver 
folders to request unauthorized local webserver files.

The vulnerbility is located in the upload file module of the webserver (http://localhost/x) when processing to request a manipulated 
filename via POST. The execution of the injected path or file request will occur when the attacker is processing to reload to index listing 
of the affected module after the file include attack via upload. Remote attackers can exchange the filename with a tripple extension to bypass 
the filter and execute the files from the little webserver of the application.

Exploitation of the vulnerability requires no user interaction and also without application user account (no password standard).
Successful exploitation of the vulnerability results in unauthorized path or file access via local file include or arbitrary file upload.

Vulnerable Application(s):
				[+] eFile v1.0 - ITunes or AppStore (Apple)

Vulnerable Module(s):
				[+] File Upload  (Web Server) [Remote]

Vulnerable Parameter(s):
				[+] filename
				[+] file extensions

Affected Module(s):
				[+] eFile Index Listing


1.2
A persistent input validation vulnerability is detected in the eFile Wifi Manager v1.0 iOS mobile application for the apple ipad & iphone.
The bug allows an attacker (remote) to implement/inject malicious script code on the application side (persistent) of the app web service. 

The vulnerability is located in the index file dir listing module of the webserver (http://localhost/foldername) when processing to display
via POST request method injected manipulated `foldernames`. The persistent script code will be executed in the main index file dir 
listing module when the service is processing to list the new malicious injected foldername as item.

Exploitation of the persistent web vulnerability requires low or medium user interaction without application user account.
Successful exploitation of the vulnerability can lead to persistent session hijacking (customers), account steal via persistent web 
attacks, persistent phishing or stable (persistent) certificate mail notification context manipulation.

Vulnerable Application(s):
				[+] eFile v1.0 - ITunes or AppStore (Apple)

Vulnerable Module(s):
				[+] Add or Edit Foldername

Vulnerable Parameter(s):
				[+] foldername

Affected Module(s):
				[+] eFile Index Listing


Proof of Concept:
=================
1.1
The arbitrary file upload vulnerability and restriction bypass can be exploited by remote attackers without privilege application user account 
and also without required user interaction. For demonstration or reproduce ...


File Upload ...

Host=localhost:8080
User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.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
X-Requested-With=XMLHttpRequest
X-File-Name=1234.png.txt.iso.php.gif
Content-Type=application/octet-stream
Referer=http://localhost:8080/
Content-Length=98139
POSTDATA =?PNG[X]


+ double extensions

http://localhost:8080/[PATH NAME (x) VALUE].png.txt.iso.php


// return false to cancel submit
onSubmit: function(id, fileName){},
onProgress: function(id, fileName, loaded, total){},
onComplete: function(id, fileName, responseJSON){},
onCancel: function(id, fileName){},
// messages                
    
messages: {
typeError: "{file} has invalid extension. Only {extensions} are allowed.",
sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
emptyError: "{file} is empty, please select files again without it.",
onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."},
...   ...
// added to list item w