Skip to main content
Be Bitwise

BLE Exploitation Techniques

Bluetooth & Wireless Attack Surfaces · Mobile Advanced Security track

10 min read

In this module

Tooling for BLE Analysis

You can't exploit what you can't see. BLE operates on 40 channels in the 2.4 GHz ISM band: three advertising channels (37, 38, 39) and 37 data channels. Capturing this traffic needs hardware that can monitor the right channels and software to decode whatever lands in the buffer.

Ubertooth One

The Ubertooth One is an open-source 2.4 GHz radio platform built for Bluetooth research, and it'll passively sniff BLE advertising and data channel packets. Combined with the ubertooth-btle tool, it grabs raw link-layer frames and pipes them straight into Wireshark.

It can also follow a specific BLE connection by snagging the CONNECT_IND packet — that one carries the hop increment, channel map, and CRC initialisation value — then tracking the connection across its frequency-hopping pattern. Without that, you don't see data channel traffic at all.

The Ubertooth is showing its age for BLE work, though. Its CC2400 radio only speaks the original 1 Mbit/s PHY, so it can't follow BLE 5 connections that switch to the 2M PHY, and most practitioners now reach for an nRF52840-based sniffer or Sniffle, an open-source sniffer firmware for cheap TI CC1352/CC26x2 boards that handles BLE 5 connections.

Nordic nRF Sniffer

Nordic Semiconductor's nRF Sniffer repurposes a cheap nRF52840 development board as a BLE packet sniffer. It plugs into Wireshark via a plugin and supports BLE 4.x and 5.x. For most practical assessments, it's the more accessible option: the hardware runs under twenty pounds, and the firmware is freely available.

BTLE Software Sniffer

When dedicated hardware isn't on hand, software-defined radio approaches using a HackRF or RTL-SDR with gr-bluetooth will capture BLE advertising packets. SDR setups struggle with connection following, though. The frequency-hop tracking demands timing precision they rarely deliver.

BLE Sniffing Limitations

BLE sniffing is fiddly. To capture a connection's data traffic, the sniffer has to witness the initial CONNECT_IND packet. Miss that, and the hop sequence and CRC init are gone, so the data traffic stays opaque. If the connection uses LE Secure Connections, the traffic is encrypted with an ECDH-derived key, and passive sniffing alone won't crack it.

GATT Enumeration

Once you've connected to a BLE device — and most of the time, that requires no authentication at all — GATT enumeration lays bare its entire data structure. Think of it as the BLE analogue of port scanning and service enumeration.

Discovery Process

A GATT client discovers a server's services and characteristics through a standardised sequence:

  1. Primary Service Discovery: The client reads the server's service list. Each service has a UUID, a handle range, and an optional include reference to other services.
  2. Characteristic Discovery: For each service, the client discovers characteristics — UUIDs, value handles, and properties (read, write, notify, indicate).
  3. Descriptor Discovery: For each characteristic, the client pulls the descriptors (CCCD for notifications, user description, format, etc.).

Practical Enumeration

Tools like bluetoothctl (Linux), nRF Connect (mobile app), Bettercap, and Python scripts built on the bleak library automate GATT enumeration. With current BlueZ:

bash
$ bluetoothctl
[bluetooth]# scan on # find the device's address
[bluetooth]# connect AA:BB:CC:DD:EE:FF
[bluetooth]# menu gatt
[bluetooth]# list-attributes AA:BB:CC:DD:EE:FF # services, characteristics, descriptors
[bluetooth]# select-attribute 00002a19-0000-1000-8000-00805f9b34fb
[bluetooth]# read

BlueZ has deprecated gatttool and hcitool, but you'll still meet them in older write-ups, so here's the same job the old way:

bash
# Using gatttool to enumerate a BLE device
$ gatttool -b AA:BB:CC:DD:EE:FF --primary
# Lists all primary services with handle ranges and UUIDs
$ gatttool -b AA:BB:CC:DD:EE:FF --characteristics
# Lists all characteristics with properties and value handles
$ gatttool -b AA:BB:CC:DD:EE:FF --char-read -a 0x0012
# Reads the value at handle 0x0012

During a security assessment, GATT enumeration surfaces:

  • Custom services (128-bit UUIDs) flagging vendor-specific functionality — likely attack surface.
  • Writable characteristics that might accept commands to drive the device.
  • Characteristics without security requirements, leaking data to anything that connects.
  • Device Information Service (UUID 0x180A), which spills firmware version, hardware revision, and manufacturer — handy for matching against known CVEs.

BLE Replay Attacks

A BLE replay attack records authenticated commands and fires them again later to trigger the same action. It works wherever the device leans on static authentication tokens, or skips sequence numbers and timestamps in its command protocol.

Attack Scenario: Smart Lock

Consider a BLE smart lock that authenticates the user's phone by receiving a write to a specific GATT characteristic. If the lock's protocol uses a static token:

  1. The attacker sniffs the BLE connection while the legitimate user unlocks the door.
  2. The attacker captures the write command (handle and value) sent to the lock's unlock characteristic.
  3. Later, the attacker connects to the lock and replays the exact same write command.
  4. The lock accepts the replayed command and unlocks.

Mitigation

Proper BLE authentication uses challenge-response: the lock sends a fresh random nonce, the phone signs it with a shared secret, and the lock verifies the signature. An old response is junk because the nonce moved on. Plenty of early consumer BLE kit — smart locks, garage door openers, car immobiliser dongles — shipped with static tokens and folded under replay.

Both locks, side by side. The attacker captures one owner session against each and replays the bytes later:

