Coder Social home page Coder Social logo

ble-replay's Introduction

BLE-Replay

BLE-Replay is a Bluetooth Low Energy (BLE) peripheral assessment tool. It pulls/consumes Bluetooth HCI logs from your mobile device and extracts all of the writes that the central makes to a peripheral.

This data can be replayed using most Bluetooth dongles from a Linux host, or saved to disk for modification. This tool gets you straight to testing a peripheral without extracting data with wireshark or scripting things with tools like gatttool. It allows for hand-crafting of your own sequences of characteristic writes to test against a device, including support for byte-level fuzzing.

This tool is useful if a mobile app writes some characteristics on the BLE device in order to configure/unlock/disable some feature or perform some other state-changing action on the device.

Prerequisites

Linux with BlueZ stack.

BLESuite -> https://github.com/nccgroup/BLESuite

Usage

python ble-replay.py -h

Replay File Format

["000e", "58e96f71ac901b55", [0,1,5,7], 2]
["002c", "627474686f6c65", [], 1]
["0002", "01", [0], 40]

Each line contains a JSON list of 4 parameters:

  1. Handle (Hex string)
  2. Data (Hex string)
  3. Byte positions to fuzz (List of integer offsets, OPTIONAL - use [] to send packet as is)
  4. Number of times to fuzz or repeat this write (Integer)

Examples

Fetch the HCI log from Android device and replay it as is:

python ble-replay.py -f -r

Parse an HCI log from your computer and replay it as is:

python ble-replay.py -p btsnoop_hci.log -r

Fetch the HCI log from Android device and write modifiaBLE replay data to disk:

python ble-replay.py -f -of replaydata.json

Modify the hex values as needed and then play that file using:

python ble-replay.py -if replaydata.json -r

ble-replay's People

Contributors

1in-oos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.