Section 21.2

OASIS: placing an IDS inside a BLE controller

Full name: OASIS is a name that the paper does not spell out. The paper’s title is “OASIS: An Intrusion Detection System Embedded in Bluetooth Low Energy Controllers”. In the title of this entry, IDS means intrusion detection system and BLE §7.1 means Bluetooth Low Energy.

What it is

OASIS is a framework that builds an intrusion detection system (IDS), software that watches traffic for signs of attack, into the Controller §7.4 of a Bluetooth Low Energy (BLE) device. The Controller, usually the radio chip and its software, runs the radio and the lowest protocol layers. Romain Cayre, Vincent Nicomette, Guillaume Auriol, Mohamed Kaâniche and Aurélien Francillon published it in 2024 at the Asia Conference on Computer and Communications Security (ASIA CCS). It addresses attacks on those layers, which are hard to observe from outside.

Basis of this account

This account rests on the authors’ version of the paper, a 16-page PDF posted by the first author’s institute (https://www.eurecom.fr/publication/7624). Its text was read in full: Sections 1 to 10 and Appendices A to D. The bar values of Figure 5 were read from the figure; the plots in the appendices were not examined. The published version is in the proceedings of ASIA CCS 2024, pages 700 to 715 (https://doi.org/10.1145/3634737.3645004). Its title, authors and page numbers were checked against the record that the publisher registered with Crossref, the agency that registers the identifiers of scholarly publications; its text was not compared. The timing rule used in the worked example was also checked in the Link Layer §7.6 part of the Bluetooth Core Specification, versions 5.4 and 6.2. The project’s source code was not read or run.

What the paper claims

The authors make these claims.

How it works

OASIS has a part that runs on a computer and a part that runs on the chip.

  1. Analyze. The source code of Controller software is usually not available. An analyzer searches the compiled Controller program for the functions and data that OASIS needs, such as the routine that handles a received packet, by matching patterns of machine instructions.

  2. Build. A build system compiles the chosen detection modules, which are written in C, together with two fixed parts: a core, which passes events to the modules, and a wrapper, which connects OASIS to one particular Controller.

  3. Patch. A patcher writes this code into the memory of the chip and replaces selected instructions of the Controller software by jumps. Each such jump is a hook §14.26. It leads to a trampoline §14.28: a short routine that saves the processor context (the contents of the registers), calls an OASIS function, restores the context, executes the replaced instruction and returns.

  4. Detect. When execution reaches a hook, for example after a packet was received, the wrapper reads the packet and its measurements, such as signal strength and time of arrival, out of the Controller’s data. The core passes them to every module that registered a callback §14.22, a function to be called, for this event. A module that recognizes an attack raises an alert, which the core sends to the Host.

Only the wrapper differs from chip to chip. OASIS manages its own memory area, and the authors design it to run without interfering with the Controller’s normal behavior.

Worked example

What the monitor sees. Take the BTLEJack module, as the paper describes it. Of two connected devices, the Central, which started the connection, transmits first in every scheduled exchange, and the Peripheral, which accepted the connection, replies. The attacker jams the replies, so that the Central counts lost packets and gives up the connection. Inside the Controller of the Central, OASIS learns for every exchange whether a reply arrived and whether its cyclic redundancy check §4.32 (CRC), an error-detecting code at the end of every packet, was valid. Under attack, replies with an invalid CRC arrive in consecutive exchanges. When the Peripheral has simply gone out of range, nothing arrives. The module raises an alert on the first pattern. An external sniffer, a separate receiver elsewhere in the room, knows only what its own antenna received, which can differ.

What it costs. The paper cites version 5.3 of the Bluetooth specification for the requirement that a reply starts 150 microseconds after the end of the packet it answers. Version 6.2 keeps 150 microseconds as the default and lets two connected devices agree on another value. The figures that follow are the paper’s averages for its slowest case, a Cypress chip with all modules loaded. The Controller’s own code takes 68 microseconds to handle a packet received during a connection. OASIS adds 28 microseconds for wrapper and core, 11 for the BTLEJack module and 15 for the InjectaBLE module, which is 28+11+15=5428 + 11 + 15 = 54 microseconds. The figure gives 0 for the KNOB and GATTacker modules and has no bar for the BTLEJuice module. The total is 68+54=12268 + 54 = 122 microseconds, which leaves 150−122=28150 - 122 = 28 microseconds before the reply is due.

What this account does not establish

The results are the authors’ measurements, and this account did not reproduce them.

The threat model §1.2 of the paper excludes attacks that change the memory of the Controller, including the memory of OASIS itself. The authors say that such an attack could alter or evade the detection.

The five modules detect and report. The authors name prevention as future work.

The time figures are averages from two boards, not a proved upper bound (a worst-case execution time §9.33). A more complex module could exceed the 150-microsecond limit; the authors propose to postpone part of its work until after the reply.

Each module applies a simple rule with limits that the paper states. The GATTacker module must first learn how often a device advertises, and it produced 19 false alerts on one test device. The BTLEJuice module needs a device that can listen for advertisements while it is connected. The KNOB module flags every request for a key shorter than 10 bytes, although BLE permits such keys.

The authors’ statement that the modules cannot be evaded assumes that the monitor receives all traffic and that its code has no bugs.

Installing OASIS means modifying the Controller software. The authors note that a third party cannot always do this on a commercial device.

Questions answered

Why might an internal monitor see more than an external sniffer?

An internal monitor can see more than an external sniffer because it reads what the device’s own radio really received and what its protocol software really did, while an external sniffer, a separate receiver nearby, must reconstruct both from the air. The authors of OASIS (Cayre and others, 2024), a monitor built into the radio software of Bluetooth Low Energy (BLE) devices, argue this for BLE. Their reasons fall into three groups.

The internal monitor pays for this view. Its code runs inside packet handling that must finish before the reply is due, by default 150 microseconds after the received packet ends, and it uses the memory and power of the chip. It must be patched into software whose source code is often not available. It sees only the traffic of its own device. And it is only as trustworthy as the software whose memory it shares.

Related entries: Probe and hook (§14.26), Worst-case execution time (WCET) (§9.33), BLE Controller and Host (§7.4), Trampoline (§14.28), Detection versus prevention (§1.21), Instrumentation overhead (§11.32), BlueSWAT: session history and state-aware detection (§21.1). Further reading: [93, 204].