• Stars
    star
    977
  • Rank 46,866 (Top 1.0 %)
  • Language
    Go
  • License
    GNU Affero Genera...
  • Created almost 8 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Track the location of every Wi-Fi device (๐Ÿ“ฑ) in your house using Raspberry Pis and FIND

find-lf

This is a extension of FIND, the Framework for Internal Navigation and Discovery, which is based on the idea of Lucius Fox's sonar system in The Dark Knight that is used to track cellphones.

The system uses a network of Raspberry Pis which sniff the WiFi probe requests from WiFi-enabled devices and sends these parcels to a central server which compiles and forwards the fingerprint to the FIND server which then uses machine learning to classify the location based on the unique WiFi fingerprints.

This system does not require being logged into a particular WiFi - it will track any phone/device with WiFi enabled! (Caveat: for iOS devices it will only track if Wi-Fi is associated with a network - any network, though - because of MAC spoofing it uses for security). This system also does not require installing any apps on a phone. Tracking occurs anytime a WiFi chip makes a probe request (which is every minute or so). For this to work, it requires a one-time setup to populate the system with known fingerprints of known locations before it can pinpoint locations (see #3 below).

Note: It may be illegal to monitor networks for MAC addresses, especially on networks that you do not own. Please check your country's laws (for US Section 18 U.S. Code ยง 2511) - discussion.

How does it work?

You can setup Raspberry Pis around a house in a way that they will see different signal strengths from various WiFi devices. Each WiFi-enabled device see requests from the various Raspberry Pis with different strengths (see colored bars in Figure below). These graphs are a fingerprint which can be used to uniquely classify the location.

The Raspberry Pi cluster gets probe requests to various WiFi devices, and compiles these and forwards them to a FIND-LF server. This FIND-LF server then sends a compiled fingerprint to a main server. This system uses WiFi probe requests, which occur on any WiFi enabled device, as long as WiFi is enabled. These probe requests generally occur when a scan takes place, which is every few minutes when the phone is being used.

Once sent to the FIND server, the location can be directly determined. For more information about this, see the FIND README.

Requirements

You will need a Raspberry Pi. Ones with built-in Wifi work best:

You will need a monitor-mode enabled wifi USB adapter. There are a number of possible USB WiFi adapters that support monitor mode. Here's a list that are popular:

Namely you want to find a USB adapter with one of the following chipsets: Atheros AR9271, Ralink RT3070, Ralink RT3572, or Ralink RT5572.

Setup

1. Initialize Pis

Install Raspbian lite onto a Pi. If you don't use the pi user, make sure to give the user sudo acess. Then initialize the Raspberry Pi with the following script

sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/schollz/find-lf/master/node/initialize.sh)"

Alternatively, you can do this using my script for PiBakery.

Also edit /etc/network/interfaces and remove the wpa-conf line for wlan1.

Do this for several Pis and then plug in the WiFi adapter that has "monitor" mode.

2. Start Pi cluster

First make sure you have SSH installed and nmap.

sudo apt-get install openssh-client openssh-server nmap

Its useful to add your SSH key to each Pi, which you can do just using:

ssh-keygen                                               # do this once
cat ~/.ssh/id_rsa.pub | ssh pi@1YOURADDRESS \
  "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"     # do for every Pi

Then download cluster.py for accessing the cluster

wget https://raw.githubusercontent.com/schollz/find-lf/master/tools/cluster.py

Then, to initialize, just run

python3 cluster.py initialize

to which you'll be asked for the information about your cluster. Choose any group that you want, but remember it, as you will need it to login to the FIND server. For the lf address, you can use the default (a public server) or set it to your own. See find-lf/server/README.md for more information.

To easily find which hostnames/IPs are on your network, use

python3 cluster.py list

Startup the Pi cluster using python3.py cluster start. You can check the status with python3 cluster.py status

3. Classify locations using Pi cluster

After the cluster is up in running, you need to do learning. Take a smart phone and identify its mac address, something like AA:BB:CC:DD:EE:FF. Take your phone to a location. Then activate the find-lf server to do learning either by switching on the find-lf website or running python3 cluster.py -u AA:BB:CC:DD:EE:FF -l location learn.

This is important! Before moving to a new location, make sure to turn off learning by switching to tracking. Activate this on the find-lf server using the the find-lf website or use python3 cluster.py track.

Repeat these steps for as many locations as you want.

4. Track all the cellphones!

Now just go to https://ml.internalpositioning.com and login using your group name to see tracking of all the phones!

You can also track a single phone using https://ml.internalpositioning.com/GROUP/dashboard?user=AA:BB:CC:DD:EE:FF.

License

Copyright 2015-2017 Zack Scholl ([email protected], @zack_118). All rights reserved. Use of this source code is governed by a AGPL license that can be found in the LICENSE file.

