Document Title: =============== Bluetooth Photo-File Share v2.1 iOS - Multiple Web Vulnerabilities References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1270 Release Date: ============= 2014-05-30 Vulnerability Laboratory ID (VL-ID): ==================================== 1270 Common Vulnerability Scoring System: ==================================== 7 Product & Service Introduction: =============================== This is the best bluetooth sharing and file transfer app in app store. Transfer photo, video, contacts and any file between two iPhone, iPad and/or iPod Touches over bluetooth connection. Requires iPhone 3G or later or 2nd generation iPod Touch or later. Does not require any 3G or WiFi connection. Unlike some other bluetooth photo sharing apps only can transfer photo from Photo Library, The bluetooth share not only can transfer photo, but also it can transfer video from Photo Library. ( Copy of the Homepage: https://itunes.apple.com/de/app/bluetooth-photo-video-musik/id590369016 ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Research Team discovered multiple web vulnerabilities in the official Bluetooth Photo/Video /Musik /Contact /File Share v2.1 iOS mobile application. Vulnerability Disclosure Timeline: ================================== 2014-05-30: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Tao Xu Product: Bluetooth Photo /Video /Musik /Contact /File Share - iOS Mobile Web Application 2.1 Exploitation Technique: ======================= Remote Severity Level: =============== High Technical Details & Description: ================================ 1.1 A local file include web vulnerability has been discovered in the official Bluetooth Photo/Video /Musik /Contact /File Share v2.1 iOS mobile 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 web vulnerability is located in the `filename` value of the `data upload` module. Remote attackers are able to inject own files with malicious `filename` values in the `file upload` POST method request to compromise the mobile web-application. The local file/path execution occcurs in the file/path dir index list web context. The attacker is able to inject the malicious file/path include request by usage of the available `filesharing > wifi-transfer interface`. Local attackers are also able to exploit the filename validation issue in combination with persistent injected script codes to execute different local malicious attacks requests. The attack vector is on the application-side of the allreader wifi service and the request method to inject is POST. The security risk of the local file include web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 6.8. Exploitation of the local file include web vulnerability requires no privileged web-application user account withoutuser interaction. Successful exploitation of the local file include web vulnerability results in mobile application or connected device component compromise. Request Method(s): [+] [POST] Vulnerable Module(s): [+] Filesharing > Wi-fi Transfer UI Vulnerable Function(s): [+] Upload Vulnerable Parameter(s): [+] filename Affected Module(s): [+] Index File Dir List (http://localhost:8080/) 1.2 An arbitrary file upload web vulnerability has been discovered in the official Bluetooth Photo/Video /Musik /Contact /File Share v2.1 iOS mobile application. The arbitrary file upload issue allows remote attackers to upload files with multiple extensions to bypass the system validation and compromise the web-server. The vulnerability is located in the upload file module. Remote attackers are able to upload a php or js web-shells by a rename of the file with multiple extensions to bypass the file restriction mechanism. The attacker uploads for example a web-shell with the following name and extension `pentest.png.js.html.php`. After the upload the attacker needs to open the file in the web application. He deletes the .png file extension and can access the application with elevated access rights. The security risk of the arbitrary file upload web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 7.1. 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. Request Method(s): [+] [POST] Vulnerable Module(s): [+] Filesharing > Wi-fi Transfer UI Vulnerable Function(s): [+] Upload Vulnerable Parameter(s): [+] filename (multiple extensions) Affected Module(s): [+] Index File Dir Listing (http://localhost:8080) Proof of Concept (PoC): ======================= 1.1 The local file include web vulnerability can be exploited by local attackers without privileged application user account or user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Install the mobile application to your apple ios device (iphone/ipad) 2. Open the application locally and activate the wifi transfer & export function 3. Login to another remote device in the same network to the application interface (localhost:8080) 4. Choose a random file to upload, start a session tamper to intercept and press the submit button 5. Change in the POST method request of the upload module the vulnerable filename value Note: Include for example a local device component file or mobile application path as value 6. Continue the request, refresh the index page and download the local file or request unauthorized the mobile device path 7. Successful reproduce of the local file include web vulnerability! PoC: Wi-fi Transfer (UI) - Index File Dir Listing
File NameFile Size
<./[LOCAL FILE/PATH INCLUDE VULNERABILITY VIA FILENAME VALUE]">.png538.00B


--- POC SESSION LOGS [POST] (LFI) --- 19:32:08.304[128ms][total 128ms] 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:29.0) Gecko/20100101 Firefox/29.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[-----------------------------284152263011599 Content-Disposition: form-data; name="newfile"; filename="