Bluetooth & BLE · Study deck
BLE Attack Labs: PIN Brute-Force Timing
A four-digit PIN is a short passcode.
Radio Remi is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Explain: IoT devices without a mechanism to remotely revoke bonding keys (via cloud command + BLE or local physical trigger) remain permanently open to the lost device reconnecting with the stolen key.
- Explain: The layers answer different threats, so the lab results should record which control stopped which attack rather than claiming one successful pairing test proves end-to-end security.
- Explain: Provide authorized bond revocation and re-pairing when a key is lost or compromised; rotate and re-pair on a risk-based schedule, deleting the old LTK.
- Explain: A script can try every value until one works.
Major section
Start With the Decision
A four-digit PIN is a short passcode.
- A script can try every value until one works.
- Lockout time is the wait imposed after the allowed number of failed tries.
- A retry limit is how many failed tries it permits.
- Those rules decide how long the attack takes.
Major section
Defense-in-Depth Security Layers · BLE Attack Timeline Visualization
Secure BLE deployments require protection at multiple layers.
- The layers answer different threats, so the lab results should record which control stopped which attack rather than claiming one successful pairing test proves end-to-end security.
- Understanding when attacks can occur helps prioritize defenses.

Major section
Visual Reference Gallery · Visual: Bluetooth Pairing Process
This stops the visible “connected” state from being confused with authenticated, encrypted application access.
- The chosen capabilities determine whether the exchange can resist MITM; encryption alone does not retroactively authenticate Just Works.
- This ordered path connects the gallery reference to the secure and insecure lab modes and tells you which event each callback should log.

Major section
Visual: BLE State Machine
Attack surface changes with state, so a single connected-state test is incomplete.
- The state view connects the lab's callbacks to security timing: apply controls and logging at the transition where the relevant evidence actually appears.
Major section
Visual: Bluetooth Power Classes · Visual: Bluetooth Protocol Stack Security
Class 1 uses 100 mW and Class 2 uses 2.5 mW, so 100 mW / 2.5 mW = 40: the nominal power is 40 times greater.
- More power can enlarge the area from which someone may hear the link.
- The range in a product sheet is not a fence.
Major section
Common Mistake: Ignoring Bonded Key Storage Security
The Scenario: A smart lock manufacturer implements authenticated BLE pairing with Numeric Comparison but stores bonded LTK keys in unencrypted flash memory.
- After deployment, a security researcher extracts the keys through exposed debug access and demonstrates that cloned clients can reconnect as trusted devices.
- Many developers focus on the pairing ceremony (Numeric Comparison, OOB) but neglect key storage, assuming the device's physical security is sufficient.
- JTAG or SWD debug access remains enabled in production.
Major section
Common Mistake: Ignoring Bonded Key Storage Security (continued)
Provide authorized bond revocation and re-pairing when a key is lost or compromised; rotate and re-pair on a risk-based schedule, deleting the old LTK.
- Bonding keys are saved to ordinary flash without flash encryption.
- Attacker removes smart lock cover (2 screws).
- Locks now accept attacker's device as trusted.
Major section
Common Mistake: Ignoring Bonded Key Storage Security (continued)
The enclosure allows simple access to programming pads.
- Use tamper-evident enclosures (security screws, ultrasonic welds).
- Add intrusion detection (accelerometer detects case opening).
- Deployment cost lesson: Retrofitting hardware security after release is usually more expensive than designing for protected storage and debug-port lockdown before manufacturing.
Major section
Checkpoint: Defense Stack · Concept Relationships
Defense-in-depth and security layers: Link encryption protects traffic in transit, but production devices also need application authorization, secure boot, and protected key storage.
- Attack timeline and lifecycle security: Vulnerabilities can appear during manufacturing, pairing, normal operation, firmware update, resale, and decommissioning.
- LE Secure Connections and key agreement: ECDH-based pairing improves key establishment and prevents passive recovery of past session keys.
- Key storage protection and bonding security: Flash encryption, secure elements, and debug-port lockdown reduce the risk of LTK extraction.
- Secure boot and firmware integrity: Signed boot prevents malicious firmware from disabling encryption or leaking bonded keys.
Major section
Code Challenge · Start With the Story
The phone and lock may have made a protected link.
- It also does not prove the lock will reject a changed or repeated command.
- A security lab turns these hidden questions into visible tests.
- The wireless link can hide data from a nearby listener.
- The product must still check permission.
Major section
Deep Dive: ATT Permissions and Write Validation
Changing from Write Command to Write Request only adds an ATT response; changing the UUID only delays discovery.
- A useful BLE security lab starts by inventorying the ATT operations before testing pairing or packet capture.
- The classic vulnerability is a writable command characteristic left at Open.
- Permissions are still only one layer.
Major section
Deep Dive: ATT Permissions and Write Validation (continued)
A smart lock whose unlock characteristic accepts a Write Command with no security lets anyone within range enumerate the UUID, send 0x01, and open the door.
- The meaningful test result changes only when the write permission becomes authentication-required and the unauthenticated write fails before the latch callback runs.
- A bonded, authorized client can send malformed or malicious data through a legitimate Write, so the application must validate every written value.
- In the lab, prove both sides: one unauthorized write fails at ATT permission checks, and one malformed authorized write fails in the application parser.
Major section
3. Not Revoking Bonding Keys After Security Incident · 4. Ignoring Firmware Update Authentication
IoT devices without a mechanism to remotely revoke bonding keys (via cloud command + BLE or local physical trigger) remain permanently open to the lost device reconnecting with the stolen key.
- An OTA DFU implementation that accepts unsigned firmware images allows an attacker within BLE range to flash arbitrary malicious firmware.
- All production BLE OTA implementations must verify firmware image signatures (ECDSA or RSA) before applying updates.
- The public key for signature verification should be stored in a protected flash region that cannot be overwritten by OTA updates themselves.
Deck summary
Key takeaways
A four-digit PIN is a short passcode.
- Secure BLE deployments require protection at multiple layers.
- This stops the visible “connected” state from being confused with authenticated, encrypted application access.
- Attack surface changes with state, so a single connected-state test is incomplete.
- Class 1 uses 100 mW and Class 2 uses 2.5 mW, so 100 mW / 2.5 mW = 40: the nominal power is 40 times greater.
Retrieval practice
Recall check 1 of 5

Radio Remi says: answer from memory, then check your reasoning.
Q1A four-digit PIN has 10,000 values. A tester can try 10 guesses each second with no lockout. About how long is the average search?
Show answer
Answer: B Average search tries half the space, then divides by the guess rate.
Retrieval practice
Recall check 2 of 5

Radio Remi says: answer from memory, then check your reasoning.
Q2What is the main security improvement introduced by BLE 4.2 LE Secure Connections?
Show answer
Answer: B LE Secure Connections (BLE 4.2+) replaces legacy pairing with ECDH-based key agreement, providing protection against passive eavesdropping of pairing exchanges.
Retrieval practice
Recall check 3 of 5

Radio Remi says: answer from memory, then check your reasoning.
Q3What does BLE's Resolvable Private Address (RPA) primarily protect against?
Show answer
Answer: B Resolvable private addresses rotate and can be resolved by peers holding the IRK.
Retrieval practice
Recall check 4 of 5

Radio Remi says: answer from memory, then check your reasoning.
Q4Why is BLE link-layer encryption alone insufficient for securing an IoT smart lock?
Show answer
Answer: B Even with encrypted BLE links, an attacker who extracts stored LTK keys (physical access), clones a bonded device, or compromises firmware can bypass link-layer security.
Retrieval practice
Recall check 5 of 5

Radio Remi says: answer from memory, then check your reasoning.
Q5During which phase of the BLE device lifecycle is secure boot most critical?
Show answer
Answer: C Secure boot verifies the cryptographic signature of firmware at boot time, ensuring only authorized code runs.
Q6Complete the authorization guard for a sensitive BLE command:
Show answer
Answer: A Sensitive commands should require both encrypted transport and fresh user authorization.
Print reference
Answers 1 of 2
Answer key.
- B · Average search tries half the space, then divides by the guess rate.
- B · LE Secure Connections (BLE 4.2+) replaces legacy pairing with ECDH-based key agreement, providing protection against passive eavesdropping of pairing exchanges.
- B · Resolvable private addresses rotate and can be resolved by peers holding the IRK.
- B · Even with encrypted BLE links, an attacker who extracts stored LTK keys (physical access), clones a bonded device, or compromises firmware can bypass link-layer security.
Print reference
Answers 2 of 2
Answer key.
- C · Secure boot verifies the cryptographic signature of firmware at boot time, ensuring only authorized code runs.
- A · Sensitive commands should require both encrypted transport and fresh user authorization.