SM Part 5 — Practical Examples & Chapter Summary
Chapter 11 Part 5 of 5 — Pairing Request/Response Sniffer Captures · SMP Message Sequence Chart · LE Secure Connections Setup · Summary
11.10 — Practical Examples
11.10.1 — Message Sequence for LE Legacy Pairing
The textbook shows a real BLE sniffer capture of a complete SMP transaction. Two devices are labelled Side 1 (Initiator/Master) and Side 2 (Responder/Slave). Security procedures start at Frame #690 with the Pairing Request. This is what you would see with Wireshark + a BLE sniffer dongle, or with btmon on Linux.
Figure 11.11 — Pairing Request Capture (Frame 690)
The Pairing Request from Side 1 (the Initiator) carries full capability information. The four main observations from this capture:
IO Capabilities KeyboardDisplay → has both numeric display AND numeric keypadOOB Data Flag Not present → no NFC or other OOB channelBonding Flags Bonding requestedMITM Protection Yes (requested)Max Encryption Key 16 octets (128-bit)Initiator Key Distribution (keys Side 1 will send):
Responder Key Distribution (keys Side 1 requests from Side 2):
Figure 11.12 — Pairing Response Capture (Frame 693)
Side 2 (the Responder) replies with its own capabilities. Three critical observations that determine everything that follows:
IO Capabilities NoInputNoOutput → NO display, NO keyboardMITM Protection No → cannot support MITM (no display/keyboard)Max Encryption Key 16 octetsInitiator Key Dist. No keys specified → Side 2 does not request Side 1 to send keysResponder Key Distribution (keys Side 2 will send):
Side 2 IO = NoInputNoOutput
Neither set MITM bit on responder side → Just Works selected
(NoInputNoOutput cannot support MITM regardless of Side 1’s capabilities)
Figure 11.13 — Full SMP Message Sequence Chart
This chart shows the complete pairing sequence derived from the air logs above, covering all three phases with the actual hex values seen in the capture.
Key observations from this capture:
- The Pairing Confirm values are opaque 128-bit blobs — without knowing TK and the random, they reveal nothing about the session key
- Just Works means TK=0, making the confirm and random values predictable to any eavesdropper who was listening. This is acceptable only because the pairing method was forced by the peripheral’s lack of display/keyboard — not because it is secure
- Only Encryption Information and Master Identification appear in Phase 3 — Side 2’s limited key distribution field (only EncKey=1) means no IRK or CSRK are distributed in this session
- After Phase 3, the channel map update at the end indicates normal data exchange is starting
11.10.2 — LE Secure Connections Pairing Sequence
Phase 1 Setup for LE Secure Connections (Figures 11.14–11.16)
The textbook references Figures 11.14–11.16 which show the LE Secure Connections sequence. Side 1 is the Master. The key difference in Phase 1 compared to legacy pairing is the AuthReq byte — the SC bit (bit 3) is set to 1 by both sides to signal that they both support and want Secure Connections pairing.
2b
1b
1b
1b
2b
1b
1b
1b
/* Triggering LE Secure Connections pairing with bluetoothctl */
/* Both devices must support BLE 4.2 and have SC feature bit */
/* Check if your controller supports SC: */
hcitool cmd 0x08 0x0003 /* LE Read Local Supported Features */
/* Bit 6 (0x40) = LL Privacy, Bit 7+ = Extended Scanner */
/* SC is advertised in SMP, not in LE features bitmap */
/* Force SC with BlueZ (in main.conf): */
/* /etc/bluetooth/main.conf: */
/* [Policy] */
/* JustWorksRepairing = always */
/* To pair from bluetoothctl: */
/* [bluetooth]# pairable on */
/* [bluetooth]# pair AA:BB:CC:DD:EE:FF */
/* If SC supported: Request confirmation: 384291 yes/no */
/* (Numeric Comparison appears if both have display+buttons) */
/* Monitor SC pairing with btmon: */
/* sudo btmon | grep -A 5 "SMP" */
/* Look for: Authentication requirement: Bonding, MITM, SC */
/* ^^ */
Chapter 11 Summary
What the Security Manager Provides to a BLE Connection
Chapter 11 covers the full security lifecycle of a BLE connection — from the threat landscape that motivated the design, through the cryptographic primitives used, to the complete three-phase pairing process and the specific SMP commands that implement it.
- Passive eavesdropping
- MITM active attacks
- Location tracking (RPA)
- LE Secure Connections (4.2)
- Authenticated MITM protection
- Unauthenticated (Just Works)
- No Security
- e (AES-128) — legacy base
- ah, c1, s1 — legacy functions
- AES-CMAC — SC base
- f4, f5, f6, g2, h6 — SC functions
- Phase 1: IO capability exchange
- Phase 2: TK→STK (legacy) or ECDH→LTK (SC)
- Phase 3: LTK, EDIV, IRK, CSRK distributed
- CID 0x0006, 30s timer
- 15 command codes (Table 11.2)
- 3 added in BLE 4.2 (0x0C–0x0E)
- Max PDU = 23 bytes
Next chapter: Attribute Protocol (ATT) — The protocol that runs over L2CAP CID 0x0004 and provides the read/write/notify primitives that GATT and all BLE profiles are built on.
Chapter 11 Security Manager — Complete Series
Chapter 11 Security Manager — Complete!
All five parts cover the Security Manager from first principles to practical sniffer captures. Next chapter: Attribute Protocol (ATT) running on CID 0x0004.
