Document Title: =============== FTP Drive + HTTP 1.0.4 iOS - Code Execution Vulnerability References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1231 Release Date: ============= 2014-03-20 Vulnerability Laboratory ID (VL-ID): ==================================== 1231 Common Vulnerability Scoring System: ==================================== 9.1 Product & Service Introduction: =============================== FTP Drive + HTTP Server is the ultimate app as for usefullness and ease of use to bring with you and share all your important files through your iPhone/iPod! When you`re in a hurry or simply wants the things done as they are supposed to be done, you can use FTP Drive + HTTP Server. As the name implies, you can use this app mainly as an FTP Server, so you can mount it as a Network Drive in your favorite operative system or you can browse the files through a web browser like Firefox, Safari, Chrome, Internet Explorer, ... (Copy of the Homepage: https://itunes.apple.com/us/app/ftp-drive-+-http-server-easiest/id455671784 ) (Vendor Homepage: http://www.gummybearstudios.com/ios.html ) Abstract Advisory Information: ============================== The Vulnerability Laboratory discovered a code execution web vulnerability in the official Gummy Bear Studios FTP Drive + HTTP Server v1.0.4 iOS mobile web-application. Vulnerability Disclosure Timeline: ================================== 2014-03-20: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Exploitation Technique: ======================= Remote Severity Level: =============== Critical Technical Details & Description: ================================ A code execution web vulnerability has been discovered in the official Gummy Bear Studios FTP Drive + HTTP Server v1.0.4 iOS mobile web-application. The remote vulnerbaility allows an attacker to compromise the application and connected device components by usage of a system specific command execution. The vulnerability is located in the create folder input field. The input field direct executes the input via GET method request. The request has only a simple quotes encoding. Remote attackers are easily able to execute code by usage of a script code payload in combination with system device specific php code values. The execution of the code occurs in the main index file dir listing service context. The attack vector is on application-side and the request method to attack the service is GET. To bypass the path values validation it is required to first add a folder via `newDir` value. The remote attacker is able to tamper the create new folder post method request and can intercept the values twice to attach the second manipulated path value to provoke a code execution. After the add it is possible to attach to the already included values via create new folder to execute the code. The security risk of the remote code execution web vulnerability is estimated as critical with a cvss (common vulnerability scoring system) count of 9.0(+)|(-)9.1. 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 component compromise. Vulnerable Module(s): [+] Create New Folder Vulnerable Parameter(s): [+] path value Proof of Concept (PoC): ======================= The php code execution web vulnerability can be exploited by remote attackers without user interaction or privileged web-application user account. For security demonstration or to reproduce the vulnerability follow the provided steps and information below to continue. PoC: http://localhost:8080/[CONNECTED PATH<]/?newDir=%22[