WiFi Drive CR v1.0 iOS - Persistent Filename Dir List Vulnerability

2015-10-25T00:00:00
ID SECURITYVULNS:DOC:32588
Type securityvulns
Reporter Securityvulns
Modified 2015-10-25T00:00:00

Description

Document Title:

WiFi Drive CR v1.0 iOS - Persistent Filename Dir List Vulnerability

References (Source):

http://www.vulnerability-lab.com/get_content.php?id=1595

Release Date:

2015-09-23

Vulnerability Laboratory ID (VL-ID):

1595

Common Vulnerability Scoring System:

3.8

Product & Service Introduction:

Files can be uploaded with any browser. Start the WiFi Drive web server from application and connect to it using any browser. Use the iPod/iPhone`s/iPad`s available disk space to carry any files. Use your iPhone as a normal shared network drive!

(Copy of the Homepage: https://itunes.apple.com/us/app/wifi-drive-+-cr-my-external/id979129415 )

Abstract Advisory Information:

The Vulnerability Laboratory Core Research Team discovered an application-side exception web vulnerability in the official WiFi Drive + CR v1.0 iOS mobile web-application.

Vulnerability Disclosure Timeline:

2015-09-23: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Published

Affected Product(s):

DONG JOO CHO Product: WiFi Drive + CR - Mobile WiFi (Web-Application) 1.0

Exploitation Technique:

Remote

Severity Level:

Medium

Technical Details & Description:

A persistent input validation web vulnerability has been discovered in the official WiFi Drive + CR v1.0 iOS mobile web-application. The vulnerability allows remote attacker to inject malicious persistent script codes to the application-side of the mobile application.

The vulnerability is located in the filename value of the upload files module POST method request. Remote attackers can manipulate the filename validation in the POST method request to trick the application in an execution of script codes via index - exception-handling. After processing to inject the exception of the file validation occurs and redisplays the injected context. Thus results in a final application-side post inject vulnerability. The attack vector of the issue is located on the application-side and the request method to inject the payload is POST.

The security risk of the application-side web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.6. Exploitation of the application-side web vulnerability requires no privilege web-application user account and only low or medium user interaction. Successful exploitation of the vulnerabilities results in persistent phishing, session hijacking, persistent external redirect to malicious sources and application-side manipulation of affected or connected module context.

Request Method(s): [+] POST

Vulnerable Module(s): [+] Upload Files

Vulnerable Parameter(s): [+] filename

Affected Module(s): [+] Index - Exception handling (File Validation > Upload)

Proof of Concept (PoC):

The remote vulnerability can be exploited by remote attackers without privilege web-application user account and with low user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

PoC: localhost (Index) <div class="container"> <div class="page-header"> <h1>WiFi Drive</h1></div> <p>Drag & drop files on this window or use the "Upload Files…" button to upload new files.</p> <div id="alerts"> <div class="alert alert-danger alert-dismissable"> <button type="button" class="close" data-dismiss="alert">?</button> <strong>Internal Server Error: </strong>Failed uploading "[PERSISTENT SCRIPT CODE INJECT VULNERABILITY!]2.png" to "null"</div> <div class="alert alert-danger alert-dismissable"> <button type="button" class="close" data-dismiss="alert">?</button> <strong>Internal Server Error: </strong>Failed uploading "3.png" to "null" </div> <div class="alert alert-danger alert-dismissable"> <button type="button" class="close" data-dismiss="alert">?</button> <strong>Internal Server Error: </strong>Failed uploading "4.png" to "null" </div> </div> <div class="btn-toolbar"> <button type="button" class="btn btn-primary fileinput-button" id="upload-file"> <span class="glyphicon glyphicon-upload"></span> Upload Files… <input id="fileupload" name="files[]" 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 style="display: none;" 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"></tbody></table> </div> <p class="footer">WiFi Drive 1.0</p> </div>

--- PoC Sessin Logs [POST] --- Status: 500[Internal Server Error] POST http://localhost/upload Load Flags[LOAD_BYPASS_CACHE ] Gro?e des Inhalts[276] Mime Type[text/html] Request Header: Host[localhost] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.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] X-Requested-With[XMLHttpRequest] Referer[http://localhost/] Content-Length[826] Content-Type[multipart/form-data; boundary=---------------------------140892324816617] Connection[keep-alive] Pragma[no-cache] Cache-Control[no-cache] POST-Daten: POST_DATA[-----------------------------140892324816617 Content-Disposition: form-data; name="path" null -----------------------------140892324816617 Content-Disposition: form-data; name="files[]"; filename="[PERSISTENT SCRIPT CODE INJECT VULNERABILITY!]2.png" Content-Type: image/png

Solution - Fix & Patch:

The vulnerability can be patched by a secure encode and parse of the vulnerability filename value. Restrict the input and disallow special chars but also prepare to encode the output location in the exception that displays the input context.

Security Risk:

The security risk of the persistent input validation web vulnerability in the exception-handling of the interface is estimated as medium. (CVSS 3.6

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 © 2015 | 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