Exploit-DB #32664
Description: iShare Your Moving Library 1.0 iOS - Multiple Vulnerabilities
Type: webapps
Platform: ios
Date: 2014-04-02
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
iShare Your Moving Library 1.0 iOS - Multiple Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1240


Release Date:
=============
2014-03-31


Vulnerability Laboratory ID (VL-ID):
====================================
1240


Common Vulnerability Scoring System:
====================================
7.8


Product & Service Introduction:
===============================
I forgot to bring the cable, can I download the original photos from iPhone to my computer now ? With this software, just select the photos 
you want to download, enable build in http server, you are on your way to get the full size photos! Use it as your usb stick or mobile hard disk.
Copy files, share image with your friends. Copy your video, audio, text, pdf or office files on to it. Enjoy it on the road, share it with your friends.
Build in http server enables to exchange information with any computer has browser. Need local WiFi network or cellular network for using this application.
Suggest to download over WiFi network. Or enable computer-to-computer WiFi network on your computer, let iPhone or iPod to join your computer\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s own WiFi network. 

(Copy of the Product Homepage: https://itunes.apple.com/us/app/ishare-your-moving-library/id309685106 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research team discovered multiple web vulnerabilities in the official iShare - Your moving libarary iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2014-03-26:	Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Shanghai KaiWei Network Technology
Product: iShare Your moving library - iOS Mobile Web Application 1.0


Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
1.1
The local 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` 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 on the application-side 
of the wifi service and the request method to inject is POST. The local file/path include execution occcurs in the index file dir list of 
the upload path. Attackers are also able to exploit the filename validation issue in combination with persistent injected script codes to 
execute different local malicious requests. The security risk of the local file include web vulnerability is estimated as high(+) with a 
cvss (common vulnerability scoring system) count of 6.8(+)|(-)6.9.

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):
				[+] Search/Select File > Upload

Vulnerable Parameter(s):
				[+] filename

Affected Module(s):
				[+] Index File Dir List (http://localhost:8080)



1.2
An arbitrary file upload web vulnerability has been discovered in the official iShare - Your moving libarary 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 POST method request of the `Upload` 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.jpg.html.php.asp.html.jpg`. After the upload the attacker needs to open the file in the web application. He deletes the .jpg  
file extension and can access the application with elevated 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.1(+)|(-)7.2.

Exploitation of the arbitrary file upload web vulnerability requires no user interaction or privileged application user account with password.
Successful exploitation of the arbitrary file upload web vulnerability results in unauthorized file access and system compromise.

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:8080)


Proof of Concept (PoC):
=======================
1.1
The local file include web vulnerability can be exploited by local attackers without user interaction or privileged web-interface account.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

PoC: 
<a href="/files/%3C./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!].png" class="file"><%3C./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!].png</a></td><td class='del'>
<form action='/files/%3C./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!].png' method='post'><input name='_method' value='delete' type='hidden'/>
<input name="commit" type="submit" value="Delete" class='button' /></td></tr></tbody></table></iframe></a>


--- PoC Session Logs [POST] ---
Status: 302[Found]
POST http://localhost: