{
"info": {
"author": "Damien Cauquil",
"author_email": "damien.cauquil@digital.security",
"bugtrack_url": null,
"classifiers": [],
"description": "BtleJack: a new Bluetooth Low Energy swiss-army knife\n#####################################################\n\nBtlejack provides everything you need to sniff, jam and hijack Bluetooth Low Energy devices. It relies on one or more `BBC Micro:Bit `_. devices running a dedicated firmware. You may also\nwant to use an `Adafruit's Bluefruit LE sniffer `_ or a `nRF51822 Eval Kit `_, as we added support for these devices.\n\n**This tool only supports Bluetooth Low Energy 4.x.**\n\nRequirements\n============\n\nYou need a UNIX based system (for example a Raspberry Pi). If you use the BBC Micro:Bit, you will need one to three Micro:Bit devices (three devices recommended) and for each device one free USB port. The power consumption of a Micro:Bit is rather low, so you can use a single USB port and a passive hub for powering the three recommended units.\n\n**If you connect 3 microbits at the same time on your computer, Btlejack will be able to sniff on every advertising channel and has far more chance to capture the connection request.**\n\nHow to install\n==============\n\nFirst, install the ``btlejack`` Python3 client software with Pip:\n\n::\n\n $ sudo pip3 install btlejack\n\n\nThen, connect your Micro:Bit device to your computer with a USB cable, mount the associated mass storage device (the mount point must contain **MICROBIT**), and issue the following command:\n\n::\n\n $ btlejack -i\n\nThis will program every Micro:Bit device connected to your computer, and make\nthem ready to use with Btlejack. It will use the correct firmware version for the current client software, so it is highly recommended to perform this firmware installation procedure each time you update Btlejack.\n\nIf you are using a *Bluefruit LE sniffer* or a *nRF51822 Eval Kit*, then please use an external SWD programmer to flash your device with `this firmware `_.\n\nKeep your devices connected and you're all set !\n\n**NOTE** This only works with posix compatible systems.\n\nHow to use Btlejack\n===================\n\nUsing Btlejack is quite easy. Btlejack can:\n\n- use various devices\n- sniff an existing BLE connection\n- sniff new BLE connections\n- jam an existing BLE connection\n- hijack an existing BLE connection\n- export captured packets to various PCAP formats\n\n\nSpecify devices to use\n----------------------\n\nBtlejack normally tries to autodetect and use connected compatible devices (Micro:Bit only for the moment), but since the firmware can be hacked or modified\nto work with other nRF51822-based boards, it provides a specific options to allow compatibility with these devices.\n\nThe ``-d`` option lets you specify one or more devices with Btlejack. Note that this option will disable the automatic detection of devices, and you should\nadd as many devices as you may need:\n\n::\n\n $ btlejack -d /dev/ttyACM0 -d /dev/ttyACM2 -s\n\n\n\nSniffing an existing connection\n-------------------------------\n\nFirst, find an existing connection to target with ``btlejack``:\n\n::\n\n $ btlejack -s\n BtleJack version 1.1\n\n [i] Enumerating existing connections ...\n [ - 54 dBm] 0xcd91d517 | pkts: 1\n [ - 46 dBm] 0xcd91d517 | pkts: 2\n\nThe first value (in dBm) shows the power of the signal, the greater this value is the better the sniffed connection will be.\n\nThe second value (hex) is the associated *access address*, a 32-bit value identifying a link between two bluetooth low energy compatible devices.\n\nThe last value is the number of packets seen with this *access address*. The higher this value is, the more probable the corresponding *access address* is used.\n\nThen, use the `-f` option to follow a specific connection:\n\n::\n\n $ btlejack -f 0xdda4845e\n BtleJack version 1.1\n\n [i] Detected sniffers:\n > Sniffer #0: fw version 1.1\n\n [i] Synchronizing with connection 0xdda4845e ...\n \u2713 CRCInit: 0x2a035e\n \u2713 Channel Map = 0x1fffffffff\n \u2713 Hop interval = 39\n \u2713 Hop increment = 15\n [i] Synchronized, packet capture in progress ...\n LL Data: 02 07 03 00 04 00 0a 03 00\n LL Data: 0a 08 04 00 04 00 0b 5a 69 70\n LL Data: 02 07 03 00 04 00 0a 03 00\n LL Data: 0a 08 04 00 04 00 0b 5a 69 70\n\n\n**If you are using more than 1 microbit, Btlejack will parallelize some of the sniffing operations in order to speed up the connection parametres recovery !**\n\nSniffing for new connections\n----------------------------\n\nThe ``-c`` option supported by ``btlejack`` allows you to specify the target BD address, or you may want to use ``any`` to capture any new connection created.\n\n::\n\n $ btlejack -c any\n BtleJack version 1.1\n\n [i] Detected sniffers:\n > Sniffer #0: version 1.1\n > Sniffer #1: version 1.1\n LL Data: 05 22 df b4 6f 95 c5 55 c0 0a f6 99 23 40 1d 7b 2f 0a 9a f4 93 01 12 00 27 00 00 00 d0 07 ff ff ff ff 1f 0b\n [i] Got CONNECT_REQ packet from 55:c5:95:6f:b4:df to 40:23:99:f6:0a:c0\n |-- Access Address: 0x0a2f7b1d\n |-- CRC Init value: 0x93f49a\n |-- Hop interval: 39\n |-- Hop increment: 11\n |-- Channel Map: 1fffffffff\n |-- Timeout: 20000 ms\n\n LL Data: 03 09 08 0f 00 00 00 00 00 00 00\n LL Data: 03 09 08 0f 00 00 00 00 00 00 00\n LL Data: 0b 06 0c 08 0f 00 09 41\n LL Data: 03 06 0c 07 1d 00 d3 07\n\nor you may also want to specify the target BD address:\n\n::\n\n $ btlejack -c 03:e1:f0:00:11:22\n\n\nJamming a connection\n--------------------\n\nOnce a connection identified by its *access address*, you can provide jam it by using the ``-j`` option:\n\n::\n\n $ btlejack -f 0x129f3244 -j\u0300\n\n\nHijacking a BLE connection\n--------------------------\n\nBtlejack is also able to hijack an existing connection, use the ``-t`` option to do so. Once hijacked, Btlejack will give you a prompt allowing you to interact with the hijacked device.\n\nFirst, hijack an existing connection:\n\n::\n\n $ btlejack -f 0x9c68fd30 -t -m 0x1fffffffff\n BtleJack version 1.1\n\n [i] Using cached parameters (created on 2018-08-11 01:48:24)\n [i] Detected sniffers:\n > Sniffer #0: fw version 1.1\n\n [i] Synchronizing with connection 0x9c68fd30 ...\n \u2713 CRCInit: 0x81f733\n \u2713 Channel map is provided: 0x1fffffffff\n \u2713 Hop interval = 39\n \u2713 Hop increment = 9\n [i] Synchronized, hijacking in progress ...\n [i] Connection successfully hijacked, it is all yours \\o/\n btlejack>\n\nThen use the following commands to interact with the device:\n- **discover**: performs services and characteristics enumeration, will give you all the information about services and characteristics\n- **write**: write data to a specific value handle\n- **read**: read data from a specific value handle\n- **ll**: sends a raw link-layer packet (for ninjas)\n\n*discover* command\n^^^^^^^^^^^^^^^^^^\n\nThe ``discover`` command will send and receive Bluetooth LE packets and retrieve all the services UUIDs and parameters, as well as characteristics UUIDs and parameters:\n\n::\n\n btlejack> discover\n start: 0001 end: 0005\n start: 0014 end: 001a\n start: 0028 end: ffff\n Discovered services:\n Service UUID: 1801\n Characteristic UUID: 2a05\n | handle: 0002\n | properties: indicate (20)\n \\ value handle: 0003\n\n Service UUID: 1800\n Characteristic UUID: 2a04\n | handle: 0019\n | properties: read (02)\n \\ value handle: 001a\n\n Characteristic UUID: 2a00\n | handle: 0015\n | properties: read (02)\n \\ value handle: 0016\n\n Characteristic UUID: 2a01\n | handle: 0017\n | properties: read (02)\n \\ value handle: 0018\n\n Service UUID: 1824\n Characteristic UUID: 2abc\n | handle: 0029\n | properties: write indicate (28)\n \\ value handle: 002a\n\n*read* command\n^^^^^^^^^^^^^^\n\nThe ``read`` command accepts a single parameter, the value handle corresponding to the characteristic you want to read from:\n\n::\n\n btlejack> read 0x16\n read>> 4c 47 20 77 65 62 4f 53 20 54 56\n\n*write* command\n^^^^^^^^^^^^^^^\n\nThe ``write`` command accepts three parameters:\n\n::\n\n btlejack> write \n\n\nSupported data formats:\n\n- ``hex``: hex data (i.e. \"414261\")\n- ``str``: text string, may be encapsulated in double quotes\n\n*ll* command\n^^^^^^^^^^^^\n\nThis last command allows you to send Bluetooth Low Energy Link-layer PDUs, in hex form, as specified in Volume 6, Part B, Chapter 2.4.\n\n\nPCAP file export\n----------------\n\nOne interesting feature of Btlejack is the possibility to export the captured data to a PCAP file.\n\nBtlejack supports the following DLT formats:\n\n* DLT_BLUETOOTH_LE_LL_WITH_PHDR (same)\n* DLT_NORDIC_BLE (the one used by Nordic' sniffer)\n* DLT_BLUETOOTH_LE_LL (supported on latest versions of Wireshark)\n\nThe output file may be specified using the `-o` option, while the output format may be specified with the `-x` option. Valid formats values are: `ll_phdr`, `nordic`, or `pcap` (default).\n\n::\n\n $ btlejack -f 0xac56bc12 -x nordic -o capture.nordic.pcap\n\n\nThe ``ll_phdr`` export type is useful when sniffing an encrypted connection, as it is also supported by `crackle `_. So if you want to sniff and break encrypted connections, this is the way to go.\n\nYou may also need to tell crackle to use a specific cracking strategy, by using the `-s` option:\n\n::\n\n $ crackle -i some.pcap -s 1\n\n\nConnection cache\n----------------\n\nBtlejack uses a *connection cache* to store some connection-related value in order to speed up\nthings a bit. This connection cache may cause some problems, especially if an access address has\nbeen previously seen.\n\nThis cache can be flushed with the ``-z`` option:\n\n::\n\n $ btlejack -z",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/virtualabs/btlejack",
"keywords": "bluetooth smart low energy hijack sniff jam",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "btlejack",
"package_url": "https://pypi.org/project/btlejack/",
"platform": "",
"project_url": "https://pypi.org/project/btlejack/",
"project_urls": {
"Homepage": "https://github.com/virtualabs/btlejack"
},
"release_url": "https://pypi.org/project/btlejack/1.3.0/",
"requires_dist": null,
"requires_python": ">3.5.2",
"summary": "Bluetooth Low Energy Swiss-army knife to sniff, jam and hijack connections",
"version": "1.3.0"
},
"last_serial": 4279550,
"releases": {
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "7ba890e28e3a4c259e90da4798bc29df",
"sha256": "c7b7eef0b10f448a57f8a278dd7c10ba5a8ab18bbc2939148d34f5737936484f"
},
"downloads": -1,
"filename": "btlejack-1.1.tar.gz",
"has_sig": false,
"md5_digest": "7ba890e28e3a4c259e90da4798bc29df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 220234,
"upload_time": "2018-08-11T15:36:11",
"url": "https://files.pythonhosted.org/packages/98/6c/3817dc75993bb436a61ab37bd1601492c5794d3760215681c1d978a0b0c3/btlejack-1.1.tar.gz"
}
],
"1.1.1": [
{
"comment_text": "",
"digests": {
"md5": "65c6c76b691269f2fd3e8465bc4b1a95",
"sha256": "a54bc398411debb4eefa049521b046154abaed0b2449be85d12511ca08888ab1"
},
"downloads": -1,
"filename": "btlejack-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "65c6c76b691269f2fd3e8465bc4b1a95",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 220461,
"upload_time": "2018-08-14T11:08:18",
"url": "https://files.pythonhosted.org/packages/17/27/312bc7d79d951c620d7ea278c770c5b70fbcdce0ab46f2571d5d86513290/btlejack-1.1.1.tar.gz"
}
],
"1.1.2": [
{
"comment_text": "",
"digests": {
"md5": "028b8d552edd0fd491ef2696706d03de",
"sha256": "d9f5604868dfdb5d584b87bbdaa133a480e0722d4fdc468ee90f6f345201890d"
},
"downloads": -1,
"filename": "btlejack-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "028b8d552edd0fd491ef2696706d03de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 220469,
"upload_time": "2018-08-15T10:19:32",
"url": "https://files.pythonhosted.org/packages/1e/7a/73e21237fb5b1dbfc7c9982d45d8469f086ec0a4f921f93c9f6149915c33/btlejack-1.1.2.tar.gz"
}
],
"1.1.3": [
{
"comment_text": "",
"digests": {
"md5": "0bf5a32eab24b262f357dd7b8c1d9ee4",
"sha256": "70322e0f517d93699b5ec18d2ded98bb7a9d03bc11bcd5f6b5dcfcc26ae08c53"
},
"downloads": -1,
"filename": "btlejack-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "0bf5a32eab24b262f357dd7b8c1d9ee4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5.2",
"size": 221546,
"upload_time": "2018-08-20T07:17:12",
"url": "https://files.pythonhosted.org/packages/19/f8/02558fc349316916d3226dc9c3412ab0f193406fb43a7140ae78d19c1ab1/btlejack-1.1.3.tar.gz"
}
],
"1.2.0": [
{
"comment_text": "",
"digests": {
"md5": "c55291d60ec8bcde7a710631b890bdb4",
"sha256": "537a73c67c7c232259473fa04b6118fd90541e9d7ec2393023108d3054e93ced"
},
"downloads": -1,
"filename": "btlejack-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "c55291d60ec8bcde7a710631b890bdb4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5.2",
"size": 224530,
"upload_time": "2018-08-27T14:48:52",
"url": "https://files.pythonhosted.org/packages/1a/5b/e4cb52e4182d7992c292944f0ee1a1e4a0eeac56aaae122cbcd3ee4e20a0/btlejack-1.2.0.tar.gz"
}
],
"1.2.1": [
{
"comment_text": "",
"digests": {
"md5": "91e16485f465d447c86c9f1e747078c2",
"sha256": "fadf50f7c85531bb5964a0e42da49e8040007eb1b3be56470eb406ea59a5aec4"
},
"downloads": -1,
"filename": "btlejack-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "91e16485f465d447c86c9f1e747078c2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5.2",
"size": 225206,
"upload_time": "2018-09-17T09:11:12",
"url": "https://files.pythonhosted.org/packages/99/a7/699071da0472fe15b2e63283846a3eb94a702df33f8da21f98ffedc7988b/btlejack-1.2.1.tar.gz"
}
],
"1.3.0": [
{
"comment_text": "",
"digests": {
"md5": "5f70608a29bb8514b87c0c4e8e822ee0",
"sha256": "75aa829cd6ac9d9daa35fdeb4ee77f6a90ff3c4c8077a5fb00b2706554aa774b"
},
"downloads": -1,
"filename": "btlejack-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "5f70608a29bb8514b87c0c4e8e822ee0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5.2",
"size": 225450,
"upload_time": "2018-09-17T14:15:37",
"url": "https://files.pythonhosted.org/packages/84/18/f25c21dbc228aa8b70fa1ba7f7ca96362dae4e22ac7d9811abf1f558224c/btlejack-1.3.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "5f70608a29bb8514b87c0c4e8e822ee0",
"sha256": "75aa829cd6ac9d9daa35fdeb4ee77f6a90ff3c4c8077a5fb00b2706554aa774b"
},
"downloads": -1,
"filename": "btlejack-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "5f70608a29bb8514b87c0c4e8e822ee0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.5.2",
"size": 225450,
"upload_time": "2018-09-17T14:15:37",
"url": "https://files.pythonhosted.org/packages/84/18/f25c21dbc228aa8b70fa1ba7f7ca96362dae4e22ac7d9811abf1f558224c/btlejack-1.3.0.tar.gz"
}
]
}