Exploit-DB #35038
Description: File Manager 4.2.10 iOS - Code Execution
Type: webapps
Platform: ios
Date: 2014-10-22
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
File Manager v4.2.10 iOS - Code Execution Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1343


Release Date:
=============
2014-10-21


Vulnerability Laboratory ID (VL-ID):
====================================
1343


Common Vulnerability Scoring System:
====================================
9


Product & Service Introduction:
===============================
Try a file manager that’s unmatched in functionality and reliability. It was created to manage your cloud services like GoogleDrive, Dropbox, 
Box, OneDrive, Yandex.Disk, and network services like FTP, SFTP, SMB, WebDAV, DLNA, photo galleries and files on your device. Manage all of 
your stored data like sub-folders - copy, move, rename or compress to archive your folders and files. It supports all possible archive 
formats: Zip, Rar, 7z, tar, gz, bz2. You can protect your folders and files with a password and view photo, video and audio content, as well 
as documents. This application will be a great help for everyday tasks. Copy a folder from one cloud service to any other - easy! Quickly move 
a folder from an archive to a cloud service - easy! Copy your gallery to a network or cloud service - easy!

(Copy of the Homepage: https://itunes.apple.com/de/app/file-manager-pro-manage-your/id926125881 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research team discovered a code execution vulnerability in the official DevelSoftware LTD - File Manager v4.2.10 iOS mobile application.


Vulnerability Disclosure Timeline:
==================================
2014-10-21: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
DevelSoftware LTD
Product: File Manager - iOS Mobile Web Application (Wifi) 4.2.10


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Critical


Technical Details & Description:
================================
A code execution vulnerability has been discovered in the official DevelSoftware LTD - File Manager v4.2.10 iOS mobile application.
The issue allows an attacker to compromise the application and connected device components by exploitation of a system specific code 
execution vulnerability in the wifi interface.

The vulnerability is located in the `Create Folder` input field of the index.html wifi web interface. The function create the path value 
without any protection or filter mechanism in the GET method request. Remote attackers are able to manipulate the GET method request by 
usage of the `createdir?path=` parameter to compromise the application or device. The execution of the code occurs in the index.html file 
next to the name output context of the wifi share file dir listing. The attack vector is located on the application-side of the mobile app 
and the request method to inject is GET.

The security risk of the remote code execution web vulnerability is estimated as critical with a cvss (common vulnerability scoring system) count of 8.8
Exploitation of the remote code execution web vulnerability requires no privileged application user account (passwd default blank) or user interaction. 
Successful exploitation of the code execution vulnerability results in mobile application compromise and connected or affected device component compromise.


Request Method(s):
					[+] GET

Vulnerable Module(s):
					[+] Create Folder

Vulnerable Parameter(s):
					[+] createdir?path=(name)

Affected Module(s):
					[+] Wifi Interface (index.html)


Proof of Concept (PoC):
=======================
The code execution vulnerability can be exploited by attackers in the same local wifi without user interaction or pass code authorization.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

1. Install the mobile app to your local iOS device (iphone or ipad) [https://itunes.apple.com/de/app/file-manager-pro-manage-your/id926125881]
2. Start the app and push in the left corner the wifi transfer button
3. Take another device or computer that allows you to access the wifi file transfer interface (localhost:80)
4. Now, inject own code as payload by usage of the create folder input field
Note: The input field requests the path value directly via GET method request without secure parse or encode
5. The code execution occurs directly after the inject in the index.html file of the web interface
6. Successful reproduce of the security vulnerability!


PoC: index.html (Name) [createdir?path=]

   <fieldset class="buttonsFieldset">
            <input disabled="" value="Download Files" class="buttons" id="loadFileButton" onclick="loadFileButtonClick()" type="button">
            <input value="Upload Files" class="buttons" id="uploadFilesButton" onclick="uploadFilesButtonClick()" type="button">
            <input value="Create Folder" class="buttons" id="createFolderButton" onclick="createFolderButtonClick()" type="button">
            <input disabled="" value="Rename" class="buttons" id="renameButton" onclick="renameButtonClick()" type="button">
            <input disabled="" value="Delete" class="buttons" id="deleteButton" onclick="deleteButtonClick()" type="button">
            <input value="Select All" class="buttons" id="selectAllButton" onclick="selectAllButtonClick()" type="button">
            <input value="Deselect All" class="buttons" id="unselectAllButton" onclick="unselectAllButtonClick()" type="button">
        </fieldset>
        <div class="separator"></div>
        <div class="fileListTableContainer">
            <table class="table" id="fileListTable"><tbody><tr id="fileListTable_-1" class="header">
<td id="fileListTable_-1_0" class="field">Name</td><td id="fileListT