Todo

  • Determine the wlan0/1 of the Wi-Fi adapter automatically (currently it defaults to wlan1, which is right most of the time)

More Repositories

1

croc

Easily and securely send things from one computer to another ๐ŸŠ ๐Ÿ“ฆ
Go
23,068
star
2

howmanypeoplearearound

Count the number of people around you ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆ by monitoring wifi signals ๐Ÿ“ก
Python
6,759
star
3

find

High-precision indoor positioning framework for most wifi-enabled devices.
Go
5,006
star
4

find3

High-precision indoor positioning framework, version 3.
Go
4,494
star
5

progressbar

A really basic thread-safe progress bar for Golang applications
Go
3,367
star
6

hostyoself

Host yo' self from your browser, your phone, your toaster.
Go
1,777
star
7

rwtxt

A cms for absolute minimalists.
JavaScript
934
star
8

cowyo

A feature-rich wiki webserver for minimalists ๐Ÿฎ ๐Ÿ’ฌ
JavaScript
906
star
9

raspberry-pi-turnkey

How to make a Raspberry Pi image that can be deployed anywhere and assigned to a WiFi network without SSH ๐Ÿ‘Œ
Python
767
star
10

peerdiscovery

Pure-Go library for cross-platform local peer discovery using UDP multicast ๐Ÿ‘ฉ ๐Ÿ” ๐Ÿ‘ฉ
Go
594
star
11

closestmatch

Golang library for fuzzy matching within a set of strings ๐Ÿ“ƒ
Go
407
star
12

gojot

A command-line journal that is distributed and encrypted, making it easy to jot notes ๐Ÿ““
Go
343
star
13

PIanoAI

Realtime piano learning and accompaniment from a Pi-powered AI ๐ŸŽน
Go
331
star
14

spotifydownload

A dependency-free Spotify playlist downloader that should just work
Shell
318
star
15

poetry-generator

A Python2 based Backus-Naur poetry generator
Python
294
star
16

musicsaur

Music synchronization from your browser.
Go
280
star
17

offlinenotepad

An offline-first, secure, private notepad. ๐Ÿ“” โœ๏ธ
JavaScript
236
star
18

pluck

Pluck text in a fast and intuitive way ๐Ÿ“
Go
214
star
19

pake

PAKE library for generating a strong secret between parties over an insecure channel
Go
180
star
20

miti

miti is a musical instrument textual interface. Basically, its MIDI, but with human-readable text. ๐ŸŽต
Go
157
star
21

meanrecipe

Get a consensus recipe for your next meal. ๐Ÿช ๐Ÿฐ
Go
156
star
22

find3-cli-scanner

The command-line scanner that supports Bluetooth and WiFi
Go
142
star
23

playlistfromsong

Create an offline music playlist from a single song ๐ŸŽถ
Python
136
star
24

recursive-recipes

Visualize the recursive nature of recipes ๐Ÿฐ ๐Ÿช
Go
135
star
25

teoperator

Make OP-1 and OP-Z drum and synth patches from any sound. ๐ŸŽน
Go
134
star
26

jsonstore

Simple thread-safe in-memory JSON key-store with persistent backend
Go
130
star
27

getsong

Download any song mp3 with no dependencies except ffmpeg
Go
124
star
28

find3-android-scanner

An android app that scans Bluetooth and WiFi for FIND3
Java
119
star
29

linkcrawler

Cross-platform persistent and distributed web crawler ๐Ÿ”—
Go
111
star
30

ingredients

Extract recipe ingredients from any recipe website on the internet.
HTML
109
star
31

share

Simple file sharing from the browser and the command-line.
Go
106
star
32

faas

Make any Go function into a API (FaaS)
Go
96
star
33

_core

firmware for the zeptocore, zeptoboard, and ectocore
C
77
star
34

find-maraudersmap

Internal positioning for everyone, in the style of Harry Potter
HTML
67
star
35

broadcast-server

A simple Go server that broadcasts any data/stream.
Go
65
star
36

streammyaudio

Easily stream audio from any computer to the internet.
HTML
63
star
37

cowyodel

Easily move things between computers with a code phrase and https://cowyo.com ๐Ÿฎ ๐Ÿ’ฌ
Go
62
star
38

extract_recipe

Extract recipes from websites, calculates cooking times, collects nutrition info from USDA database
Python
61
star
39

crawdad

Cross-platform persistent and distributed web crawler ๐Ÿฆ€
Go
61
star
40

pikocore

source for the pikocore drum machine
C++
60
star
41

duct

Inspired by patchbay.pub
Go
59
star
42

svg2gcode

Converts svg to gcode for pen plotters
Go
53
star
43

snaptext

A simple webapp to send and receive self-destructing messages in real-time. โœ‰๏ธ โšก
Go
53
star
44

pywebsitechanges

Change detection with a simple Python script to email you whenever a website changes.
Python
51
star
45

rpi_ai

