Wifi-hacking
  • Wifi - Hacking Lab
  • Recon
  • OPN
  • WEP
  • PSK - WPA2
  • SAE WPA3
  • MGT Recon
  • MGT
  • WIDS - Nzyme
  • Bluetooth
    • Resources
    • Tutorials
    • Reconnaisance
Powered by GitBook
On this page
  • Activating Bluetooth Adapter: A Primer with hciconfig
  • Scan for Bluetooth Devices with hcitool
  • Scan for Services with sdptool
  • Ping Bluetooth Devices with l2ping
  • Scan for Bluetooth Devices with btscanner
  1. Bluetooth

Reconnaisance

HCIconfig

PreviousTutorials

Last updated 2 months ago

Activating Bluetooth Adapter: A Primer with hciconfig

Much like ifconfig serves for Wi-Fi, the counterpart for Bluetooth devices is hciconfig. This tool facilitates the activation of your Bluetooth adapter, serving as the initial step in our reconnaissance journey. Familiarize yourself with hciconfig to set the stage for efficient Bluetooth hacking.

hciconfig
hci0     Type: Primary Bus: USB
         BD Address: ██:██:██:██:██:██  ACL MTU: 1022:8   SCO MTU: 183.5
         DOWN
         RX bytes:574 acl:0 sco:0 events:30 errors:0
         TX bytes:368 acl:0 sco:0 commands:30 errors:0

Just as ifconfig is synonymous with Wi-Fi, hciconfig takes the lead for Bluetooth devices. In this guide, we'll navigate the setup of your Bluetooth interface, an essential precursor for efficient Bluetooth hacking. Observe our example, where the Bluetooth interface is currently inactive (down). Follow these steps to bring it to life and initiate your Bluetooth operations. Suppose you are well-acquainted with ifconfig commands. In that case, adapting to hciconfig will be seamless, as they share a structural resemblance. For instance, if you need to activate a Wi-Fi interface, the command is "ifconfig [interface_name] up". In the realm of Bluetooth, using hciconfig mirrors this process. Explore the hciconfig man page for a comprehensive list of compatible commands.

Getting Help

man hciconfig

The versatility of hciconfig extends beyond mere interface activation; it's a powerful tool for configuring Bluetooth devices. Whether you have an external Bluetooth device connected, its application encompasses device discovery and configuration. Once familiarized with this aspect, press Q to exit the hciconfig man page. To bring a discovered Bluetooth device online, execute the command `hciconfig [device_name] up`. This step is crucial in preparing the identified Bluetooth device for subsequent operations.

Turning Bluetooth interface up

hciconfig hci0 up

To see if it worked, run the hciconfig command again:

hciconfig

Scan for Bluetooth Devices with hcitool

Now let’s use hcitool to look for Bluetooth devices that are sending out their discover beacons (in discovery mode).

Hcitool proves invaluable in configuring and executing diverse tasks such as scans, inquiries, and name retrieval. However, certain commands necessitate the use of MAC addresses. A fundamental operation is scanning for nearby Bluetooth devices, providing MAC addresses for further inquiries or attempts to extract device names. Initiate a scan with the command hcitool scan. This employs the Bluetooth interface to identify nearby devices, revealing their MAC addresses. This information serves as a gateway for subsequent scans, inquiries, or endeavors to unveil device names.

hcitool scan

Scan for Services with sdptool

Exploring the realm of Bluetooth devices demands a meticulous examination of their services. Meet `sdptool`, a versatile companion crafted for precisely this purpose. This tool empowers users to delve into the intricacies of a device's services, offering profound insights into its functionalities, both expansive possibilities and inherent constraints. Before embarking on the journey of exploration using `sdptool`, it's essential to acquaint oneself with its command options and diverse functionalities. A robust grasp of available commands ensures a more nuanced and effective exploration experience. Equipped with this knowledge, seamlessly utilize `sdptool` to unravel the array of services extended by a Bluetooth device. This comprehensive exploration not only unveils the device's properties but also provides a nuanced understanding, enabling informed reconnaissance and strategic interaction.

sdptool browse E8:7F:95:1D:36:73
Browsing E8:7F:95:1D:36:73 ...
Service Name: GATT
Service RecHandle: 0x4f491801
Service Class ID List:
  "Generic Attribute" (0x1801)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 31
  "ATT" (0x0007)
    uint16: 0x0001
    uint16: 0x0018

Contains a lot of information

In this context, the output provides additional insights into the realm of communications, unveiling the intricacies of protocols employed by the device. This newfound knowledge becomes pivotal as we navigate the landscape of potential vulnerabilities within the device. By scrutinizing the details, we might uncover vulnerabilities, ascertain the feasibility of direct communication, and even discern whether the device employs security measures such as MAC address randomization. This multifaceted exploration equips us with the information needed to make informed decisions and strategic moves in our Bluetooth reconnaissance endeavors.

sdptool browse

Ping Bluetooth Devices with l2ping

Now that we've acquired the MAC addresses of the nearby devices, we can utilize l2ping to ping them, whether they are in discover mode or not, to assess their reachability. In my case, there's just one device.

l2ping 00:1D:A5:00:09:1D

Ping: 00:1D:A5:00:09:1D from ██:██:██:██:██:██ (data size 44) ...
44 bytes from 00:1D:A5:00:09:1D id 0 time 37.57ms
44 bytes from 00:1D:A5:00:09:1D id 1 time 27.23ms
44 bytes from 00:1D:A5:00:09:1D id 2 time 27.59ms
44 bytes from 00:1D:A5:00:09:1D id 3 time 27.31ms
44 bytes from 00:1D:A5:00:09:1D id 4 time 40.99ms
44 bytes from 00:1D:A5:00:09:1D id 5 time 48.77ms
44 bytes from 00:1D:A5:00:09:1D id 6 time 59.93ms
44 bytes from 00:1D:A5:00:09:1D id 7 time 48.84ms
44 bytes from 00:1D:A5:00:09:1D id 8 time 67.59ms

This indicates that the device is within range and reachable.

Scan for Bluetooth Devices with btscanner

It is a full-fledged graphical user interface designed for Bluetooth device discovery. It goes by the name btscanner. To initiate it, simply type btscanner.

List only active devices
Auto discover all devices and get detailed information