Exploit-DB #32620
Description: Vanctech File Commander 1.1 iOS - Multiple Vulnerabilities
Type: webapps
Platform: ios
Date: 2014-03-31
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
Vanctech File Commander 1.1 iOS - Multiple Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1235


Release Date:
=============
2014-03-28


Vulnerability Laboratory ID (VL-ID):
====================================
1235


Common Vulnerability Scoring System:
====================================
7.3


Product & Service Introduction:
===============================
This is an app which can change the way you use your iphone/itouch. With this app , when you try to read a document or listen to music 
or even you want to watch some video,You don`t have to change the apps round by round.You can deal with them in one app with simple operation.
And we can even provide the wifi share, you can share the files whatever you like with you friends or your PC/MAC. And of course you can send 
the files in your PC/MAC to your iphone/itouch. You can enjoy your files without change pages anywhere anytime you want.

(Copy of the Homepage: https://itunes.apple.com/de/app/file-commander/id484450911 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple high severity vulnerabilities in the official Vanctech File Commander v1.1 iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2014-03-28:	Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Shanghai Fan Cheng Software Ltd
Product: File Commander - iOS Mobile Web Application 1.1


Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
1.1
A local file include web vulnerability has been discovered  in the official Vanctech File Commander v1.1 iOS mobile web-application.
A file include web vulnerability allows remote attackers to unauthorized include local file/path requests or system specific path commands 
to compromise the web-application or mobile device.

The web vulnerability is located in the `filename` value of the `upload` module POST methdo request. Remote attackers are able to inject own 
files with a malicious `filename` value in the upload POST method request to compromise the mobile web-application. The attack vector is on 
the application-side and the request method to inject is POST. The local file/path include execution occcurs in the index file commander 
dir listing. The security risk of the local file include web vulnerability is estimated as high(+) with a cvss (common vulnerability scoring 
system) count of 7.4(+)|(-)7.5.

Exploitation of the local file include web vulnerability requires no user interaction or a privileged mobile web-application user account. 
Successful exploitation of the local file include web vulnerability results in mobile application or connected device component compromise.

Request Method(s):
				[+] [POST]

Vulnerable Module(s):
				[+] Select File > Upload

Vulnerable Parameter(s):
				[+] filename

Affected Module(s):
				[+] Index File Dir List (http://localhost:8080/)



1.2
An arbitrary file upload web vulnerability has been discovered  in the official Vanctech File Commander v1.1 iOS mobile web-application.
The arbitrary file upload issue allows remote attackers to upload files with multiple extensions to bypass the web-server or system validation.

The vulnerability is located in the `select file` function of the upload resource module. Remote attackers are able to upload a php or js web-shells 
by renaming the file with multiple extensions to bypass the file restriction mechanism. The attacker uploads for example a web-shell with the following 
name and extension `ptest.png.html.php.js.aspx.png`. After the upload the attacker needs to open the file with the path value in the web application. 
He deletes the .png file extension and can access the application with elevated executable access rights. The attack vector is on the application-side 
of the vulnerable wifi interface service and the request method is POST. To access the file the attacker needs to request the public `./Download` path.

There are two ways to include local files. The first is to sync with a local user account at the affected device with the vulnerable software. The second 
possibility is to access the wifi interface and upload (remote) the files in the local or public network. The security risk of the arbitrary file upload 
web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 7.1(+)|(-)7.2.

Exploitation of the arbitrary file upload web vulnerability requires no user interaction or privileged 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):
				[+] Select File > Upload

Vulnerable Parameter(s):
				[+] filename (multiple extensions)

Affected Module(s):
				[+] Downloads File Dir (http://localhost:8080/files?x)



Proof of Concept (PoC):
=======================
1.1
The local file include web vulnerability can be exploited by local attackers without privileged web-application user account or user interaction.
For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue.

PoC: 
http://localhost:8080/files?./[LOCAL FILE INCLUDE VULNERABILITY!]
http://localhost:8080/files/[UPLOAD PATH VALUE]/[LOCAL FILE INCLUDE VULNERABILITY!]

--- PoC Session Logs [POST] ---
12:01:20.676[96ms][total 96ms] Status: 302[Found]
POST http://localhost:8080/files Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Gr��e des I