Exploit-DB #33631
Description: AllReader 1.0 iOS - Multiple Vulnerabilities
Type: webapps
Platform: ios
Date: 2014-06-03
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
AllReader v1.0 iOS - Multiple Web Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1269


Release Date:
=============
2014-05-26


Vulnerability Laboratory ID (VL-ID):
====================================
1269


Common Vulnerability Scoring System:
====================================
6.8


Product & Service Introduction:
===============================
Professional helper on your iPhone, iPad, and iPod that will allow you to read virtually any file type right from your device: PDF, DJVU, DOC, XLS, PPT, TXT,
Image, Video files, whether these are important documents, books, student materials, notes or you can just view pictures and video clips. 
Supported devices: iPhone 3Gs/4/4S/5, iPod Touch 4/5, all iPad generations.

(Copy of the Homepage: https://itunes.apple.com/us/app/all-reader./id871830567 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered a local file include web vulnerability in the official AllReader v1.0 iOS mobile application by Wylsacom Waytt.


Vulnerability Disclosure Timeline:
==================================
2014-05-26: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Wylsacom Waytt
Product: AllReader - iOS Mobile Application 1.0


Exploitation Technique:
=======================
Local


Severity Level:
===============
High


Technical Details & Description:
================================
A local file include web vulnerability has been discovered in the official AllReader v1.0 iOS mobile application by Wylsacom Waytt.
The local file include web vulnerability allows remote attackers to unauthorized include local file/path requests or system specific 
path commands to compromise the mobile web-application.

The web vulnerability is located in the `filename` value of the `file upload` module. Remote attackers are able to inject own files with 
malicious `filename` values in the `file upload` POST method request to compromise the mobile web-application. The local file/path 
execution occcurs in the index file/path dir list context. The attacker is able to inject the malicious file/path include request by usage 
of the available `wifi interface`.

Remote attackers are also able to exploit the filename validation issue in combination with persistent injected script codes to execute 
different local malicious attacks requests. The attack vector is on the application-side of the allreader wifi service and the request 
method to inject is POST. 

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. Exploitation of the local file include web vulnerability requires no privileged web-application user account withoutuser interaction. 
Successful exploitation of the local file include web vulnerability results in mobile application or connected device component compromise.


Request Method(s):
				[+] [POST]

Vulnerable Service(s):
				[+] WiFi Transfer UI

Vulnerable Module(s):
				[+] Upload File

Vulnerable Parameter(s):
				[+] filename

Affected Module(s):
				[+] Index File/Folder Dir Listing (http://localhost:8080/)


Proof of Concept (PoC):
=======================
The local file/path include web vulnerability in the web-server can be exploited by local attackers without auth or user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the security vulnerability ...
1. Install the ios application (iphone or ipad)
2. Start it and move to the settings menu, activate the wifi server
3. Go to another computer in the same network and surf to the local web-server url (localhost:8080)
4. Upload a random image 
5. Tamper the session information by an intercept, exchange the vulnerable `filename` value with own malicious file or path request
Note: Payloads can be combined with script code to successful execute different other attacks like hijacking, phishing and co.
5. Submit the settings and refresh the file dir index list
6. The code execution occurs in the file dir index list of ios app
7. Successful reproduce of the local fil/path include web vulnerability 

PoC: File Dir Index List - http://localhost:8080/
<html><head><title>Files from </title><meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8"><style>html {background-color:#eeeeee} body { background-color:#FFFFFF; font-family:Tahoma,Arial,Helvetica,sans-serif; 
font-size:18x; margin-left:15%; margin-right:15%; border:3px groove #006600; padding:15px; } </style></head><body><h1>Files from </h1>
<bq>The following files are hosted live from the iPhone's Docs folder.</bq><p><a href="..">..</a><br>
<a href="../.[LOCAL FILE/PATH INCLUDE WEB VULNERABILITY].png"><../.[LOCAL FILE/PATH INCLUDE WEB VULNERABILITY!].png</a>	(0.5 Kb, 2014-05-26 11:49:04 +0000)<br />
</p><form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"><label>upload file<input type="file" name="file" id="file" /></label>
<label><input type="submit" name="button" id="button" value="Submit" /></label></form></body></html></iframe></a></p></body></html>


--- POC SESSION LOGS [POST] ---
Status: 200[OK]
POST http://localhost:8080/ Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Gr��e des Inhalts[821] Mime Type[application/x-unknown-content-type]
   Request Header:
      Host[localhost:8080]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip,