Exploit-DB #27376
Description: FTP OnConnect 1.4.11 iOS - Multiple Vulnerabilities
Type: webapps
Platform: ios
Date: 2013-08-07
Author: Vulnerability-Lab

Exploit:
Title:
======
FTP OnConnect v1.4.11 iOS - Multiple Web Vulnerabilities


Date:
=====
2013-08-04


References:
===========
http://www.vulnerability-lab.com/get_content.php?id=1041


VL-ID:
=====
1041


Common Vulnerability Scoring System:
====================================
8.6


Introduction:
=============
Simultaneous connections, and directory caching improves the work efficiency and save your time. Transmission Manager feature 
is easier and more efficient transmission to be managed. Supports FTP / SFTP / FTPS (Explicit FTP over TLS, Implicit FTP over 
TLS) connection. SFTP Private key authentication. name/password authentication is also supported.

( Copy of the Homepage: https://itunes.apple.com/us/app/ftp-onconnect-free-ftp-sftp/id594722236 )


Abstract:
=========
The Vulnerability Laboratory Research Team discovered a command/path inject vulnerability in the FTP OnConnect v1.4.11 application (Apple iOS - iPad & iPhone).


Report-Timeline:
================
2013-08-04:    Public Disclosure (Vulnerability Laboratory)


Status:
========
Published


Affected Products:
==================
Apple AppStore
Product: FTP OnConnect - Mobile Application 1.4.11


Exploitation-Technique:
=======================
Remote


Severity:
=========
Critical


Details:
========
1.1
A file include web vulnerability is detected in the FTP OnConnect v1.4.11 mobile application (Apple iOS - iPad & iPhone).
The file include vulnerability allows remote attackers to include (upload) local file or path requests to compromise the application or service.

The vulnerability is located in the upload module when processing to upload files with manipulated filenames in the POST method request & header. 
The attacker can inject local path or files to request context and compromise the mobile device or ftp service. The validation has a bad side 
effect which impacts the risk to combine the attack with persistent injected script code.

Exploitation of the local file include web vulnerability requires no user interaction or privilege application user account with password. 
Successful exploitation of the vulnerability results in unauthorized local file and path requests to compromise the device or application.

Vulnerable Application(s):
				[+] FTP OnConnect v1.4.11 - ITunes or AppStore (Apple)

Vulnerable Module(s):
				[+] Upload (Files) - (http://localhost:50000)

Vulnerable Parameter(s):
				[+] filename 

Affected Module(s):
				[+] Index File Dir Listing



1.2
An arbitrary file upload web vulnerability is detected in the FTP OnConnect v1.4.11 mobile application (Apple iOS - iPad & iPhone).
The arbitrary file upload issue allows a remote attacker to upload files with multiple extensions to bypass the validation for unauthorized access.

The vulnerability is located in the upload module when processing to upload files with multiple ending extensions. Attackers are 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 image.jpg.js.php.jpg . At the end the attacker deletes in the request after the upload the jpg to access unauthorized the malicious 
file (web-shell) to compromise the web-server or mobile device.

Exploitation of the 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.

Vulnerable Application(s):
				[+] FTP OnConnect v1.4.11 - ITunes or AppStore (Apple)

Vulnerable Module(s):
				[+] Upload (Files) - (http://localhost:50000)

Vulnerable Parameter(s):
				[+] filename (multiple extensions)

Affected Module(s):
				[+] Index File Dir Listing



1.3
A persistent input validation web vulnerability is detected  in the Private Photos v1.0 application (Apple iOS - iPad & iPhone).
The bug allows an attacker (remote) to implement/inject malicious own malicious persistent script codes (application side).

The vulnerability is located in the add `New Folder` module of the web-server (http://localhost:50000) application when processing to 
inject via POST method request manipulated `folder-names`. The folder name will be changed to the path value without secure filter, 
encoding or parse mechanism. The injected script code will be executed in the path listing context and of course also in the index 
file dir listing of the mobile ftp web application interface.

Exploitation of the persistent web vulnerability requires low user interaction and a local low privilege mobile application account 
with a password. Successful exploitation of the vulnerability can lead to persistent session hijacking (customers), account steal 
via persistent web attacks, persistent phishing or persistent module context manipulation.

Vulnerable Application(s):
				[+] FTP OnConnect v1.4.11 - ITunes or AppStore (Apple)

Vulnerable Module(s):
				[+] New Folder - (http://localhost:50000/?dir=)

Vulnerable Parameter(s):
				[+] foldername

Affected Module(s):
				[+] Index File Dir Listing
				[+] Path/Folder Listing


Proof of Concept:
=================
1.1
The local file include web vulnerability can be exploited by remote attackers without privilege application user account and 
also without user interaction. For demonstration or reproduce ...


PoC: 
<tr class="shadow"><td><a href="/download.html?dir=%2F&name=[LOCAL FILE/PATH INCLUDE VULNERABILITY!]" 
class="file">../var/mobile/[LOCAL FILE/PATH INCLUDE VULNERABILITY!].*</a></td><td>95.8 KB</td><td>3. August 2013 18:29</td>
<td><form action="/delete.html?fileType=f&dir=%2F&name=../var/mobile/[LOCAL FILE/PATH INCLUDE VULNERABILITY!].*" 
method="post"><input name="_method" value="Delete" type="hidden"><input name="commit"