Aerosol Posted January 18, 2015 Report Posted January 18, 2015 Document Title:===============File Pro Mini v5.2 iOS - Multiple Web VulnerabilitiesReferences (Source):====================http://www.vulnerability-lab.com/get_content.php?id=1403Release Date:=============2015-01-15Vulnerability Laboratory ID (VL-ID):====================================1403Common Vulnerability Scoring System:====================================6.9Product & Service Introduction:===============================Multipurpose, Easy-to-Use and Robust app for files & documents. Import files, documents & media from PC/Mac, email attachments, dropbox, sugarsync, iCloud & Box.net to File Pro along with amazing transfer features of FTP and Wifi. The only documents manager app which includes total security of files along with PDF scanner, Audio Recorder and editing TXT files. Open all kind of file & documents including RAR and CBR files.(Copy of the Vendor Homepage: https://itunes.apple.com/us/app/file-pro-mini-ultimate-file/id540971042 )Abstract Advisory Information:==============================The Vulnerability Laboratory Research Team discovered multiple vulnerabilities in the official Perception System - File Pro Mini v5.2 iOS mobile web-application.Vulnerability Disclosure Timeline:==================================2015-01-15: Public Disclosure (Vulnerability Laboratory)Discovery Status:=================PublishedAffected Product(s):====================Perception SystemProduct: File Pro Mini - iOS Mobile Web Application (Evereader Wifi-Sharing) 5.3Exploitation Technique:=======================LocalSeverity Level:===============HighTechnical Details & Description:================================1.1A local file include web vulnerability has been discovered in the official Perception System - File Pro Mini v5.2 iOS mobile web-application.The local file include web vulnerability allows remote attackers to unauthorized include local file/path requests or system specific path commands to compromise the mobile web-application.The vulnerability is located in the filename value of the `Evereader Wi-Fi Sharing - Index` module. Local attackers are able to manipulate the wifi web interface by usage of the vulnerable upload function. The service does not encode or parse the context of uploaded files.Local attacker are able to manipulate the input of the files to exploit the issue by a POST method request to the wifi web-application interface. The execution of unauthorized local file or path request occurs in the index file dir listing module of the `Evereader Wi-Fi Sharing` application.The request method to inject is POST and the attack vector is located on the application-side of the online-service.The security risk of the local file include web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 6.6. Exploitation of the file include web vulnerability requires no user interaction or privileged web-application user account. Successful exploitation of the local file include web vulnerability results in mobile application or connected device component compromise.Vulnerable Method(s): [+] [POST]Vulnerable Module(s): [+] UploadVulnerable Parameter(s): [+] filenameAffected Module(s): [+] Evereader Wi-Fi Sharing - Index1.2A local command/path injection web vulnerabilities has been discovered in the official Perception System - File Pro Mini v5.2 iOS mobile web-application.The vulnerability allows attackers to inject local commands via vulnerable system values to compromise the apple mobile iOS application.The vulnerability is located in the vulnerable `albumname` value of the `Evereader Wi-Fi Sharing - Index` module. Local attackers are able to inject own malicious system specific commands or path value requests to the vulnerable `albumname` value. The execution of the local command inject occurs in the `Evereader Wi-Fi Sharing - Index` module of file dir index. The attacker is able to manipulate the albumnames in the index module of the application by preparing to change the names via iOS app sync. The encoding and validation of the interface is broken by design because files, folders and other values can be manipulated by sync to compromise the iOS mobile application.The attack vector is on the application-side and the injection requires physical device access and a local low privileged user account. Local attackers are also able to exploit the albumname validation issue in combination with persistent injected script codes to execute different local malicious attack requests.The security risk of the local command/path inject vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 5.9.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 execution of system specific commands and unauthorized path value requests to compromise the mobile iOS application or the connected device components.Request Method(s): [+] [GET] (Execution)Vulnerable Module(s): [+] AlbumsVulnerable Parameter(s): [+] albumnameAffected Module(s): [+] Evereader Wi-Fi Sharing - IndexProof of Concept (PoC):=======================1.1The local file include web vulnerability can be exploited by local attackers without privileged user account and user interaction.For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.PoC: Evereader Wi-Fi Sharing - Index (filename via POST)<a href="/files/%3Cx.png%20 ./[LOCAL FILE INCLUDE VULNERABILITY!]" class="file"><x.png%20 ./[LOCAL FILE INCLUDE VULNERABILITY!]">x.png%20 ./[LOCAL FILE INCLUDE VULNERABILITY!]</a></td><td class='del'><form action='/files/%3Cx.png%20 ./[LOCAL FILE INCLUDE VULNERABILITY!]' method='post'><input name='_method' value='delete' type='hidden'/><input name="commit" type="submit" value="Delete" class='button' /></td></tr></tbody></table></iframe></a>--- PoC Session Logs [POST] (Injection & Execution) ---Status: 302[Found]POST http://localhost:8080/files Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Größe des Inhalts[67] Mime Type[text/html] Request Header: Host[localhost:8080] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[de,en-US;q=0.7,en;q=0.3] Accept-Encoding[gzip, deflate] Referer[http://localhost:8080/] Connection[keep-alive] POST-Daten: POST_DATA[-----------------------------167073016026822Content-Disposition: form-data; name="newfile"; filename="x.png%20 ./[LOCAL FILE INCLUDE VULNERABILITY!]"Content-Type: image/png-Status: 200[OK]GET http://localhost:8080/./[LOCAL FILE INCLUDE VULNERABILITY!] Load Flags[LOAD_DOCUMENT_URI ] Größe des Inhalts[0] Mime Type[application/x-unknown-content-type] Request Header: Host[localhost:8080] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[de,en-US;q=0.7,en;q=0.3] Accept-Encoding[gzip, deflate] Referer[http://localhost:8080/] Connection[keep-alive] Response Header: Accept-Ranges[bytes] Content-Length[0] Date[So., 11 Jan. 2015 17:47:19 GMT]Reference(s):http://localhost:8080/files1.2The local command inject web vulnerability can be exploited by local attackers with low privileged device user account with physical device access and without user interaction.For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.PoC: Evereader Wi-Fi Sharing - Index (albumname via sync)<table border="0" cellpadding="0" cellspacing="0"> <thead> <tr><th>Name</th><th class="del">Delete</th></tr> </thead> <tbody id="filelist"><tr><td><a href="/files/%22%3E%3C[LOCAL COMMAND INJECT VULNERABILITY!]%3E" class="file">">[LOCAL COMMAND INJECT VULNERABILITY!]></a></td><td class='del'><form action='/files/%22%3E%3C[LOCAL COMMAND INJECT VULNERABILITY!]%3E' method='post'><input name='_method' value='delete' type='hidden'/><input name="commit" type="submit" value="Delete" class='button' /></td></tr></tbody></table></iframe></a></td></tr><tr class="shadow"><td><a href="/files/Backup" class="file">Backup</a></td><td class="del"><form action="/files/Backup" method="post"><input name="_method" value="delete" type="hidden"><input name="commit" value="Delete" class="button" type="submit"></form></td></tr><tr><td><a href="/files/Recents" class="file">Recents</a></td><td class="del"><form action="/files/Recents" method="post"><input name="_method" value="delete" type="hidden"><input name="commit" value="Delete" class="button" type="submit"></form></td></tr></tbody></table>--- PoC Session Logs [GET] (Execution) ---Status: 200[OK]GET http://localhost:8080/files?Sun%20Jan%2011%202015%2018:49:41%20GMT+0100 Load Flags[LOAD_BACKGROUND VALIDATE_ALWAYS ] Größe des Inhalts[114] Mime Type[text/plain] Request Header: Host[localhost:8080] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0] Accept[application/json, text/javascript, */*] Accept-Language[de,en-US;q=0.7,en;q=0.3] Accept-Encoding[gzip, deflate] X-Requested-With[XMLHttpRequest] Referer[http://localhost:8080/] Connection[keep-alive] Response Header: Accept-Ranges[bytes] Content-Length[114] Cache-Control[private, max-age=0, must-revalidate] Content-Type[text/plain; charset=utf-8] Date[So., 11 Jan. 2015 17:44:43 GMT]Reference(s):http://localhost:8080/Solution - Fix & Patch:=======================1.1The local file include web vulnerability can be patched by a secure aprse and encode of the vulnerable filename value in the upload module POST method request.Filter the filenames and restrict the input in the app and in remote requests to prevent local file include attacks.1.2To fix the second vulnerability encode and parse the albumname value on sync (PUT) request.Filter the albumname values and restrict the input to disallow special chars and script code tags.Security Risk:==============1.1The security risk of the local file include web vulnerability in the filename value of the upload module is estimated as high. (CVSS 6.6)1.2The security risk of the local command injection vulnerability in the albumname value of the index module is estimated as medium. (CVSS 5.9)Credits & Authors:==================Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]Source Quote