Matt Posted July 16, 2013 Report Posted July 16, 2013 Description : Olive File Manager version 1.0.1 for iOS suffers from arbitrary file upload and cross site scripting vulnerabilities.Author : enjamin Kunz MejriSource : Olive File Manager 1.0.1 Arbitrary File Upload / XSS ? Packet StormCode : Title:======Olive File Manager v1.0.1 iOS - Multiple VulnerabilitiesDate:=====2013-07-13References:===========http://www.vulnerability-lab.com/get_content.php?id=1009VL-ID:=====1009Common Vulnerability Scoring System:====================================5.6Introduction:=============A powerful file manager and well-designed office suit. Multiple features all in one app, coming with new functions every 2 weeks! These are all in Olive File Manager! Once you have it, ask for nothing else! Powerful file manager: Retain your use habits with PC file manager such as copy and paste. Capable of opening documents like mail attachments from other apps. Support for multiple display mode(e.g. list, thumbnail, grid), sending documents as mail attachments, screening display, sorting and searching documents, etc.A wireless USB flash diskA compressing & decompressing toolAn encrypted safe boxAn e-book readerA GoogleDocs terminalA Dropbox terminalA picture viewerA music playerA video playerOffice Suite: Multiple formats supports available, including doc, docs, xls, xlsx, ppt, pptx, pdf, txt, rtf, html, iwork, etc.Wireless USB flash disk: This enables you to transfer your files from your USB disk to your iPad through WIFI.Compressing & decompressing: Support for decompression and package compression for .zip and .rar files.Encrypted safe box: You can set a password on your Olive File Manager and never need to worry about your documents being exposed when someone is playing your iPad. Cloud: GoogleDocs and Dropbox supports are available with the function of synchronous upload and download of files(More Cloud supports are under development). Picture Viewer: Support for common image formats such as .png, .bmp and .jpg.Music & Video Player: Support for common video formats including MP3, AAC, 3GP, avi, au, wav, MP4, mov and m4a(Copy of the Vendor Homepage: https://itunes.apple.com/de/app/olive-file-manager/id529493702 )Abstract:=========The Vulnerability Laboratory Research Team discovered multiple vulnerabilities in the Olive File Manager v1.0.1 application (Apple iOS - iPad & iPhone).Report-Timeline:================2013-07-13: Public Disclosure (Vulnerability Laboratory)Status:========PublishedAffected Products:==================Apple AppStoreProduct: Olive File Manager Wifi 1.0.1Exploitation-Technique:=======================RemoteSeverity:=========HighDetails:========1.1A local file include and arbitrary file upload web vulnerability is detected in the Olive File Manager v1.0.1 application (Apple iOS - iPad & iPhone).The vulnerability allows remote attackers to upload files via POST method with multiple extensions to unauthorized access them on application-side of the service.The vulnerability is located in the file upload/add module of the web-server (http://localhost:8797/) when processing to request a manipulated filename via POST. The injected file will be accessable via the index listing module of the web application.Remote attackers can exchange the filename with a double or tripple extension bia POST method to bypass the upload validation and filter process. After the upload the attacker access the file with one extension and exchange it with the other one to execute for example php codes.A persistent script code injection is detected in the filename parameter. Attackers can tamper the request and exchange the file name with persistent malicious script code or tags. The code will be executed in the main index site when processing to list the object (file) items.Attackers are also able to inject persistent code with local frame requests to unauthorized access application data/apps or restricted application information. The execution of the persistent code also occurs when an application user is processing to refresh, update or delete the malicious web context.Exploitation of the vulnerability requires no user interaction and also without privilege application user account (no password standard).Successful exploitation of the vulnerability results in unauthorized path or file access via local file include or arbitrary file upload.Vulnerable Application(s): [+] Olive File Manager v1.0.1 - ITunes or AppStore (Apple)Vulnerable Module(s): [+] File Upload (Web Server) [Remote]Vulnerable File(s): [+] AirDriveAction_file_addVulnerable Parameter(s): [+] filenameAffected Module(s): [+] Application Index File Listing (http://localhost:8797/)1.2A persistent input validation web vulnerability is detected in the Olive File Manager v1.0.1 application (Apple iOS - iPad & iPhone).The bug allows an attacker (remote) to implement/inject malicious script code on the application side (persistent) of the app.The vulnerability is located in the index file dir listing module of the web-server (http://localhost:8797/) when processing to display via POST request method injected manipulated `folder names`. The persistent script code will be executed in the main index file dir listing module when the service lists the new malicious injected foldername as item.Exploitation of the persistent web vulnerability requires low or medium user interaction without application user account.Successful exploitation of the vulnerability can lead to persistent session hijacking (customers), account steal via persistent web attacks, persistent phishing or stable (persistent) certificate mail notification context manipulation.Vulnerable Application(s): [+] Olive File Manager v1.0.1 - ITunes or AppStore (Apple)Vulnerable Module(s): [+] Add FolderVulnerable Parameter(s): [+] foldernameAffected Module(s): [+] Index Folder Listing (http://localhost:8797/)Proof of Concept:=================1.1The file include and arbitrary file upload vulnerability can be exploited by remote attackers without privilege application user account and without required user interaction. For demonstration or reproduce ...PoC: Filename<div class="file_list_container"><div class="file_list_item"><table height="50px" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" valign="middle" width="50"></td><td align="left" valign="middle" width="*"><a href="..">..</a></td></tr></tbody></table></div><div class="file_list_item"><table height="50px" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" valign="middle" width="50"></td><td align="left" valign="middle" width="*"><a href="<[LOCAL FILE/PATH REQUEST!]"></a> (Size:27,27 Kb, Last Modified:2013-07-12 18:34:15)<br /></td></tr></tbody></table></div><div class="file_list_item"><table width="100%" height="50px" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td width="50" align="center" valign="middle"></td><td width="*" align="left" valign="middle"><a href=">">[LOCAL FILE/PATH REQUEST!]></a> (Size:27,27 Kb, Last Modified:2013-07-12 18:33:42)<br /></td></tr></tbody></table></div></div></div><div class="footer"><div class="footer_text">Copyright © 2008 OliveOffice,Inc.</div></div></body></html></iframe></a></td></tr></tbody></table></div></div>--- POST Method Request Log ---POST_DATA[-----------------------------151253266715950Content-Disposition: form-data; name="file"; filename=">"[LOCAL FILE/PATH REQUEST!]>.png"Content-Type: image/png1.2the persistent input validation web vulnerability can be exploited by remote attackers without privilege application user account andwith low or medium required user interaction. For demonstration or reproduce ...PoC: Foldername<div class="file_list_container"><div class="file_list_item"><table height="50px" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" valign="middle" width="50"></td><td align="left" valign="middle" width="*"><a href="..">..</a></td></tr></tbody></table></div><div class="file_list_item"><table height="50px" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" valign="middle" width="50"></td><td align="left" valign="middle" width="*"><a href="%20[PERSISTENT INJECTED SCRIPT CODE!]>" <[PERSISTENT INJECTED SCRIPT CODE!]">/">%20>"<[PERSISTENT INJECTED SCRIPT CODE!]">/</a> (Size:0 Kb, Last Modified:2013-07-12 18:26:31)<br /></td></tr></tbody></table></div></div></div><div class="footer"><div class="footer_text">Copyright © 2008 OliveOffice,Inc.</div></div></body></html></iframe></a></td></tr></tbody></table></div></div>Solution:=========1.1The arbitrary file upload web vulnerability and the upload filter bypass issue is estimated as high(+).1.2The security risk of the persistent input validation vulnerabilities is estimated as high(-).Risk:=====The security risk of the persistent input validation web vulnerability is estimated as high(-).Credits:========Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) Quote