This repository supports the extraction, analysis, and visualization of Bluetooth device activity from Kismet .kismet databases. It includes:
- A standalone processor script (
bluetooth.py) - pyVIP visualization modules for classified Bluetooth behaviors
- Output for CSV, charts, and KML geospatial visualization
- Convert
.kismetSQLite to JSON and extract Bluetooth metadata - Classify devices by behavior (advertisers, persistent, scanners, etc.)
- Infer GPS if missing using snapshot matching
- Export results to CSVs and charts
- Visualize results with pyVIP (Virtualitics Python API)
- Generate KML files for mapping in Google Earth or similar
Bluetooth/
├── bluetooth.py # Main processor script
├── kismet\_output/ # Output folder for CSV/KML/images
├── pyvip\_behavior/ # pyVIP scripts for each behavior class
│ ├── pyvip\_advertisers.py
│ ├── pyvip\_persistent.py
│ ├── pyvip\_scanners.py
│ ├── pyvip\_rich\_services.py
│ ├── pyvip\_strong\_no\_services.py
│ ├── pyvip\_rotating\_macs.py
│ ├── pyvip\_repetitive\_advertisers.py
│ └── pyvip\_bluetooth\_devices.py
└── README.md # This file
python bluetooth.pyYou will be prompted for:
- The
.kismetfile path - The output directory
bluetooth_devices.csv- Behavior-classified CSVs (e.g.
advertisers.csv,persistent.csv) - KML map file (
bluetooth_devices.kml) - Vendor distribution chart and timeline plots
Each script in pyvip_behavior/ loads a behavior CSV and renders it in Virtualitics Explore.
Run from terminal:
python pyvip_<behavior>.pyBehavior options include:
advertiserspersistentscannersrich_servicesstrong_no_servicesrotating_macsrepetitive_advertisers
You will be prompted for:
- Your pyVIP auth token
- The path to the corresponding behavior CSV
- Python 3.7+
pandasmatplotlibvirtualitics(for pyVIP scripts)- Optional: Google Earth or any KML viewer
Install requirements:
pip install pandas matplotlibFor pyVIP usage:
pip install virtualiticsIf your Kismet capture lacks device-level GPS, bluetooth.py will:
- Use
snapshotstable - Match by
first_timeto infer approximateavg_latandavg_lon - Mark inferred entries with
gps_inferred = True
- Behavioral classification is rule-based using device duration, services, and signal strength
- MAC rotation detection uses
vendor_prefixclustering - Strong signal but no service devices are flagged as potential scanners
All CSV outputs are compatible with other analytics pipelines. Each pyVIP script can also be imported as a module:
from pyvip_behavior.pyvip_advertisers import load_and_plot_advertisers
load_and_plot_advertisers(auth_token="...", csv_path="advertisers.csv")This package was designed to support Bluetooth situational awareness in edge, mobile, or forensics scenarios. It can be run offline and exported for geospatial or time-series review.
- advertisers.csv
- persistent.csv
- rich_services.csv
- scanners.csv
- rotating_macs.csv
- repetitive_advertisers.csv
- strong_no_services.csv
- bluetooth_devices.kml
- vendor_distribution.png
- device_timeline.png