Grub2 1.98/1.99/2.00/2.01/2.02 Rescue Shell auth.c grub_username_get access control
CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
---|---|---|
5.4 | $0-$5k | 0.00 |
A vulnerability was found in Grub2 1.98/1.99/2.00/2.01/2.02. It has been declared as problematic. This vulnerability affects the function grub_username_get
of the file auth.c of the component Rescue Shell. The manipulation with an unknown input leads to a access control vulnerability. The CWE definition for the vulnerability is CWE-264. As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:
Multiple integer underflows in Grub2 1.98 through 2.02 allow physically proximate attackers to bypass authentication, obtain sensitive information, or cause a denial of service (disk corruption) via backspace characters in the (1) grub_username_get function in grub-core/normal/auth.c or the (2) grub_password_get function in lib/crypto.c, which trigger an "Off-by-two" or "Out of bounds overwrite" memory error.
The issue has been introduced in 12/01/2009. The weakness was presented 12/14/2015 by Hector Marco and Ismael Ripoll as not defined posting (Blog). The advisory is shared for download at hmarco.org. This vulnerability was named CVE-2015-8370 since 11/26/2015. The attack needs to be approached locally. No form of authentication is required for a successful exploitation. Technical details and also a public exploit are known. The MITRE ATT&CK project declares the attack technique as T1068. Responsible for the vulnerability is the following code:
if (key == '\b')The advisory points out:
The fault (bug) is in the code of Grub since version 1.98 (December, 2009). The commit which introduced the fault was b391bdb2f2c5ccf29da66cecdbfb7566656a704d, affecting the grub_password_get() function. There are two functions which suffer the same integer underflow fault. The grub_username_get() and grub_password_get() located in grub-core/normal/auth.c and lib/crypto.c respectively. Both functions are equal except for a call to printf() in the grub_username_get(). The PoC described here is based only on exploiting the grub_username_get() to obtain a Grub rescue shell.
A public exploit has been developed by Hector Marco and been published immediately after the advisory. It is possible to download the exploit at hmarco.org. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 2204 days. During that time the estimated underground price was around $5k-$25k. The vulnerability scanner Nessus provides a plugin with the ID 87422 (CentOS 7 : grub2 (CESA-2015:2623)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family CentOS Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 124566 (Solaris 11.3 Support Repository Update (SRU) 4.5.0 Missing). The code used by the exploit is:
memset destination address = buf + cur_lenThe advisory illustrates:
To quickly check if your system is vulnerable, when the Grub ask you the username, press the Backspace 28 times. If your machine reboots or you get a rescue shell then your Grub is affected.
Applying a patch is able to eliminate this problem. The bugfix is ready for download at hmarco.org. A possible mitigation has been published 22 hours after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:
if (key == '\b' && cur_len)
The vulnerability is also documented in the vulnerability database at Tenable (87422). Additional details are provided at lifehacker.com. See 80389, 80403, 80401 and 80398 for similar entries.
Product
Name
Version
License
CPE 2.3
CPE 2.2
Screenshot
CVSSv4
VulDB CVSS-B Score: 🔍VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.9VulDB Meta Temp Score: 5.4
VulDB Base Score: 5.9
VulDB Temp Score: 5.4
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
AV | AC | Au | C | I | A |
---|---|---|---|---|---|
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
---|---|---|---|---|---|
unlock | unlock | unlock | unlock | unlock | unlock |
unlock | unlock | unlock | unlock | unlock | unlock |
unlock | unlock | unlock | unlock | unlock | unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Access controlCWE: CWE-264
CAPEC: 🔍
ATT&CK: 🔍
Local: Yes
Remote: No
Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Hector Marco
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
0-Day | unlock | unlock | unlock | unlock |
---|---|---|---|---|
Today | unlock | unlock | unlock | unlock |
Nessus ID: 87422
Nessus Name: CentOS 7 : grub2 (CESA-2015:2623)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
OpenVAS ID: 703421
OpenVAS Name: Debian Security Advisory DSA 3421-1 (grub2 - security update)
OpenVAS File: 🔍
OpenVAS Family: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: PatchStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍
Patch: hmarco.org
Timeline
12/01/2009 🔍11/26/2015 🔍
12/13/2015 🔍
12/14/2015 🔍
12/14/2015 🔍
12/14/2015 🔍
12/14/2015 🔍
12/15/2015 🔍
12/16/2015 🔍
12/16/2015 🔍
12/17/2015 🔍
07/01/2022 🔍
Sources
Advisory: RHSA-2015:2623Researcher: Hector Marco, Ismael Ripoll
Status: Not defined
Confirmation: 🔍
CVE: CVE-2015-8370 (🔍)
OVAL: 🔍
SecurityTracker: 1034422
Vulnerability Center: 55312 - Grub2 1.98 - 2.02 Local Security Bypass Vulnerability in grub_password_get(), High
SecurityFocus: 79358 - GNU GRUB2 CVE-2015-8370 Multiple Local Authentication Bypass Vulnerabilities
scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍
Entry
Created: 12/17/2015 09:28Updated: 07/01/2022 09:49
Changes: 12/17/2015 09:28 (83), 09/25/2018 12:56 (13), 07/01/2022 09:42 (4), 07/01/2022 09:47 (1), 07/01/2022 09:49 (1)
Complete: 🔍
No comments yet. Languages: en.
Please log in to comment.