#UYBHYS26

#UYBHYS26

Hack Bluetooth Low Energy avec WHAD

Atelier pratique de hack d'objets connectés Bluetooth Low Energy avec le framework WHAD (https://whad.io). L'objectif de cet atelier est de découvrir WHAD au travers d'exercices de scripting Python, en ponçant des objets connectés du plus simple au plus ardu.

Certains exercices pratiques seront réalisés sur une toute nouvelle plateforme permettant l'émulation d'objets connectés et évitant ainsi toutes les difficultés propres à l'environnement (identification de l'équipement cible difficile quand une centaine d'objets connectés BLE sont présents dans une conférence, bruit et perturbations radio, etc...), tandis que d'autres devront être menés sur du vrai matériel que nous amèneront pour l'occasion.

Ce sera aussi l'occasion de présenter la dernière version de WHAD et son API Python améliorée, qui a d'ailleurs pu l'être grâce à l'atelier qui s'est tenu lors de l'édition 2025 de Unlock :D


Workshop objectives

  • Discover WHAD, a flexible wireless hacking Python framework and some of its key features
  • Learn how to easily scan, connect and interact with a BLE device using WHAD tools
  • Learn how to spoof any BLE device using WHAD
  • Learn how to create Python scripts using WHAD to automate BLE analysis and vulnerability exploitation
  • Hack BLE stacks and a smartwatch for fun and profit !

Prerequisites

  • A laptop with Virtualbox or VMWare virtualization software installed (host OS does not really matter)
  • We will provide a pre-configured VM a few days before the workshop
  • Administrative rights may be required for the VM to access the host's USB interfaces and HCI adapters
  • At least 2 free USB ports required on the host machine to plug some hardware devices, bring a USB hub if needed
  • A good knowledge of the Python programming language (Python 3.x)
  • A smartphone with Nordic Semiconductor's nRF Connect application installed (not mandatory but could be useful)
  • You can also bring any Bluetooth Low Energy device you think may be fun to fiddle with ;)

Workshop agenda

  • I. What is WHAD ?
  • I.1. Introducing WHAD (purpose and global design)
    • I.1.1. Supported protocols/modulations
    • I.1.2. Combining simple tools to create complex tools
    • I.1.3. Python API
    • I.1.4. Examples of tools/research based on WHAD (quick demos)
    • I.1.5. Pros and cons
  • I.2. Core concepts
    • I.2.1. Getting protocol processing out of firmware
    • I.2.2. WHAD host/interface protocol
    • I.2.3. Interfaces and connectors
    • I.2.4. Tool chaining
    • I.2.5. Scripting
  • I.3. Installing WHAD

    • I.3.1. Installing and running WHAD in a VM (we provide a VM image)
    • I.3.2. Installing and running WHAD on your host computer (for the braves)
    • I.3.3. First contact with WHAD
  • II. Quick overview of WHAD CLI tools (hands-on)

  • II.1. Interactive mode using wble-central
    • II.1.a. Services and characteristics discovery
    • II.1.b. Reading and writing to characteristics
    • II.1.c. Subscribing for notifications or indications
    • II.1.e. Real-time monitoring with Wireshark
  • II.2. Interactive mode using wble-periph

    • II.2.a. Creating a device from scratch in interactive mode
    • II.2.b. Scripting wble-periph to quickly setup a device
    • II.2.c. Monitoring live with wireshark
    • II.2.d. Dumping traffic to PCAP file
    • II.2.e. Populating services and characteristics from exported GATT profile
  • III. Writing BLE exploits in Python

  • III.1. Abusing ATT/GATT permissions
    • III.1.a. Writing into a read-only characteristic
    • III.1.b. Defacing a BLE device
  • III.2. Crashing a cheap BLE tracker (DoS)
    • III.2.a. Connecting to target device
    • III.2.b. Sending a crafted PDU to make its stack crash
  • III.3. Spamming a smartwatch

    • III.3.a. Smartwatch custom protocol analysis
    • III.3.b. Sending unsolicited notifications
  • IV. Spoofing BLE devices in Python

  • IV.1. Creating a BLE device from scratch
    • IV.1.a. Defining a specific GATT profile
    • IV.1.b. Handling characteristic value read/write operations
    • IV.1.c. Implementing a weird BLE device (battery drains pretty quickly)
  • IV.2. Spoofing a real device
    • IV.2.a. How to emulate a device's behavior
    • IV.2.b. Phishing a smartlock's PIN
Damien CAUQUIL

Consultant sécurité senior, Damien s’est spécialisé ces dernières années dans la rétro-ingénierie matérielle, logicielle et les protocoles de communication RF.

Romain Cayre

Je suis actuellement maître de conférences à l'Institut national des sciences appliquées (INSA), une école d'ingénieurs située à Toulouse, en France. Je suis également chercheur en sécurité au sein de l'équipe TRUST du laboratoire français LAAS-CNRS depuis octobre 2024. Avant de rejoindre l'INSA et le LAAS-CNRS en tant que maître de conférences, j'ai obtenu un doctorat en informatique à l'INSA Toulouse et j'ai occupé pendant deux ans un poste de chercheur postdoctoral au sein du département de sécurité numérique (équipe S3) d'EURECOM, à Sophia-Antipolis (France).

Mes domaines de recherche portent principalement sur la sécurité des réseaux sans fil, la sécurité de l'IoT et de l'IIoT, ainsi que la sécurité des systèmes embarqués. Dans ce cadre, je suis l'un des auteurs du framework WHAD, dédié au développement d'une série d'outils pour la sécurité sans fil. Plusieurs projets de recherche académiques dont je participe à l'encadrement visent à améliorer celui ci, afin d'y intégrer de nouveaux protocoles, de supporter de nouveaux types d'attaques ou d'en étendre les capacités. Le framework constitue également une part essentielle de mes enseignements à l'INSA Toulouse, où je porte plusieurs enseignements en lien avec la sécurité sans fil et les systèmes embarqués.