VeryPhoto v3.0 iOS - Command Injection Vulnerability Jan 16 2015 12:08PM
Vulnerability Lab (research vulnerability-lab com)
Document Title:
VeryPhoto v3.0 iOS - Command Injection Vulnerability

References (Source):

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

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 a local command inject web vulnerability in the official VeryPhoto v3.0 iOS mobile web-application.

Vulnerability Disclosure Timeline:
2015-01-13: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Affected Product(s):
Cheng Chen
Product: VeryPhoto - iOS Web Application (WiFi) 3.0

Exploitation Technique:

Severity Level:

Technical Details & Description:
A local command inject web vulnerability has been discovered in the official VeryPhoto v3.0 iOS mobile web-application.
The vulnerability allows remote attackers to inject own commands by usage of stored manipulated system/device values to
compromise the apple mobile iOS application.

The command inject vulnerability is located in the vulnerable `albumname` value of the `HTTP Wifi Server`. Local attackers
are able to inject own malicious system specific commands or path value requests by usage of the vulnerable `albumname` value.
The execution of the command occurs in the `VeryPhoto - File Dir Index Listing` of the http wifi interface application.
Attackers are able to manipulate the local albumname values by of the iOS default photo app by rename to execute the commands.

The attack vector is located on the application-side and the injection requires physical device access or a local low privileged
device user account. Local attackers are also able to exploit the albumname validation issue in combination with persistent
injected script codes.

The security risk of the local command/path inject vulnerability is estimated as medium with a cvss (common vulnerability
scoring system) count of 5.6. Exploitation of the command/path inject vulnerability requires a low privileged iOS device
account with restricted access and no user interaction. Successful exploitation of the vulnerability results in unauthorized
execution of system specific commands and unauthorized path value requests to compromise the mobile iOS application and the
connected device components.

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 local command 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/id72081011
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 local command 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[LOCAL COMMAND INJECTION VULNERABILITY!]img%20src=%5C%22x%5C%22%3E%2520%3Ciframe%20src=a%3E%3E%22
537%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,
%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:%2
537%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">"><img src="x">%20<iframe src="a">>(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>

--- PoC Session Logs [GET] (Execution) ---
Status: 200[OK]
6-43D8-8CE2-4415C4DF35CA&filter=1537%22,%22numberOfImage%22:%220%22%7D Load Flags[VALIDATE_ALWAYS ] Grö�e des Inhalts[3813] Mime Type[image/x-jpg]
Request Header:
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0]
Accept-Encoding[gzip, deflate]
Response Header:

- Response

Status: OK[200]
Load Flags[VALIDATE_ALWAYS ] Grö�e des Inhalts[unknown] Mime Type[unknown]
Request Header:
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0]
Accept-Encoding[gzip, deflate]


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 charsi 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 local command inject web vulnerability in the albumname is estimated as medium. (CVSS 5.6)

Credits & Authors:
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm (at) evolution-sec (dot) com [email concealed]) [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 (at) vulnerability-lab (dot) com [email concealed] - research (at) vulnerability-lab (dot) com [email concealed] - admin (at) evolution-sec (dot) com [email concealed]
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
(admin (at) vulnerability-lab (dot) com [email concealed] or research (at) vulnerability-lab (dot) com [email concealed]) to get a permission.

Copyright © 2015 | Vulnerability Laboratory [Evolution Security]

SERVICE: www.vulnerability-lab.com
CONTACT: research (at) vulnerability-lab (dot) com [email concealed]
PGP KEY: http://www.vulnerability-lab.com/keys/admin (at) vulnerability-lab (dot) com [email concealed]%280x19

[ reply ]


Privacy Statement
Copyright 2010, SecurityFocus