Telekom Prepaid Shop - Multiple Persistent Vulnerabilities

2017-09-05T00:00:00
ID VULNERLAB:2051
Type vulnerlab
Reporter Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (http://www.vulnerability-lab.com/show.php?user=Benjamin%20K.M.)
Modified 2017-09-05T00:00:00

Description

                                        
                                            Document Title:
===============
Telekom Prepaid Shop - Multiple Persistent Vulnerabilities


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

Telekom Security ID: 20170407_TLu_04


Release Date:
=============
2017-09-05


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


Common Vulnerability Scoring System:
====================================
4.3


Vulnerability Class:
====================
Cross Site Scripting - Persistent


Current Estimated Price:
========================
1.000€ - 2.000€


Product & Service Introduction:
===============================
https://prepaid.telekom-angebot.de/prepaid/all


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered multiple persistent cross site scripting web vulnerabilities in the official Telekom Angebot Prepaid online service web-application.


Vulnerability Disclosure Timeline:
==================================
2017-04-07: Researcher Notification & Coordination (Benjamin Kunz Mejri - Evolution Security GmbH)
2017-04-08: Vendor Notification (Telekom Cert - Security Department)
2017-04-09: Vendor Response/Feedback (Telekom Cert - Security Department)
2017-07-20: Vendor Fix/Patch (Telekom Service Developer Team)
2017-08-01: Security Acknowledgements (Telekom Cert - Security Department)
2017-09-05: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
Telekom AG
Product: Prepaid Shop - Online Service (Web-Application) 2017 Q1


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


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


Technical Details & Description:
================================
Multiple persistent cross site scripting vulnerabilities has been discovered in the official Telekom Angebot Prepaid online service web-application.
The vulnerability typ allows remote attackers to inject own malicious script codes on the application-side of the vulnerable service or affected module.

The vulnerability affects the order and payment process in case of issuing an active contract. The vulnerabilities are located in the customer credentials 
input fields of the prepaid form file. The vulnerability is located in the `Firstane- & Lastname`, `Adress`, `Location` and `Count` input fields of the 
`/prepaid/form` file POST method request. Remote attackers are able to inject own malicious script codes by usage of the vulnerable ´registration order´ 
process to manipulate the backend or the frontend of the web-application. The first execution occurs after the temporarily save within the ´Payment or 
Order Preview´. After that the execute occurs in the ´email notification body´, ´the backend´ and the user front end after registration confirm.

The security risk of the cross site scripting web vulnerabilities are estimated as medium with a common vulnerability scoring system count of 4.3. 
Exploitation of the persistent cross site scripting web vulnerabilities requires no privilege application user account and only low user interaction. 
Successful exploitation of the vulnerability results in persistent phishing attacks, session hijacking, persistent external redirect to malicious sources 
and persistent manipulation of affected or connected web module context.

Request Method(s):
[+] POST 

Vulnerable Function(s):
[+] Registration to Order Process

Vulnerable File(s):
[+] form

Vulnerable Parameter(s):
[+] First- & Lastname
[+] Location
[+] Adress
[+] Count

Affected Module(s):
[+] Frontend
[+] Backend
[+] Outgoing Mail Notify


Proof of Concept (PoC):
=======================
The persistent input validation web vulnerabilities can be exploited as cross site scripting issue by remote attackers without privilege web-application user accounts and with low user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.


Manual steps to reprodue the vulnerability ...
1. Open the service web-application url to the prepaid shop
2. Choose the order categories
3. Submit the request
Note: Now the user is redirected to the registratio/order form
4. Inject test payloads to the vulnerable marked input fields
5. Save the content via form via POST request to confirm
6. The execute occurs visible in the preview of the order credentials issued via telekom to the main dbms
7. Successful reproduce of the vulnerability!


Note: 
Please preview as well the contract email notification after confirm and the backend were the data is permanently displayed. 
Both are not securly sanitized via parse mechanism or filter procedure.



PoC: Vulnerable Source (Execution Point) - First- & Lastname
<div class="fieldset " id="fieldset-privateCustomer"><div class="legend">Kundendaten</div>
<div class="subform">
<div class="form-group" id="privateCustomer-name-group">
<div class="input-line" id="privateCustomer-anrede-line"><div id="privateCustomer-anrede-label">
<label for="privateCustomer-anrede" class="input-label optional">Anrede</label></div>
<div class="input-field">
Herr</div></div>
<div class="input-line" id="privateCustomer-name-line"><div id="privateCustomer-vorname-label">
<label for="privateCustomer-vorname" class="input-label optional">Vor- und Nachname</label></div>
<div class="input-group"><div class="input-field">
">"<[PERSISTENT INJECTED SCRIPT CODE EXECUTION POINT!]></div><div class="input-field">
">"<[PERSISTENT INJECTED SCRIPT CODE EXECUTION POINT!]></div></div></div>
<div class="input-line" id="privateCustomer-geburtsdatum-line"><div id="privateCustomer-geburtsdatum-label">
<label for="privateCustomer-geburtsdatum" class="input-label optional">Geburtsdatum</label></div>
<div class="input-field">06.06.1983</div></div></div>
<div class="form-group" id="privateCustomer-anchrift-group">



--- PoC Session Logs (POST) ---
Status: 302[Found]
POST https://prepaid.telekom-angebot.de/prepaid/form
Mime Type[text/html]
   Request Header:
      Host[prepaid.telekom-angebot.de]
      User-Agent[Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Referer[https://prepaid.telekom-angebot.de/prepaid/form]
      Cookie[portalcluster=www3-hh; PHPSESSID=hpgk2pk7pvc47vei56o3o8lcd6; 
NSC_JOf1wyzkebtxa2gcuap1ddcf0v1vlct=ffffffff096d7e9545525d5f4f58455e445a4a42378b; 
_pk_id.20.2f68=55c672ca4fae6f44.1491498713.1.1491498920.1491498713.; 
_pk_ref.20.2f68=%5B%22%22%2C%22%22%2C1491498713%2C%22http%3A%2F%2Fnl.telekom-angebot.de%2FnlsendEngineServer%2Fnl
sendBrowserView%3FnseTnId%3D6e841e5b992ff44e03f6f1d6c14b584c3ad5cb7e7c4eb9ca12fea94c101fa5b2a4eefd%22%5D; _pk_ses.20.2f68=*]
      Connection[keep-alive]
      Upgrade-Insecure-Requests[1]
   POST-Daten:
      privateCustomer%5Banrede%5D[Herr]
      privateCustomer%5Bvorname%5D[PERSISTENT PAYLOAD INJECTION ATTACK!]
      privateCustomer%5Bnachname%5D[PERSISTENT PAYLOAD INJECTION ATTACK!]
      privateCustomer%5Bgeburtsdatum%5D[06.06.1983]
      privateCustomer%5Bstrasse%5D[PERSISTENT PAYLOAD INJECTION ATTACK!]
      privateCustomer%5Bhausnummer%5D[PERSISTENT PAYLOAD INJECTION ATTACK!]
      privateCustomer%5Bpostleitzahl%5D[PERSISTENT PAYLOAD INJECTION ATTACK!]
      privateCustomer%5Bort%5D[PERSISTENT PAYLOAD INJECTION ATTACK!]
      privateCustomer%5Bemail%5D[bkm%40evolution-sec.com]
      privateCustomer%5Btelefonvorwahl%5D[0152]
      privateCustomer%5Btelefonnr%5D[32154829571851]
      privateCustomer%5Bstaatsangeh%C3%B6rigkeit%5D[DE]
      portedNumbers%5Buseportednumbers%5D[0]
      portedNumbers%5Bprovider%5D[ALMO]
      portedNumbers%5Btelefonnummervorwahl%5D[]
      portedNumbers%5Btelefonnummer%5D[]
      portedNumbers%5BdesiredPortingType%5D[ASAP]
      portedNumbers%5BdesiredDate%5D[]
      portedNumbers%5BcontractEnd%5D[]
      portedNumbers%5Bagreement%5D[1]
   Response Header:
      Server[Apache]
      X-Powered-By[PHP/5.5.9-1ubuntu4.21]
      Location[https://prepaid.telekom-angebot.de/prepaid/confirm]
      Keep-Alive[timeout=5, max=100]
      Connection[Keep-Alive]
      Content-Type[text/html]
      Set-Cookie[portalcluster=www3-hh; path=/NSC_JOf1wyzkebtxa2gcuap1ddcf0v1vlct=ffffffff096d7e9545525d5f4f58455e445a4a42378b;Version=1;Max-Age=10800;path=/;secure;httponly]
-
Status: 200[OK]
GET https://prepaid.telekom-angebot.de/prepaid/confirm
Mime Type[text/html]
   Request Header:
      Host[prepaid.telekom-angebot.de]
      User-Agent[Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Referer[https://prepaid.telekom-angebot.de/prepaid/form]
      Cookie[portalcluster=www3-hh; PHPSESSID=hpgk2pk7pvc47vei56o3o8lcd6; 
NSC_JOf1wyzkebtxa2gcuap1ddcf0v1vlct=ffffffff096d7e9545525d5f4f58455e445a4a42378b; 
_pk_id.20.2f68=55c672ca4fae6f44.1491498713.1.1491498920.1491498713.; 
_pk_ref.20.2f68=%5B%22%22%2C%22%22%2C1491498713%2C%22http%3A%2F%2Fnl.telekom-angebot.de%2FnlsendEngineServer%2Fnl
sendBrowserView%3FnseTnId%3D6e841e5b992ff44e03f6f1d6c14b584c3ad5cb7e7c4eb9ca12fea94c101fa5b2a4eefd%22%5D; _pk_ses.20.2f68=*]
      Connection[keep-alive]
      Upgrade-Insecure-Requests[1]
   Response Header:
      Server[Apache]
      X-Powered-By[PHP/5.5.9-1ubuntu4.21]
      Vary[Accept-Encoding]
      Keep-Alive[timeout=5, max=99]
      Connection[Keep-Alive]
      Content-Type[text/html]
      Set-Cookie[portalcluster=www3-hh; path=/NSC_JOf1wyzkebtxa2gcuap1ddcf0v1vlct=ffffffff096d7e9545525d5f4f58455e445a4a42378b;Version=1;Max-Age=10800;path=/;secure;httponly]


Reference(s):
https://prepaid.telekom-angebot.de/
https://prepaid.telekom-angebot.de/prepaid/
https://prepaid.telekom-angebot.de/prepaid/all
https://prepaid.telekom-angebot.de/prepaid/error
https://prepaid.telekom-angebot.de/prepaid/form
https://prepaid.telekom-angebot.de/prepaid/confirm


Solution - Fix & Patch:
=======================
1. Parse the input field or filter the content by an escape to prevent the injection point
2. Restrict the input fields of the `form` file by disallowing the usage of special chars
3. Parse in all output sections the vulnerable context of the input fields to prevent further exploitation via frontend or backend


Security Risk:
==============
The security risk of the cross site scripting web vulnerabilities in the telekom prepaid shop application is estimated as medium. (CVSS 4.3)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (http://www.vulnerability-lab.com/show.php?user=Benjamin%20K.M.)


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 Labs or its 
suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental
or consequential 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. We have no need for criminal activities or membership requests. We do not publish advisories 
or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails, 
phone numbers, conversations or anything else to journalists, investigative authorities or private individuals. 

Domains:    www.vulnerability-lab.com		- www.vulnerability-db.com					- www.evolution-sec.com
Programs:   vulnerability-lab.com/submit.php 	- vulnerability-lab.com/list-of-bug-bounty-programs.php 	- vulnerability-lab.com/register.php
Feeds:	    vulnerability-lab.com/rss/rss.php 	- vulnerability-lab.com/rss/rss_upcoming.php 			- vulnerability-lab.com/rss/rss_news.php
Social:	    twitter.com/vuln_lab		- facebook.com/VulnerabilityLab 				- youtube.com/user/vulnerability0lab

Any modified copy or reproduction, including partially usages, of this file, resources or information 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@) to get an ask permission.

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