1 / 16

Graduate Operating Systems Mini-Project:

Graduate Operating Systems Mini-Project:. Hacking Bluetooth In Linux Alan Joseph J Caceres. Overview. Hacking Bluetooth in Linux Modifying Linux Bluetooth stack to pass a sequence of bytes to a device in order to establish a connection. Introduction to Bluetooth. What is Bluetooth?

Download Presentation

Graduate Operating Systems Mini-Project:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graduate Operating SystemsMini-Project: Hacking Bluetooth In Linux Alan Joseph J Caceres

  2. Overview Hacking Bluetooth in Linux Modifying Linux Bluetooth stack to pass a sequence of bytes to a device in order to establish a connection.

  3. Introduction to Bluetooth • What is Bluetooth? • Form of wireless communication • Short-range • Connect multiple devices • Low data rate compared to Wi-Fi 3

  4. Introduction to Bluetooth • Form of wireless communication • Similar to Wi-Fi (IEEE 802.11) • Uses short-wavelength transmissions within 2.4GHz range in the public radio spectrum • A form of ad-hoc networking • It follows the IEEE 802.15 standard for Wireless Personal Area Networks (WPAN)

  5. Introduction to Bluetooth • Short-range • Because of the short-wavelength used for transmission; distance is limited • Low power device minimizes transmission distance as well • Advantageous for creating Wireless Personal Area Networks

  6. Introduction to Bluetooth Connect multiple devices Excellent for ad-hoc networking Devices can create Piconets Master / Slave devices can switch roles as needed. Devices can range from headsets to keyboards and mice to gaming consoles like Nintendo's Wii gaming console.

  7. Bluetooth on Linux Linux distributions using the Linux kernel 2.4.6 and later implement the Open Source bluetooth stack BlueZ. BlueZ provides different modules for the Linux platform to interface with various bluetooth enabled devices and services.

  8. Bluetooth on Linux For this mini-project we will be looking at the latest version of the BlueZ bluetooth stack; BlueZ 4.101. How can we use a sequence of bytes to establish a connection between two bluetooth devices?

  9. Checking out the source In the BlueZ bluetooth stack there are many modules that are provided to assist in the “pairing” of various bluetooth devices. Where do they store the passkey for these devices? It has to be in one of the modules.

  10. A little info... Bluetooth devices have a “master/slave” relationship. When two bluetooth devices establish a connection between each other they communicate via their Media Access Control (MAC) address.

  11. Master meet slave After a connection between bluetooth devices have be established, the “master” device need only request the “slave” by its MAC address to initiate a connection if it becomes severed. This feature is what I will be exploiting.

  12. Hacking it In the BlueZ bluetooth stack there is a file called hidd.c that performs the connection authentication and encryption. There are specific functions within this class that use the struct bdaddr_t which is an unsigned int array.

  13. Hacking it. The unsigned int array within bdaddr_t has a size of 6. This is basically to hold the MAC address information in integer form. A MAC address is basically six hexadecimal numbers. A call to the function str2ba() converts this into the bytes for the bdaddr_t struct.

  14. Use the MAC Knowing the MAC address of both bluetooth devices is all that is needed to perform a “pairing”. By hard coding the MAC address of both bluetooth devices into the bdaddr_t src and dst variables this would allow the devices to stay permanently paired.

  15. Use the MAC An example would be seen in the request_authentication() method that has two bluetooth device addresses as parameters for source and destination address. Removing these parameters or setting their default values to the devices' MAC addresses should immediately pair them when they are in range.

  16. Tricky tricky Some devices may have MAC addresses that do not play well with the bluetooth stack. This may be because they contain 00 as the beginning or ending part of the address. They may also use a modified way of connecting to a host machine such as using the host machine's address reversed as the passkey. Hard-coding may be a way to circumvent this kind of trickery.

More Related