Documentation
¶
Overview ¶
Package bluezkeys extracts Bluetooth pairing keys from a Linux BlueZ device `info` file (/var/lib/bluetooth/<adapter>/<device>/info).
It is the BLE/Bluetooth analogue of the WiFi config extractor: a foothold on a Linux host yields, for every device the host has paired with, the long-term cryptographic material — the BR/EDR LinkKey, and for LE the LongTermKey (LTK), IdentityResolvingKey (IRK), and signing keys (CSRK). With these an operator can decrypt sniffed traffic for the bonded link, resolve a device's resolvable-private address (IRK), or impersonate the bonded device — directly useful alongside a BLE sniffer or the Flipper's BLE radio.
The keys are the explicit extraction goal, so they are surfaced verbatim (the device MAC is the directory name, not in the file, so it is reported as supplied-by-path). No confidently-wrong output: the file is recognised only by a BlueZ-specific key section, an unpaired/cleared file is reported key-less, and input that is not a BlueZ info file is rejected.
Wrap-vs-native: native — a minimal GKeyFile (INI) scanner over the documented BlueZ storage format (bluez doc/settings-storage.txt; src/device.c load_info/store_info); stdlib only, no new go.mod dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// Kind: LinkKey, LongTermKey, PeripheralLongTermKey, IdentityResolvingKey,
// LocalSignatureKey, RemoteSignatureKey.
Kind string `json:"kind"`
Value string `json:"value"`
Detail string `json:"detail,omitempty"`
}
Key is one recovered pairing key.
type Result ¶
type Result struct {
Name string `json:"name,omitempty"`
AddressType string `json:"address_type,omitempty"`
Technologies string `json:"technologies,omitempty"`
Class string `json:"class,omitempty"`
// Transport is derived: "BR/EDR", "LE", or "dual".
Transport string `json:"transport,omitempty"`
Keys []Key `json:"keys"`
Note string `json:"note"`
}
Result is the decoded BlueZ info file.