Document Title:
===============
AdHocMate v1.0 iOS - Persistent Mail Encode Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1559


Release Date:
=============
2015-07-27


Vulnerability Laboratory ID (VL-ID):
====================================
1559


Common Vulnerability Scoring System:
====================================
3.8


Product & Service Introduction:
===============================
AdHocMate is a simple app to displays the Unique Device Identifier (UDID) and some other information of your iOS devices. 
You can send this information to developers so they can add your proper device ID to their Ad Hoc distribution for app tester.

(Copy of the Vendor Homepage: https://itunes.apple.com/us/app/adhocmate/id647553418 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Core Research Team discovered an application-side input validation vulnerability in the AdHocMate v1.0 iOS mobile application.


Vulnerability Disclosure Timeline:
==================================
2015-07-27: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Softmastx
Product: AdHocMate - iOS Mobile (Web-Application) 1.0


Exploitation Technique:
=======================
Local


Severity Level:
===============
Low


Technical Details & Description:
================================
An application-side input validation web vulnerability has been discovered in the official AdHocMate v1.0 iOS mobile web-application.
The security web vulnerability allows to inject malicious script codes on the application-side of the vulnerable iOS mobile app.

The vulnerability is located in the `Share Options > Email` encoding. The application encodes the input of the device cell name with 
wrong conditions. Thus results in an application-side script code execution issue in the share options > mail module. The attackers 
changes by restricted physical device access the device cell name to compromise the application output in the share options > mail module.

The security risk of the application-side input web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.8. 
Exploitation of the persistent web vulnerability requires a low privilege ios device account with restricted access and no user interaction. 
Successful exploitation of the vulnerabilities results in persistent phishing mails, session hijacking, persistent external redirect to malicious 
sources and application-side manipulation of affected or connected module context.

Vulnerable Module(s)
				[+] Share Options > Email
 
Vulnerable Parameter(s)
				[+] device cell name (cid)

Affected Module(s)
				[+] AdHoc Device Information (Mail)


Proof of Concept (PoC):
=======================
The application-side mail encoding web vulnerability can be exploited by local attackers with restricted physical device access without user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the vulnerability ...
1. Change the cid of the ios device via settings to a script code payload (test)
2. Open the vulnerable application
3. Click the Share Options button
4. Push the email button
5. The function includes the device values with wrong encoding to the email
6. Successful reproduce of the vulnerability!


PoC: AdHoc Device Informations.html

<div><b>UDID :</b> A14D1645-7C89-4040-8EDD-6A4F90399C57<br>
<b>Device Name : </b>bkm337>"<img src"x"="" src="cid:">%20<[PERSISTENT INJECTED SCRIPT CODE!]iframe src="a">%20<iframe> <br> <b>
Model : </b>iPad3,4 <br><b> 
iOS Version :</b> iPhone OS 8.3 <br><b>Memory : </b>987 MB <br><b>Free Disk Space : </b> 799 MB</iframe></div>


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse and encode of the email body message context in the share options > email module.
Restrict the input and disallow special chars. Prevent an execution point by implementation of a secure exception-handling.


Security Risk:
==============
The security risk of the application-side validation vulnerability in the share options module is estimated as medium. (CVSS 3.8)


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:    magazine.vulnerability-db.com	- vulnerability-lab.com/contact.php		       	- evolution-sec.com/contact
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@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.

				Copyright © 2015 | Vulnerability Laboratory - [Evolution Security GmbH]™