Try itNow make fresh_nonce return the same value every time, as a lock with a lazy RNG would, and replay again.
C (GCC 9.2.0)

BLE Relay Attacks

Relay attacks stretch BLE's effective range by parking two attacker devices between the parties that actually want to talk to each other. Where a replay is time-shifted, a relay carries traffic in real time.

Mechanism

  1. Attacker Device A is placed near the BLE peripheral (e.g., a smart lock).
  2. Attacker Device B is placed near the legitimate central device (e.g., the owner's phone).
  3. Device B advertises as the lock, tricking the phone into connecting.
  4. Device A connects to the real lock, posing as the phone.
  5. All traffic is relayed between the two attacker devices over a high-bandwidth link (WiFi, cellular).

The phone thinks it's talking to the lock down the hall. The lock thinks it's talking to the phone down the hall. The attacker is quietly bridging a gap that could be any distance at all.

That kills any proximity-based security assumption. A smart lock that unlocks "when the owner's phone is nearby" will happily unlock when the phone is actually kilometres away.

Some locks try to catch relays by timing a challenge and response. The sequence shows why that rarely works over BLE. The relay does add delay, but BLE only exchanges packets at connection events, which are 7.5 ms to 4 s apart. A few extra milliseconds vanish into the normal jitter. Signal strength is no help either: each attacker device sits right next to the device it's talking to, so both links look strong.

UWB distance bounding measures time of flight instead, where light covers about 30 cm per nanosecond. A relay that adds even a microsecond adds roughly 300 m to the measured distance. The proximity protocols lesson covers how that ranging is protected.

BtleJuice and GATTacker

BtleJuice and GATTacker are frameworks that automate BLE relay and MitM attacks. Both are Node.js tools from around 2016 that are no longer maintained and fight with current Node and BlueZ versions, so treat them as a description of the technique; btlejack and Sniffle-based setups cover similar ground today. GATTacker operates as follows:

  1. It scans the target BLE peripheral and clones its advertising data and GATT service structure.
  2. It advertises as a clone of the target device, attracting the victim's central (phone/app).
  3. When the victim connects, GATTacker forwards all GATT reads, writes, and notifications to the real peripheral.
  4. The attacker can inspect, modify, or inject traffic at any point in the relay chain.
BLE MitM with GATTacker

GATTacker runs a full man-in-the-middle on BLE connections. It clones the target peripheral's advertisement and GATT structure, intercepts the victim's connection, and shuttles traffic to the real device. Most BLE connections never use authenticated pairing — Just Works is the default — so the victim's phone has no way to confirm what it's actually talking to. From there, GATTacker can log, modify, or inject any GATT read, write, or notification.

SweynTooth Vulnerabilities

SweynTooth is a family of 12 vulnerabilities disclosed in 2020 across BLE SoC (System on Chip) implementations from a who's who of vendors: Texas Instruments, NXP, Cypress, Dialog Semiconductor, STMicroelectronics, Microchip. These aren't protocol design flaws. They're implementation bugs sitting deep inside the link-layer and security manager firmware that ships on millions of chips.

Categories

The 12 bugs fall into three buckets:

  • Crash vulnerabilities: Malformed link-layer packets tip the BLE stack over, taking the device offline until somebody power-cycles it.
  • Deadlock vulnerabilities: Specific packet sequences send the stack into an infinite loop, freezing the device.
  • Security bypass vulnerabilities: The nasty bucket. Certain implementations could be tricked into skipping the encryption setup phase entirely, letting an attacker read and write GATT characteristics in plaintext even when the device claimed to require encryption.

Impact

Roughly 480 BLE products were affected: glucose monitors, insulin pumps, pacemaker programmers, smart home gadgets, industrial sensors. The security-bypass variant was especially grim for medical devices where GATT characteristics control dosage or operating mode.

It also exposed a systemic problem. BLE security doesn't just rest on the protocol spec — it rests on every vendor getting their implementation right. A device can demand the strongest pairing method and encryption it likes, but if the underlying stack has a bug, those guarantees evaporate quietly.

Practical Assessment Methodology

A BLE security assessment usually walks through six stages:

  1. Reconnaissance: Scan for advertisements with bluetoothctl or nRF Connect. Log device names, UUIDs, and advertising data. Note whether the device uses a fixed address or a rotating resolvable private address: a fixed one lets anyone track it.
  2. GATT enumeration: Connect, then list every service, characteristic, and descriptor. Flag custom UUIDs and anything writable. Check which characteristics demand pairing, and whether the device bonds (stores keys) or lets any central re-pair at will.
  3. Traffic capture: Run Ubertooth or nRF Sniffer against a legitimate session. If the link is encrypted, grab the pairing exchange. LE Legacy pairing with Just Works or a six-digit passkey falls to crackle, which recovers the keys from the capture; LE Secure Connections uses ECDH and doesn't.
  4. Replay testing: Replay captured write commands. If the device honours them, freshness protection is missing.
  5. Fuzzing: Lob malformed values at writable characteristics — oversized data, wrong types, boundary values. Watch for crashes, sloppy error handling, and weird state changes.
  6. Firmware analysis: When you can extract firmware (debug interfaces, captured OTA updates), reverse the command protocol for the deeper picture.
Key Concept
BLE Assessment Workflow

A systematic BLE security assessment progresses from passive reconnaissance (scanning advertisements), through GATT enumeration (mapping services and characteristics), to active testing (replay attacks, traffic manipulation, fuzzing). The assessment identifies whether the device uses authenticated pairing, whether GATT characteristics enforce security requirements, whether the command protocol includes replay protections, and whether the BLE stack implementation holds up under malformed input.