An AI developed for the Raspberry Pi
Python
50
star
46

websitechanges

Alerts you via email about a website change.
Go
47
star
47

kiki

An experimental social network that works offline.
Go
46
star
48

goagrep

agrep-like fuzzy matching, but made faster using Golang and precomputation.
Go
45
star
49

oooooo

digital tape loops for monome norns, x6.
Lua
43
star
50

readable

Making web pages readable in a browser and in the command line ๐Ÿ”— ๐Ÿ“–
Go
41
star
51

onetwothree

A responsive minimalist theme for Hugo that is simple as 1, 2, 3
CSS
39
star
52

logue

A collection of Korg logue patches for the NTS-1 (or possibly minilogue XD)
C
37
star
53

midi2cv-pi

Use a simple Python script, a few wires, and a MCP4725 to convert any MIDI signal to a control voltage.
Python
37
star
54

sqlite3dump

A Golang library for dumping SQL text
Go
35
star
55

wifiscan

A platform-independent WiFi scanning library for getting BSSID + RSSI
Go
35
star
56

norns.online

online norns with norns.online
Go
35
star
57

bol

Command-line and web journal that stays synchronized and encrypted across devices
Go
34
star
58

syncdir

Automatically discover peers and synchronize a folder
Go
33
star
59

18000

18,000 seconds of music.
SuperCollider
32
star
60

nyblcore

ATtiny85-based sample machine with tempo-based effects.
C++
31
star
61

beowulf_ssh_cluster

Skeleton program for a simple Beowulf cluster that uses ssh to communicate
Python
31
star
62

markdown2tufte

Process markdown into a nice Tufte-like website ๐Ÿ“–
CSS
31
star
63

carp

Browser-based Korg NTS-1 chord arpeggiator (carp) sequencer
JavaScript
28
star
64

httpfileserver

Wrapper for Golang http.FileServer that is faster (serving from memory) and uses less bandwidth (gzips when possible)
Go
27
star
65

browsersync

A simple live-reloading tool for developing HTML.
Go
26
star
66

tape-synth

Instructions to create a cassette synthesizer.
Go
26
star
67

squirrel

Like curl, or wget, but downloads directly go to a SQLite databse
Go
25
star
68

workshops

workshops
SuperCollider
23
star
69

patchitup

Backup your file to your remote server using minimum bandwidth.
Go
23
star
70

norns-desktop

norns in docker
Dockerfile
22
star
71

logger

Simplistic, opinionated logging for Golang
Go
21
star
72

mnemonicode

Go
20
star
73

boltdb-server

Fancy server and Go package for connecting to BoltDB databases
Go
20
star
74

zget

zack's wget
Go
19
star
75

wormhole

Transfer files over TCP in Go
Go
19
star
76

quotation-explorer

Explore and search over 120,000 quotations, with the click of a mouse ๐ŸŒŽ๐Ÿ’ฌ
Go
19
star
77

o-o-o

dot-connected fm synth and sequencer for norns
Lua
18
star
78

tapedeck

norns tape deck emulator.
Lua
17
star
79

amenbreak

a dedicated amen break script for norns.
Lua
16
star
80

zxcvbn

a norns script for a tracker on norns.
Lua
16
star
81

anonfiction

A CMS for reading and writing stories in a online magazine format. ๐Ÿ“–
Go
16
star
82

prevent-link-rot

Simple utility to convert links in any file to permanent links via the https://archive.org/web/ or http://perma.cc
HTML
16
star
83

raw

Go
16
star
84

mx.samples

like mr. radar or mr.coffee but for samples on norns.
Lua
15
star
85

supertonic

an instrospective drum machien
Lua
15
star
86

mx.synths

norns script for polyphonic synths
Lua
14
star
87

autojack

norns mod for automatically jacking in usb audio
Lua
14
star
88

fbdb

File based database
Go
14
star
89

broadcast

Lua
14
star
90

paracosms

norns script to play and sample many samples.
Lua
14
star
91

heartbpm

Control the tempo of electronic instruments with your heart rate. ๐Ÿ’— ๐ŸŽต
JavaScript
14
star
92

web-archiver

A tiny Python clone of https://archive.org/web/ for your own personal websites.
Python
13
star
93

album-at-the-place

Open-sourcing my latest music album.
12
star
94

indeterminate-music

A framework for creating indeterminate music (in development) ๐ŸŽต
HTML
12
star
95

ipfs-connect

Easily connect two computers in the IPFS
Go
11
star
96

googleit

Get results from search engines.
Go
11
star
97

stringsizer

A very simple way to encode short strings.
Go
11
star
98

supercollisions

collection of SuperCollider scripts
SuperCollider
11
star
99

amen

sampler & mangler for monome norns
Lua
11
star
100

string_matching

A simple and fast approach to selecting the best string in a list of strings despite errors or mispelling.
Python
11
star