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.08521237764797618>
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.18317864473383083 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:8080/cgi/album/default?0.05696050392233898 Load Flags[LOAD_BACKGROUND  ] Gr��e des Inhalts[55] 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[55]
      Connection[close]


18:40:27.389[140ms][total 140ms] Status: 200[OK]
GET http://localhost:8080/cgi/album/add/%5BPERSISTENT%20INJECTED%20SCRIPT%20CODE!%5D?0.6839441036305055 Load Flags[LOAD_BACKGROUND  ] Gr��e des Inhalts[12] 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[12]
      Connection[close]


18:40:27.535[76ms][total 76ms] Status: 200[OK]
GET http://localhost:8080/cgi/album/list?0.4844814145331481 Load Flags[LOAD_BACKGROUND  ] Gr��e des Inhalts[220] 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[220]
      Connection[close]


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse and encode of the albumname sync and album name add input values.
Encode the input and parse the 
output in the path dir listing again to prevent further persistent script code injects.


Security Risk:
==============
The security risk of the persistent input validation web vulnerability is estimated as medium(+).


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]


Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, 
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business 
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some 
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation 
may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases 
or trade with fraud/stolen material.

Domains:    www.vulnerability-lab.com   	- www.vuln-lab.com			       - www.evolution-sec.com
Contact:    admin@vulnerability-lab.com 	- research@vulnerability-lab.com 	       - admin@evolution-sec.com
Section:    www.vulnerability-lab.com/dev 	- forum.vulnerability-db.com 		       - magazine.vulnerability-db.com
Social:	    twitter.com/#!/vuln_lab 		- facebook.com/VulnerabilityLab 	       - youtube.com/user/vulnerability0lab
Feeds:	    vulnerability-lab.com/rss/rss.php	- vulnerability-lab.com/rss/rss_upcoming.php   - vulnerability-lab.com/rss/rss_news.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. 
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other 
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and 
other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), 
modify, use or edit our material contact (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.

				Copyright � 2014 | Vulnerability Laboratory [Evolution Security]



-- 
VULNERABILITY LABORATORY RESEARCH TEAM
DOMAIN: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com