Exploit-DB #31573
Description: WiFi Camera Roll 1.2 iOS - Multiple Vulnerabilities
Type: webapps
Platform: ios
Date: 2014-02-11
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
WiFi Camera Roll v1.2 iOS - Multiple Web Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1192


Release Date:
=============
2014-02-08


Vulnerability Laboratory ID (VL-ID):
====================================
1192


Common Vulnerability Scoring System:
====================================
7.9


Product & Service Introduction:
===============================
Download or upload photos/videos via WiFi! It is a easy way to wirelessly access your photos/videos in camera roll on devices. 
It only needs a web browser and not depends on any other transfer utilities. Just start the app and input the address into the 
address bar of your browser, you can browser the photos/videos in camera roll on your device. What`s more, you can upload 
photos/videos and it will help you save them into camera roll automatically.

- You can browser the photos in camera roll on device
- Download photos in full-size with EXIF metadata
- Upload the specified format images into camera roll
- Optional password protection for the web interface
- One app compatible for both iPhone and iPad
- Support major browsers e.g. Safari, Chrome, IE, etc.
- A web browser is enough and not depends on flash, java, etc.
- [NEW] Download unmodified HD quality video
- [NEW] Upload specified format videos directly into your camera roll
- [NEW] View photo gallery in web browser

I`m always keeping this app concise and easy to use. It is just a bridge to connect your iPhone/iPad and computer. All photos and 
videos are saved in your system album and your computer. So it is safe and won`t lost even if you accidentally delete this app.

(Copy of the Homepage: https://itunes.apple.com/ch/app/wifi-camera-roll/id576954110 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple web vulnerabilities in the official WiFi Camera Roll v1.2 iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2014-02-08:    Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Apple AppStore
Product: WiFi Camera Roll (iOS) - Application 1.2


Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
1.1
A local file/path include web vulnerability has been discovered in the official WiFi Camera Roll v1.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 web-application or mobile device.

The local file include web vulnerability is located in the vulnerable `qqfile` name value of the `upload files` module (web-interface).
Remote attackers are able to inject own files with malicious filename to compromise the mobile application. The attack vector is 
persistent and the request method is POST. The local file/path include execute occcurs in the main file index section after the refresh 
of the file upload. The security risk of the local file include web vulnerability is estimated as high(+) with a cvss (common vulnerability 
scoring system) count of 7.8(+)|(-)7.9.

Exploitation of the local file include web vulnerability requires no user interaction or privileged web-application user account with password. 
Successful exploitation of the local web vulnerability results in mobile application or connected device component compromise by unauthorized 
local file include web attacks.

Request Method(s):
				[+] [POST]

Vulnerable Input(s):
				[+] Upload Files

Vulnerable Parameter(s):
				[+] filename > qqfile

Affected Module(s):
				[+] Access from Computer (File Dir Index List - Folder/Category to  path=/)


1.2
An arbitrary file upload web vulnerability has been discovered in the official WiFi Camera Roll v1.2 iOS mobile web-application.
The arbitrary file upload issue allows remote attackers to upload files with multiple extensions to bypass the web-server or system validation.

The vulnerability is located in the `upload file` (video and images) module. Remote attackers are able to upload a php or js web-shells by renaming 
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 `image.gif.jpg.html.js.aspx.jpg`. After the upload the attacker needs to open the file in the web application. He deletes the .jpg & 
.gif 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 6.4(+)|(-)6.5.

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):
				[+] Upload (GUI)

Vulnerable Parameter(s):
				[+] filename > qqfile (multiple extensions)

Affected Module(s):
				[+] File Dir Upload Ajax (http://localhost:8880/upload.ajax?qqfile=)


Proof of Concept (PoC):
=======================
The arbitrary file upload and local file include web vulnerability can be exploited by remote attackers without user interaction or privileged web user account.
For security demonstration or to reproduce the remote vulnerabilities follow the provided information and steps below.

1.1
PoC: File Include Vulnerability
http://localhost:8880/upload.ajax?qqfile=%20../\../\[LOCAL FILE/PA