Giter VIP home page Giter VIP logo

raycxggg / blueswat Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 42.4 MB

Artifact for BlueSWAT, A Lightweight State-Aware Security Framework for Bluetooth Low Energy (To appear in CCS 2024).

CMake 1.84% C 91.48% C++ 0.14% Makefile 0.04% Shell 0.25% Assembly 0.98% Python 4.53% Tcl 0.01% CSS 0.01% HTML 0.01% JavaScript 0.01% Smalltalk 0.01% Perl 0.55% SmPL 0.05% EmberScript 0.01% Haskell 0.01% Verilog 0.02% FreeBasic 0.01% Batchfile 0.01% Ruby 0.07%

blueswat's Introduction

BlueSWAT: A Lightweight State-Aware Security Framework for Bluetooth Low Energy

This repository contains the artifact for BlueSWAT, a Bluetooth security framework for IoT devices based on eBPF. For more information about BlueSWAT, please consult our paper "BlueSWAT: A Lightweight State-Aware Security Framework for Bluetooth Low Energy" (To appear in CCS 2024).

Environment Setup

BlueSWAT is tested under Ubuntu 20.04 on WSL2. This artifact contains implementation on two embedded OS with open-source BLE stacks, i.e., ZephyrOS and MynewtOS. This artifact is tested on the Nordic 52840 Development Kit.

To flash USB device from WSL2, please install usbipd. Besides, Install the Segger JLINK Software and documentation pack.

Download our code and required submodules of MynewtOS:

git clone --recursive https://github.com/RayCxggg/BlueSWAT-Artifact.git

In a Windows shell, connect the board and attach it to WSL2:

usbipd list 
usbipd bind --busid <busid>
usbipd attach --wsl --busid <busid>

Zephyr BLE stack

We are using ZephyrOS v2.2.0 for vulnerability reproduction.

Setup

Please follow STEP ONE and TWO in the doc to install dependencies.

Install needed Python packages:

pip3 install --user -r ~/BlueSWAT/ZephyrOS/zephyr/scripts/requirements.txt

Install Zephyr Software Development Toolchain:

cd ~
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.11.2/zephyr-sdk-0.11.2-setup.run
chmod +x zephyr-sdk-0.11.2-setup.run
./zephyr-sdk-0.11.2-setup.run -- -d ~/SDK/zephyr-sdk-0.11.2
rm zephyr-sdk-0.11.2-setup.run

Clone required remote repositories:

cd BlueSWAT/ZephyrOS/zephyr
west update

Set build environment variables:

cd BlueSWAT/ZephyrOS/zephyr
source zephyr-env.sh

Build and Flash

Now, we build the BLE peripheral application for Nordic 52840 DK:

cd BlueSWAT/ZephyrOS
source scripts/config.sh
source scripts/build.sh

Everything is settled! Flash the board:

source scripts/flash.sh

Monitor

You can use minicom to monitor the output:

sudo minicom -D /dev/ttyACM0

Mynewt NimBLE stack

Setup

Follow the doc native installation mode to install the dependencies.

Build and Flash

Now, build the bootloader and BLE targets:

cd BlueSWAT/Mynewt
newt build nrf52_boot
newt build peripheral

Run the newt create-image command to create and sign the application image. You may assign an arbitrary version (e.g. 1.0.0) to the image:

newt create-image peripheral 1.0.0

Connect a micro-USB cable from your computer to the micro-USB port on the nRF52-DK board.

Then, load the bootloader and the BLE application image onto the board:

newt load nrf52_boot
newt load peripheral

Monitor

You can use minicom to monitor the output:

sudo minicom -D /dev/ttyACM0

Reference

If you are interested in using our works for academic research, please cite the paper:

@article{che2024blueswat,
  title={BlueSWAT: A Lightweight State-Aware Security Framework for Bluetooth Low Energy},
  author={Che, Xijia and He, Yi and Feng, Xuewei and Sun, Kun and Xu, Ke and Li, Qi},
  journal={arXiv preprint arXiv:2405.17987},
  year={2024}
}

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.