Skip to main content

GitHub release PyPI release AUR release GitHub commits since latest release GitHub contributors File size PyPI monthly downloads (without mirrors) PyPI total downloads GitHub downloads

picosnitch

  • An extremely simple, reliable, and lightweight program for linux to help protect your privacy
    • It monitors your system and notifies you whenever it sees a new program that connects to the network
    • Or when the sha256 changes for one of those programs (can also check VirusTotal)
    • And features a curses based UI for browsing past connections
  • For advanced users who know what should be running on their system and when they should be making network connections
    • Only you can decide which programs to trust, so picosnitch leaves this decision up to you and just focusses on doing one thing well
    • A program you can't trust to make network connections also can't be trusted not to negate any firewall rules, so blocking or sandboxing these programs is out of scope for picosnitch (also beware of programs running as root that may try to stop/modify picosnitch)
    • However, you can still watch picosnitch logs with another program to block connections once detected, picosnitch can be used with any other firewall tool and does not impact performance since it only monitors connections and does not intercept them
  • Inspired by programs such as GlassWire, Little Snitch, and OpenSnitch

installation

PPA for Ubuntu and derivatives

  • sudo add-apt-repository ppa:elesiuta/picosnitch
  • sudo apt update
  • sudo apt install picosnitch

AUR for Arch and derivatives

PyPI for any Linux distribution with Python >= 3.8

  • install the BPF Compiler Collection python package for your distribution
    • it should be called python-bcc or python-bpfcc
  • install picosnitch using pip
    • pip3 install "picosnitch[full]" --upgrade --user
  • create a service file for systemd to run picosnitch (recommended)
    • picosnitch systemd
  • optional dependencies (should already be installed or install automatically)
    • for notifications: dbus-python, python-dbus, or python3-dbus (name depends on your distro)
    • for VirusTotal: python-requests

usage

  • 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
  • user interface for browsing past connections
    • start with picosnitch view
    • space/enter: filter on entry backspace: remove filter h/H: cycle through history t/T: cycle time range r: refresh view q: quit
  • show usage with picosnitch help

configuration

  • config is stored in ~/.config/picosnitch/config.json
    • restart picosnitch if it is currently running for any changes to take effect
{
  "DB retention (days)": 365, # How many days to keep connection logs in snitch.db
  "DB sql log": true, # Write connection logs to snitch.db
  "DB text log": false, # Write connection logs to conn.log
  "DB write limit (seconds)": 1, # Minimum time between writing connection logs
  # increasing it decreases disk writes by grouping connections into larger time windows
  # reducing time precision, decreasing database size, and increasing hash latency
  "Desktop notifications": true, # Try connecting to dbus to show notifications
  "Log addresses": true, # Log remote addresses for each executable
  "Log commands": true, # Log command line args for each executable
  "Log ignore": [], # List of process names (str) or ports (int)
  # will omit connections that match any of these from the connection log
  # the process name and executable will still be recorded in record.json
  "Set RLIMIT_NOFILE": null, # Set the maximum number of open file descriptors (int)
  # it is used for caching process executables (typical system default is 1024)
  # this is good enough for most people since only one copy of each executable is cached
  "VT API key": "", # API key for VirusTotal, leave blank to disable (str)
  "VT file upload": false, # Upload file if hash not found, only hashes are used by default
  "VT request limit (seconds)": 15 # Number of seconds between requests (free tier quota)
}

logging

  • 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
  • the full connection log is stored in ~/.config/picosnitch/snitch.db
    • this is used for picosnitch view
    • note, connection times are approximate and may be off by a few seconds
  • if DB text log is enabled, the full connection log is also written 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)
    • executable,name,cmdline,sha256,time,domain,ip,port,uid,count
  • the error log is stored in ~/.config/picosnitch/error.log
    • errors will also trigger a notification and are usually caused by far too many processes/connections
    • for most people in most cases, this should raise suspicion that some other program may be misbehaving

building from source

  • install dependencies listed under installation
  • install python-setuptools
  • install picosnitch with python setup.py install --user
  • see other options with python setup.py [build|install] --help

Metadata

Release files for picosnitch 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for picosnitch 0.8.0
File Size Uploaded Provenance Actions
picosnitch-0.8.0.tar.gz 33.9 kB Without provenance Details for picosnitch-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for picosnitch 0.8.0
File Interpreter ABI Platform Actions
picosnitch-0.8.0-py3-none-any.whl Python 3 none any Details for picosnitch-0.8.0-py3-none-any.whl

Total release size: 68.2 kB

Release files / picosnitch-0.8.0.tar.gz

Download URL picosnitch-0.8.0.tar.gz
Size 33.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5e458eeae3f0d7b0e0854cbe2511bda83933575353ceb018d511bce25ac3e4cb
BLAKE2b-256 checksum
How to use checksums
d8bfb763bb830468e6128f0d080a221d03f06a0eaabbe52527e4e9c2369d7b89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / picosnitch-0.8.0-py3-none-any.whl

Download URL picosnitch-0.8.0-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a6dcf62dae04101b982e3493300063e4fdbee3c446970b55f931fa2f909215a
BLAKE2b-256 checksum
How to use checksums
610e011f77911b2a460ee19e51fecd2e30e929f7b93557bc579be609868c9454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for picosnitch 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page