Full Disclosure mailing list archives

iUSB v1.2 iOS - Arbitrary Code Execution Vulnerability


From: Vulnerability Lab <research () vulnerability-lab com>
Date: Tue, 16 Dec 2014 20:39:28 +0100

Document Title:
===============
iUSB v1.2 iOS - Arbitrary Code Execution Vulnerability


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


Release Date:
=============
2014-12-10


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


Common Vulnerability Scoring System:
====================================
8.7


Product & Service Introduction:
===============================
This is very useful software for iDevices users, it lets you share all types of files easily and quickly via wifi. 
The main functions of iUSB. Share files directly to iDevices via wifi. Share files via wifi using a web browser to 
the device or computer. Share files via cable to a computer. Manage files and folders easily and efficiently. 
Allows to open almost common files with formats: MP3, MP4, M4V, MOV, XLS, KEY.ZIP, NUMBERS.ZIP, PAGES.ZIP, PDF, PPT, 
DOC, RTF, RTFD.ZIP, KEY, NUMBERS, PAGES, TXT, CSV, HTML, HTM. Support for secure your data simply and quickly.

(Copy of the Vendor Homepage: https://itunes.apple.com/de/app/iusb/id903716126 )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research team discovered an arbitrary code execution vulnerability in the official iUSB 
v1.2 iOS mobile web-application.


Vulnerability Disclosure Timeline:
==================================
2014-12-10:     Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
Trung Pham
Product: iUSB - Mobile Web Application (Wifi) 1.2


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


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


Technical Details & Description:
================================
A code execution vulnerability has been discovered in the official iUSB v1.2 iOS mobile web-application.
The issue allows remote attackers to execute arbitrary codes to compromise the mobile wifi web-application.

The issue is located in the `path` value of the `create folder` input field. Remote attackers with access to the 
wifi web interface are able to execute system specific codes by usage of the vulnerable `create folder` function.
The execution of the injected code occurs on the application in the iUSB wifi interface index item listing module.
The attack vector is located on the application-side of the app and the request method to execute the code is POST.

The security risk of the code execution vulnerability is estimated as high with a cvss (common vulnerability scoring 
system) count of 8.7. Exploitation of the code execution vulnerability requires no privileged application user account 
or user interaction. Successful exploitation of the code execution vulnerability results in mobile application 
compromise 
and affected or connected device component compromise.

Request Method(s):
                                [+] POST

Vulnerable Module(s):
                                [+] Create Folder

Vulnerable Parameter(s):
                                [+] path

Affected Module(s):
                                [+] iUSB File Dir Listing


Proof of Concept (PoC):
=======================
The code execution vulnerability can be exploited by remote attackers without privileged application user account or 
user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below 
to continue.


PoC: iUSB Wifi UI - (foldername)

<div class="container">
      <div class="page-header">
        <h1>iUSB</h1>
      </div>
      <p>Drag & drop files on this window or use the "Upload Files…" button to upload new files.</p>
      <div id="alerts"></div>
      <div class="btn-toolbar">
        <button type="button" class="btn btn-primary fileinput-button">
          <span class="glyphicon glyphicon-upload"></span> Upload Files…
          <input id="fileupload" name="files[x]" multiple="" type="file">
        </button>
        <button type="button" class="btn btn-success" id="create-folder">
          <span class="glyphicon glyphicon-folder-close"></span> Create Folder…
        </button>
        <button type="button" class="btn btn-default" id="reload">
          <span class="glyphicon glyphicon-refresh"></span> Refresh
        </button>
      </div>
      <div class="panel panel-default uploading">
        <div class="panel-heading">File Uploads in Progress</div>
        <table class="table table-striped"><tbody id="uploads"></tbody></table>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading">
          <ol class="breadcrumb" id="path"></ol>
        </div>
        <table class="table table-striped"><tbody id="listing">./[CODE EXECUTION VULNERABILITY!];</tbody></table>
      </div>
      <p class="footer">iUSB 1.2</p>
    </div>


--- PoC Session Logs [POST] ---
Status: 200[OK]
POST http://192.168.2.104/create 
Load Flags[LOAD_BYPASS_CACHE  LOAD_BACKGROUND  ] Größe des Inhalts[2] Mime Type[application/json]
   Request Header:
      Host[192.168.2.104]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0]
      Accept[application/json, text/javascript, */*; q=0.01]
      Accept-Language[de,en-US;q=0.7,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      Content-Type[application/x-www-form-urlencoded; charset=UTF-8]
      X-Requested-With[XMLHttpRequest]
      Referer[http://192.168.2.104/]
      Content-Length[81]
      Connection[keep-alive]
      Pragma[no-cache]
      Cache-Control[no-cache]
   POST-Daten:
      path[./[CODE EXECUTION VULNERABILITY!];+%3C]
   Response Header:
      Server[WebUploader]
      Cache-Control[no-cache]
      Content-Length[2]
      Content-Type[application/json]
      Connection[Close]
      Date[Tue, 09 Dec 2014 19:03:58 GMT]
-
Status: 200[OK]
 GET http://192.168.2.104/./[CODE EXECUTION VULNERABILITY!]; 
Load Flags[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Größe des Inhalts[-1] Mime 
Type[application/x-unknown-content-type]
   Request Header:
      Host[192.168.2.104]
      User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.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, deflate]
      Connection[keep-alive]
   Response Header:
      Server[WebUploader]
      Date[Tue, 09 Dec 2014 19:04:58 GMT]
      Connection[Close]


Reference(s):
http://localhost/create 


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure restriction of the create folder name input field. Restrict the input by 
disallow of special chars.
Encode and parse the vulnerable path value that runs throught eh creat POST method request. Filter and parse also the 
iUSB file dir listing output with the vulnerable  name value.


Security Risk:
==============
The security risk of the of the code execution vulnerability in the create folder function of iUSB is estimated as 
high. (CVSS 8.8)


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:    magazine.vulnerability-db.com       - vulnerability-lab.com/contact.php                     - 
evolution-sec.com/contact
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
Programs:   vulnerability-lab.com/submit.php    - vulnerability-lab.com/list-of-bug-bounty-programs.php - 
vulnerability-lab.com/register/

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 GmbH]™



-- 
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com
CONTACT: research () vulnerability-lab com
PGP KEY: http://www.vulnerability-lab.com/keys/admin () vulnerability-lab com%280x198E9928%29.txt



_______________________________________________
Sent through the Full Disclosure mailing list
http://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: http://seclists.org/fulldisclosure/

Current thread: