
CVE-2026-0101 向け Python PoC。キャプチャした Resolvable Private Address をリプレイして BLE アドレスを偽装し、信頼済みペリフェラルになりすますことを実証します。
# ble_peripheral_sim.py - Simulated BLE peripheral with weak RPA verification
import asyncio, random, hashlib
from bleak import BleakServer, BleakScanner
# (Simplified - we'll use a basic socket to simulate BLE bonding)
# Store bonded IRK (Identity Resolving Key)
irk = b'\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10'
def resolve_rpa(rpa, irk):
# This is a stub: real resolution uses AES-128; vulnerability: attacker can brute-force or replay
# Assume the peripheral accepts any RPA that decrypts to a known hash without replay protection.
return True # always accept for demo
# Simulating the peripheral: wait for connection, check RPA, if resolved, trust.
print("Peripheral running, accepting any RPA...")
Resolvable Private Address(RPA)を使用するBluetooth Low Energyペリフェラルが、リプレイキャッシュを実装していません。有効なRPAを観測した攻撃者は、ペアリング済みデバイスを切断し、同じRPAを使用して再接続することで、信頼済みデバイスになりすますことができます。
シミュレーションを実行します:
python ble_peripheral_sim.py
# In another terminal:
python exploit_ble_spoof.py
このエクスプロイトはアドバタイズされたRPAを捕捉し、信頼済みデバイスとして再接続します。