Exploit-DB #34148
Description: Barracuda Networks #35 Web Firewall 610 6.0.1 - Filter Bypass / Persistent
Type: webapps
Platform: multiple
Date: 2014-07-23
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
Barracuda Networks #35 Web Firewall 610 v6.0.1 - Filter Bypass & Persistent Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1101


Barracuda Networks Security ID (BNSEC): BNSEC-2361
http://www.barracuda.com/kb?id=[PII_REDACTED]13m4O

Solution #00006619
BNSEC-02361: Authenticated persistent IVE in Barracuda Web Filter v6.0.1


Release Date:
=============
2014-07-22


Vulnerability Laboratory ID (VL-ID):
====================================
1101


Common Vulnerability Scoring System:
====================================
3.7


Product & Service Introduction:
===============================
The Barracuda Web Filter is an integrated content filtering, application blocking and malware protection solution that is powerful, 
easy to use and affordable for businesses of all sizes. It enforces Internet usage policies by blocking access to Web sites and 
Internet applications that are not related to business, and it easily and completely eliminates spyware and other forms of malware 
from your organization. No more costly staff time lost repairing infected computers.

( Copy of the Vendor Homepage: https://www.barracuda.com/products/webfilter )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Research Team discovered multiple persistent input validation web vulnerabilities and a filter bypass issue in 
the Barracuda Networks WebFilter 610-Vx appliance web-application.


Vulnerability Disclosure Timeline:
==================================
2013-12-27:	Researcher Notification & Coordination (Benjamin Kunz Mejri)
2013-12-28:	Vendor Notification (Barracuda Networks Security Team - Bug Bounty Program)
2014-01-19:	Vendor Response/Feedback (Barracuda Networks Security Team - Bug Bounty Program)
2014-07-15:	Vendor Fix/Patch (Barracuda Networks Developer Team) [Coordination: Dave Farrow]
2014-07-22:	Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Barracuda Networks
Product: WebFilter Appliance Web-Application 6.0.1.009 - X210 X310 X410 X510 X610 X710 X810 X910 X1010


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Technical Details & Description:
================================
Multiple persistent input validation web vulnerabilities and a filter bypass has been discovered in the Barracuda Networks WebFilter Model 610Vx appliance web-application.
The vulnerability allows remote attackers to inject own malicious script codes on the application-side of the affected service, module or function.

The vulnerability are located in the  `domain names`, `grid__data in grid_columns` and `x-grid3-cell-inner x-grid3-col-name` 
values of the `Basic > Reports` module. Remote attackers are able to inject own script code as domain name to execute the 
context in the show advanced options menu listing (+plus). The attack vector is persistent located on the application-side 
and the request method to inject is POST.

To bypass the invalid domain exception the attacker first need to include a valid domain, in the second step he change the domain name value by a 
session tamper. Reason behind the technique is that the input field validation is separatly done to the request method validation. The restriction 
of the invalid input field check can be bypassed by usage of a session tamper to change the input field context live after the first direct input 
encode of the web filter application. Another problem is located in the same module which affects the buttom name item listing.

The security risk of the persistent input validation web vulnerability and fitler bypass is estimated as medium with a cvss (common vulnerability scoring 
system) count of 3.7. Exploitation of the persistent web vulnerability requires low user interaction and a local low privileged web-application account. 
Successful exploitation of the vulnerability results in session hijacking (customers), persistent phishing, persistent external redirects or persistent 
manipulation of connected or affected module context.


Request Method(s):
				[+] GET
				[+] POST

Vulnerable Module(s):
				[+] Basic > Reports > Advanced Options > Show Advanced Options

Vulnerable Input Field(s):
				[+] Add Domain

Vulnerable Parameter(s):
				[+] domain name
				[+] grid__data in grid_columns
				[+] x-grid3-cell-inner x-grid3-col-name

Affected Module(s):
				[+] Reports Module Index
				[+] Reports Module Advanced Options List
				[+] Buttom Name Item List

Affected Version(s):
				[+] All versions > Web-Filter applicance web-application


Proof of Concept (PoC):
=======================
The persistent input validation web vulnerability can be exploited by remote attackers with a low privileged web-application user account and low or medium 
user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.


--- PoC Session Logs Request/Response Input Execution ---

Status: 200[OK]
GET https://webfilter.ptest.localhost:6317/cgi-mod/index.cgi?auth_type=Local&et=[PII_REDACTED]&locale=en_US&[CREDENTIAL_REDACTED]_tab=BASIC&realm=&role=&secondary_tab=reports&user=guest 
Load Flags[VALIDATE_ALWAYS LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Content Size[160284] Mime Type[text/html]
   Request Headers:
      Host[webfilter.ptest.localhost:6317]
      User-Agent[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.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]
      Connection[keep-alive]
      Cache-Control[max-age=0]
   Response Hea