Have you ever wondered which companies your smart devices were talking to? Or how much data they send and how often?
Aretha captures meta data about the network traffic of devices connected to it. Run Aretha on a device with a WiFi hotspot and connect your devices - you might be surprised about what you see.
-
Install package dependcies: PostgreSQL, NodeJS, Node Package Manager (npm), Python3, Wireshark CLI (sometimes called tshark)
-
Install python3 dependencies:
pip3 install -r requirements.txt
-
Install NodeJS dependency angular:
cd ui/ && npm install && npm install -g @angular/cli
-
Copy
config-sample.cfg
toconfig.cfg
and add values for at least [ipdata][key], [postgres][database], [postgres[username], and [postgres][password] -
Configure the database from the schema:
/scripts/reset-database.py
-
If you are using iptables-based functionality (
/api/aretha/enforce
), ensure that iptables rules will persist across reboots (e.g. by installing the iptables-persistent package on debian), and that the user running Aretha is able to run iptables as root without a password
-
In
/ui
runng serve
-
In
/scripts
runcapture.py
,loop.py
andgunicorn --bind 127.0.0.1:4201 -w2 -t4 --timeout 300 api:app
-
The web front end will be available at
localhost:4200
, and the API atlocalhost:4201
-
Copy
service/iotrefine-sample.service
to/etc/systemd/system/iotrefine.service
and edit in the marked fields -
Copy
service/daemon-sample.sh
toservice/daemon.sh
and edit the marked fields -
Start and stop the service by running
sudo systemctl {start|stop} iotrefine
-
Enable or disable Aretha on boot by running
sudo systemctl {enable|disable} iotrefine
-
To have chromium point at Aretha on login, copy and fill out logintask-sample.desktop and move it to ~/.config/autostart/
Run scripts/reset-database.py
<start> and <end> are Unix timestamps (minimim 0 maximum now)
<interval> is the interval in minutes that impacts will be grouped into (minimum 1)
Returns the amount of traffic (impact) sent and received between device/ip pairs between <start> and <end>. These are aggregated into <interval> minute intervals. Also returns data about known devices and companies (identical to the devices and geodata endpoints).
Event stream of new data about companies, devices, and impacts. Companies and devices are sent on discovery, impacts are aggregated and sent every minute.
List the name, ip, country code, country name, latitude, and longitude of all companies that have sent or received traffic through Aretha.
List the names, MAC addresses, and nicknames of all local devices that have sent traffic through Aretha.
Set the nickname of device with MAC address <mac> to <nickname>.
Provide a counter example to one of the standard Aretha questions (see Aretha project for more information).
Block network traffic from or to any IP addresses owned by <company>. By default, this applies to all devices connected to Aretha. To only block traffic from a single local device, supply the device's MAC address in the <mac> field.
Unblock network traffic from or to any IP addresses owned by <company>. By default, this applies to blocks placed on all traffic only. To unblock traffic from a single local device, supply the device's MAC address in the <mac> field.