Barracuda WAF V360 Firmware Early Boot Root Shell

CVE Category Price Severity
CVE-XXXX-XXXX CWE-489 $5000 Critical
Author Risk Exploitation Type Date
Unknown Critical Local 2017-07-07
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H 0.02192 0.50148

CVSS vector description

Our sensors found this exploit at:

Below is a copy:

Barracuda WAF V360 Firmware Early Boot Root ShellKL-001-2017-010 : Barracuda WAF Early Boot Root Shell

Title: Barracuda WAF Early Boot Root Shell
Advisory ID: KL-001-2017-010
Publication Date: 2017.07.06
Publication URL:

1. Vulnerability Details

     Affected Vendor: Barracuda
     Affected Product: Web Application Firewall V360
     Affected Version: Firmware v8.0.1.014
     Platform: Embedded Linux
     CWE Classification: CWE-489: Leftover Debug Code
     Impact: Root Access
     Attack vector: Grub

2. Vulnerability Description

     Firmware reversing of the Barracuda Web Application Firewall
     uncovered debug features that should have been removed on the
     production images. Appending a debugging statement onto a grub
     configuration line leads to an early boot root shell.

3. Technical Description

     After the initramfs image has been decrypted (see,
     some extra kernel command-line options are checked for by init.

       # cat init|more
       Some interesting things you can do at the kernel command line:

          * oldscheme - Choose the "old" partitioning scheme.
          * decrypt - Specify that the main partitions are encrypted.
          * shell - Run /sbin/init when we're done setting things up.
          * wyldstallyns - (soon) better debugging

     Investigating them further, we find a specific comparison looking for

       # grep -ri "wyldstallyns" *
       lib/Barracuda/Preboot/        $self->{WYLDSTALLYNS} = 1 if $cmd eq "wyldstallyns=69dude";

     This perl module is imported and used during system init.

       # grep "Barracuda::Preboot::Utils" init
       use Barracuda::Preboot::Utils qw/try catch/;

     If the kernel line contains the debugging statement, a DEBUG variable is set to one.

       # cat lib/Barracuda/Preboot/
       $self->{DEBUG}                  = 1 if $self->{WYLDSTALLYNS};

     This variables determines whether or not the bash shell is executed during early boot.

       # cat init
       eval {
           init( $dialog, $init, $iso );
           main( $dialog, $init, $iso, $tools );
           boot( $dialog, $init, $iso );
       } or do {
           if ( defined $init->{DEBUG} ) {
               print $@;
               exec "/bin/bash";
           else {

4. Mitigation and Remediation Recommendation

     The vendor has patched this vulnerability in the lastest
     virtual appliance release.

5. Credit

     This vulnerability was discovered by Matt Bergin (@thatguylevel)
     of KoreLogic, Inc. and Joshua Hardin.

6. Disclosure Timeline

     2016.12.20 - KoreLogic sends vulnerability report and PoC to
     2016.12.21 - Barracuda acknowledges receipt of the vulnerability
     2017.01.09 - Barracuda informs KoreLogic that they are working
                  on remediation for this issue.
     2017.01.26 - Barracuda notifies KoreLogic that they do not
                  consider this to be a security vulnerability, but
                  intend to change the hardcoded credentials.
                  Barracuda also asks for additional time beyond the
                  standard 45 business day embargo to address this
                  and other issues reported by KoreLogic.
     2017.02.27 - 45 business days have elapsed since the issue was
     2017.04.10 - 75 business days have elapsed since the issue was
     2017.05.15 - 100 business days have elapsed since the issue was
     2017.05.24 - Barracuda updates KoreLogic on the status of the
                  remediation efforts.
     2017.06.13 - 120 business days have elapsed since the issue was
     2017.06.27 - Barracuda informs KoreLogic that the issue has
                  been fixed in the latest release of the WAF
                  virtual appliance.
     2017.07.06 - KoreLogic public disclosure.

7. Proof of Concept

     Start by rebooting, hit 'e' during the grub boot menu. When
     prompted for credentials, provide: root / bimg. Now, on the
     linux line append wyldstallyns=69dude

     Hit F10 when finished.

     During the boot process you will be prompted with: Paused

     When you type exit, you are dropped into a root shell.


The contents of this advisory are copyright(c) 2017
KoreLogic, Inc. and are licensed under a Creative Commons
Attribution Share-Alike 4.0 (United States) License:

KoreLogic, Inc. is a founder-owned and operated company with a
proven track record of providing security services to entities
ranging from Fortune 500 to small and mid-sized companies. We
are a highly skilled team of senior security consultants doing
by-hand security assessments for the most important networks in
the U.S. and around the world. We are also developers of various
tools and resources aimed at helping the security community.

Our public vulnerability disclosure policy is available at:

Copyright ©2024 Exploitalert.

All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use.