Exploit-DB #30031
Description: Imagam iFiles 1.16.0 iOS - Multiple Web Vulnerabilities
Type: webapps
Platform: ios
Date: 2013-12-04
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
Imagam iFiles v1.16.0 iOS - Multiple Web Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1160


Release Date:
=============
2013-12-03


Vulnerability Laboratory ID (VL-ID):
====================================
1160


Common Vulnerability Scoring System:
====================================
8.9


Product & Service Introduction:
===============================
iFiles is the most intuitive file manager for iOS with features like connectivity to many file cloud services, 
transferring files between computer or cloud services, ability to view many file formats (PDF viewer now 
supports annotations, search and more), voice recorder, web downloader, text file editor and more.

Supported Online Cloud Services and Protocols: Dropbox, Google Drive, iCloud, Box.net, SkyDrive, SugarSync, AFP 
(Mac Shares), FTP/FTPS, SFTP, Flickr, Picasa, Facebook, Rackspace CloudFiles, CloudApp, PogoPlug, WebDav, Amazon 
S3, Ubuntu One Files, ownCloud, 4Shared, also using Amazon S3: DreamObjects and UltiCloud.

( Copy of the Homepage: https://itunes.apple.com/de/app/ifiles/id336683524 & http://imagam.com )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple vulnerabilities in the official Imagam iFiles v1.16.0 mobile application for apple iOS.


Vulnerability Disclosure Timeline:
==================================
2013-12-03:    Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Imagam
Product: iFiles - Mobile Application iOS 1.16.0


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Critical


Technical Details & Description:
================================
1.1
A file include- & arbitrary file upload web vulnerability has been discovered in the official Imagam iFiles v1.16.0 mobile application for apple iOS.
An arbitrary file upload issue allows a remote attacker to upload files with multiple extensions to bypass the validation for unauthorized access.
A file include web vulnerability allows a remote attacker to unauthorized include local web-server file requests or external file requests. 

The vulnerability is located in the vulnerable file- and folder-name value. Remote attackers can include local file requests combined with script code 
to successful exploit the issue. To include to the vulnerable foldername value it is required to manipulate the `create folder` (add) input (POST Method).
The secound possibility to inject is the vulnerable filename value of the misconfigured (POST Method) upload module. After the include the remote attacker 
can access the included file by requesting the regular index or sub category folder (web interface) site.

The arbitrary file upload vulnerability is located in the vulnerable filename value of the upload module. Attackers are also able to upload a php or js 
web-shells by renaming the file with multiple extensions. The attacker uploads for example a web-shell with the following name and extension 
test.jpg.html.js.php.gif.jpg . After the upload the attacker opens the file in the web application to delete the .gif.jpg file extension to access the 
resource with elevated execution access rights.

Exploitation of the file include & arbitrary file upload web vulnerability requires no user interaction or privilege application user account with password.
Successful exploitation of the vulnerability results in unauthorized file access because of a compromise after the upload of web-shells.

Request Method(s):
				[+] [POST]

Vulnerable Module(s):
				[+] File Upload

Vulnerable Parameter(s):
				[+] filename (value) - (multiple extensions)
				[+] foldername

Affected Module(s):
				[+] File & Folder Dir Listing (http://localhost:8080)



1.2
2 local command/path injection web vulnerabilities has been discovered in the official Imagam iFiles v1.16.0 mobile application for apple iOS.
The remote web vulnerability allows to inject local commands via vulnerable system values to compromise the apple mobile iOS application.

The vulnerability is located in the in the device name value of the file dir und sub category listing module. Local attackers are able to inject 
own malicious system specific commands or path values requests as the iOS device name. The execute of the injected script code occurs in two 
different section with persistent attack vector. The first section is the wifi app web-interface index file/folder dir listing. The secound 
execute occurs in the file/folder sub category listing. The security risk of the local command/path inject vulnerability is estimated as high(-) 
with a cvss (common vulnerability scoring system) count of 6.2(+)|(-)6.3.

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 execute of system specific commands or unauthorized path requests.


Request Method(s):
				[+] POST to GET

Vulnerable Parameter(s):
				[+] devicename

Affected Module(s):
				[+] Index- File Dir Listing
				[+] Sub Folder/Category - File Dir Listing


Proof of Concept (PoC):
=======================
1.1
The file include and arbitrary file upload web vulnerability can be exploited by remote attackers without privileged web application 
user account and also without user interaction. For security demonstration or to reproduce the vulnerability follow the provided 
information and steps below.

PoC: foldername

<div id="headerHighlight">
		<div id="header">
		
			<div class="logo">
<img src="_device%20folder&path-issue-1_files/icon57.png" alt="icon57" height="57" width="57">
				<h1>