Exploit-DB #31790
Description: Barracuda Firewall 6.1.0.016 - Multiple Vulnerabilities
Type: webapps
Platform: hardware
Date: 2014-02-20
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
Barracuda Bug Bounty #30 Firewall - Multiple Persistent Web Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1065

Barracuda Networks Security ID (BNSEC): BNSEC-2067

Video: http://www.vulnerability-lab.com/get_content.php?id=1208

View Video: http://www.youtube.com/watch?v=-yQVyik3Ggo


Release Date:
=============
2014-02-19


Vulnerability Laboratory ID (VL-ID):
====================================
1065


Common Vulnerability Scoring System:
====================================
3.9


Product & Service Introduction:
===============================
The Barracuda Firewall goes beyond traditional network firewalls and UTMs by providing powerful network security, granular layer 7 
application controls, user awareness and secure VPN connectivity combined with cloud-based malware protection, content filtering 
and reporting. It alleviates the performance bottlenecks in Unified Threat Management (UTM) appliances through intelligent integration 
of on-premise and cloud-based technologies. While the powerful on-premises appliance is optimized for tasks like packet forwarding and 
routing, Intrusion Prevention (IPS), DNS/DHCP services and site-to-site connectivity; CPU intensive tasks like virus scanning, content 
filtering and usage reporting benefit from the scalable performance and elasticity of the cloud.

(Copy of the Vendor Homepage: https://www.barracuda.com/products/firewall )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple persistent input validation web vulnerabilities in the Barracuda Web Firewall appliance web-application.


Vulnerability Disclosure Timeline:
==================================
2013-09-04:	Researcher Notification & Coordination (Benjamin Kunz Mejri)
2013-09-05:	Vendor Notification (Barracuda Networks Security Team - Bug Bounty Program)
2013-09-26:	Vendor Response/Feedback (Barracuda Networks Security Team - Bug Bounty Program)
2014-02-17:	Vendor Fix/Patch (Barracuda Networks Developer Team) [Coordinated Disclosure]
2014-02-19:	Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Barracuda Networks
Product: Web Firewall 6.1.0.016 - Models: X100; X200; X300; X400 & X600


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Technical Details & Description:
================================
Multiple persistent input validation web vulnerabilities are detected in the Barracuda Networks Web Firewall X300 (v6.1.0.016) Appliance Web Application.
The validation web vulnerability allows remote attackers or local low privileged application user accounts to inject (persistent) own malicious script 
codes on application-side of the vulnerable module.

The vulnerability is located in the firewall menu when processing to create a custom user object with manipulated create user expresson 
group credentials. Remote attackers can inject script codes to the `Login Name` & `Group Match pattern text` input fields. After the inject 
the attacker can save the input via add (POST Method) to execute the persistent code in the edit listing. After the first add (inject) in the 
edit formular the remote attacker is also able to add the input via `add to the second selection` listing to execute the persistent code in 
both listing values of the bottom page. Remote attackers are able to add the persistent injected context to the main custom user objects 
module in the predefined user objects listing. The attack vector is persistent and the request method is POST. The security risk of the 
persistent input validation web vulnerabilities are estimated as medium with a cvss (common vulnerability scoring system) count of 3.8(+)|(-)3.9.

Exploitation of the vulnerability requires a low privileged application user account and low user interaction. Successful exploitation results 
in session hijacking, persistent phishing, persistent external redirects & persistent manipulation of affected or connected web module context.


Vulnerable Application(s):
				[+] Firewall (WAF) Appliance Application (X300Vx  v6.1.0.016)

Vulnerable Module(s):
				[+] Firewall  >  User Objects > Custom User Objects > Create User Object > Create User Expression

Vulnerable Parameter(s):
				[+] login name
				[+] pattern - Group Match

Affected Module(s):
				[+] Firewall > User Objects > Custom User Objects > Predefined User Objects Listing
				[+] Firewall  >  User Objects > Custom User Objects > Create User Object > Create User Expression (Group)


Proof of Concept (PoC):
=======================
The persistent input validation web vulnerabilities can be exploited by remote attackers with low privileged application user account and low user interaction. 
For security demonstration or to reproduce the vulnerability follow the provided information and steps below.

Manual steps to reproduce the vulnerability:

1. Login with the user account to the barracuda networks web firewall appliance application
2. After the login open the firewall and switch to the User Objects > Custom User Objects > Create User Object module
3. Start creating via user expression a group
4. Include a random name for the main mask, and add your script code as payload to the login name and pattern (group match) input fields
5. Click the checkbox for the group match and click the add button to save the input
6. The code executes in the add box  context itself and the group match or pattern values listing (bottom) [3 times]
7. Now, the attacker is also able to add the already injected persistent context to the main menu listing by a click of the add button to save at the bottom
8. The script code execution occurs when processing to watch t