GithubHelp home page GithubHelp logo

drubaby / pi-probe-sniffer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 738 KB

Raspberry Pi-hosted wifi probe monitor with mqtt and supabase connections.

License: GNU General Public License v3.0

Python 93.54% Shell 6.46%
mqtt raspberrypi supabase wifi-probes

pi-probe-sniffer's Introduction

PiSniffer

Always-on WiFi Probe Request Packet Sniffer designed to run on a Raspberry Pi with a USB wireless card in monitor mode.

Logs probe requests from unknown devices to a daily CSV file and publishes them to an MQTT broker for home automation integrations. My instance is configured to run with a (free) Supabase DB to store known-device MAC addresses (freeing logs from clutter) and to upload a nightly digest of probes for analysis.

Future work:

  • Implementing a UI I can monitor from my phone
  • Discord notifications for unknown device detection

Hardware

Required

  • Raspberry Pi
  • USB Wireless Card capable of monitor mode
  • USB Drive (to capture logs)

Hardware setup

The wireless card will be detected and put into monitor mode by start.sh but we will want the usb drive to auto-mount on startup.

  1. run sudo blkid to find the PARTUUID of the usb drive
  2. add the following line to /etc/fstab where PARTUUID matches your device id
PARTUUID=24f4a1c2-233b-cf49-a147-137e81505db0 /media/usb ntfs defaults,auto,nofail,x-systemd,device-timeout=30, -o umask=000 0 0

Installation

  1. Clone this repository to raspberry pi
  2. Make scripts executable with sudo chmod +x start.sh and sudo chmod +x setup.sh
  3. Run sudo bash ./setup.sh for initial setup (Do this only once! See Optional Setup for steps to do this manually)

Optional Setup

Run these steps to manually set up the setup.sh steps

  1. Install linux dependencies:
    sudo apt-get install -y aircrack-ng git python3-pip
  2. Copy systemd service to local systemd directory, reload daemon and start service
       #copy local service to systemd dir
       sudo cp probe-sniffer.service /etc/systemd/system/
       sudo systemctl daemon-reload
       sudo systemctl enable probe-sniffer.service
       sudo systemctl start probe-sniffer.service

Acknowledgements

This project was inspired by this blog post from Tim Tomes which I read many years ago and never stopped thinking about. Check out the forked repo on Ryan C Butler's GitHub.

I also learned a lot about WiFi probes from reading these blog posts from Adam Robinson from whom I copped a lot of the core python code.

pi-probe-sniffer's People

Contributors

drubaby avatar

Watchers

 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.