
- 🔔 Receive notifications whenever a new program connects to the network, or when it's modified
- 📈 Monitors your bandwidth, breaking down traffic by executable, hash, parent, domain, port, or user over time
- 🌍 Web and terminal interfaces with GeoIP lookups for each connection (IP Geolocation by DB-IP)
- 🛡️ Can optionally check hashes or executables using VirusTotal
- 🚀 Executable hashes are cached based on device + inode for improved performance
- 🐳 Detects applications running inside containers, multiple versions of the same app are differentiated based on their hash
- 🕵️ Uses BPF for accurate, low overhead bandwidth monitoring and fanotify to watch executables for modification
- 👨👦 Since applications can call others to send/receive data for them, the parent executable and hash is also logged for each connection
- 🧰 Pragmatic and minimalist design focusing on accurate detection with clear and reliable error reporting when it isn't possible
AUR for Arch and derivatives 
Details
PPA for Ubuntu and derivatives 
Details
sudo add-apt-repository ppa:elesiuta/picosnitch
sudo apt update
sudo apt install picosnitch
- optionally install dash with pip or pipx
sudo apt install pipx
pipx install dash
- you may require a newer version of BCC (unofficial PPA) since the version in the Ubuntu repos sometimes lags behind its supported kernel
OBS for Debian and derivatives 
Details
- visit the OBS picosnitch page and follow the instructions for your distribution
- optionally install dash with pip or pipx
sudo apt install pipx
pipx install dash
- if you're having issues on bullseye, you may need a newer version of BCC
OBS for openSUSE Tumbleweed and derivatives 
Details
sudo zypper addrepo https://download.opensuse.org/repositories/home:elesiuta/openSUSE_Tumbleweed/home:elesiuta.repo
sudo zypper refresh
sudo zypper install picosnitch
Copr for Fedora, Mageia, Mandriva, and derivatives 
Details
sudo dnf copr enable elesiuta/picosnitch
sudo dnf install picosnitch
- optionally install dash with pip or pipx
sudo dnf install pipx
pipx install dash
Details
- install and enable using the picosnitch service option
- add
services.picosnitch.enable = true;
to your Nix configuration file (typically /etc/nixos/configuration.nix
) - run
sudo nixos-rebuild switch
- workaround for "Failed to compile BPF module"
systemctl stop picosnitch
sudo picosnitch start-no-daemon
then send SIGINT (ctrl + c)systemctl start picosnitch
PyPI for any Linux distribution with Python >= 3.8 
Details
- install the BPF Compiler Collection python package for your distribution
- it should be called
python-bcc
or python-bpfcc
- install picosnitch using pip or pipx
pipx install "picosnitch[full]"
- create a service file for systemd to run picosnitch (recommended)
- optional dependencies (will install from PyPI with
[full]
if not already installed)
GitHub for installing from source 
Details
- clone the repo or download
picosnitch.py
and setup.py
- install the BPF Compiler Collection python package for your distribution
- it should be called
python-bcc
or python-bpfcc
- install psutil
- install
python-setuptools
- install picosnitch with
python setup.py install --user
- see other options with
python setup.py [build|install] --help
- you can also run the script
picosnitch.py
directly
- Running picosnitch
- enable/disable autostart on reboot with
systemctl enable|disable picosnitch
- start/stop/restart with
systemctl start|stop|restart picosnitch
- or if you don't use systemd
picosnitch start|stop|restart
- Web user interface for browsing past connections
- start with
picosnitch dash
- visit http://localhost:5100 (you change this by setting the environment variables
HOST
and PORT
)
- Terminal user interface for browsing past connections
- start with
picosnitch view
space/enter/f
: filter on entry e
: exclude entry backspace/F/E
: remove filter h/H
: step through history (time offset) t/T
: cycle time range u/U
: cycle byte units r
: refresh view q
: quit
- Show usage with
picosnitch help
- Config is stored in
~/.config/picosnitch/config.json
- restart picosnitch if it is currently running for any changes to take effect
{
"DB retention (days)": 30,
"DB sql log": true,
"DB sql server": {},
"DB text log": false,
"DB write limit (seconds)": 10,
"Dash scroll zoom": true,
"Dash theme": "",
"Desktop notifications": true,
"Every exe (not just conns)": false,
"GeoIP lookup": true,
"Log addresses": true,
"Log commands": true,
"Log ignore": [],
"Log ports": true,
"Perf ring buffer (pages)": 256,
"Set RLIMIT_NOFILE": null,
"Set st_dev mask": null,
"VT API key": "",
"VT file upload": false,
"VT request limit (seconds)": 15
}
- A log of seen executables is stored in
~/.config/picosnitch/exe.log
- this is a history of your notifications
- A record of seen executables is stored in
~/.config/picosnitch/record.json
- this is used for determining whether to create a notification
- it contains known process name(s) by executable, executable(s) by process name, and sha256 hash(es) with VirusTotal results by executable
- Enable
DB sql log
(default) to write the full connection log to ~/.config/picosnitch/snitch.db
- this is used for
picosnitch dash
, picosnitch view
, or something like DB Browser - note, connection times are based on when the group is processed, so they are accurate to within
DB write limit (seconds)
at best, and could be delayed if the previous group is slow to hash - notifications are handled by a separate subprocess, so they are not subject to the same delays as the connection log
- Use
DB sql server
to write the full connection log to a MariaDB, MySQL, or PostgreSQL server
- this is independent of
DB sql log
and is used for providing an off-system copy to prevent tampering (use GRANT to assign privileges and see limitations for other caveats) - to configure, add the key
client
to DB sql server
with value mariadb
, psycopg
, psycopg2
, or pymysql
, you can also optionally set table_name
- assign remaining connection parameters for mariadb, psycopg, or pymysql to
DB sql server
as key/value pairs
- Enable
DB text log
to write the full connection log to ~/.config/picosnitch/conn.log
- this may be useful for watching with another program
- it contains the following fields, separated by commas (commas, newlines, and null characters are removed from values)
entry time, sent bytes, received bytes, executable path, process name, cmdline, sha256, parent executable, parent name, parent cmdline, parent sha256, user id, local port, remote port, local address, remote address, domain
- The error log is stored in
~/.config/picosnitch/error.log
- errors will also trigger a notification and are usually caused by far too many or extremely short-lived processes/connections, or suspending your system while a new executable is being hashed
- while it is very unlikely for processes/connections to be missed (unless
Every exe (not just conns)
is enabled), picosnitch was designed such that it should still detect this and log an error giving you some indication of what happened - for most people in most cases, this should raise suspicion that a program may be misbehaving
- a program should not be able to hide from picosnitch (either by omission or spoofing another program) without picosnitch reporting an error
- see limitations below for other sources of errors
- Despite focusing on reliability and notable advantages over existing tools, picosnitch still has some limitations depending on its use case
- When used as a security/auditing tool, a program with sufficient privileges might alter picosnitch or its logs, or employ alternative communication mechanisms not monitored by picosnitch and potentially invisible to the kernel, some mitigations include
- Detecting open sockets and identifying the process is very reliable with BPF; however, the executable name and path could be ambiguous or spoofed if malicious, as a countermeasure, picosnitch hashes the executable to provide a reliable identifier
- only the process executable itself is hashed, leaving out shared libraries (e.g. LD_PRELOAD rootkits), extensions, or scripts which could become compromised
- for extremely short-lived processes, picosnitch may not be able to open a file descriptor in time in order to hash it (this is rare)
- the device and inode of the opened file descriptor are checked against what was reported by the BPF program to detect if the executable was replaced; however, BTRFS uses non-unique inodes, negating this protection (a negligible issue mentioned for completeness)
- if hashing the executable fails for any reason, the traffic will still be logged with all available information, accompanied by an error notification
- A large influx of new processes or connections may lead to some missed log entries as picosnitch preserves system traffic latency rather than impeding it to catch up with processing event callbacks
- such incidents will be detected, logged as an error, and you will be notified
- you can mitigate this by increasing
Perf ring buffer (pages)
- In addition to bugs, please report any other limitations that may have been missed!