Skip to main content

GitHub release PyPI release GitHub commits since latest release GitHub contributors File size Monthly downloads (without mirrors) Total 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)
  • Inspired by programs such as GlassWire, Little Snitch, and OpenSnitch

getting started

installation

  • install from PyPI with
    pip3 install picosnitch[full] --upgrade --user
  • depends on the BPF Compiler Collection (e.g. for Ubuntu)
    sudo apt install python3-bpfcc

usage

  • you can run picosnitch either as a standalone daemon, or with systemd
    • use the same method to stop picosnitch as you used to start it
  • run as standalone daemon
    • start with picosnitch start
    • stop with picosnitch stop
    • restart with picosnitch restart
  • run with systemd
    • setup with picosnitch systemd
    • autostart on reboot with systemctl enable picosnitch
    • start with systemctl start picosnitch
    • stop with systemctl stop picosnitch
    • restart with systemctl restart picosnitch
    • show detailed status with systemctl status picosnitch
  • user interface for browsing past connection
    • 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
  • other commands
    • show basic status picosnitch status
    • show version info picosnitch version
    • show help 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
  "DB write limit (seconds)": 1, # Minimum time between writing logs to snitch.db
  # increasing it decreases disk writes by grouping connections into larger time windows
  # reducing time precision, decreasing database size, and increasing hash latency
  # values too large could cause processes to fall out of cache before hashing, see NOFILE
  "Desktop notifications": True, # Try connecting to dbus for creating system 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 (snitch.db)
  # the process and executable will still be recorded in summary.json
  "Set RLIMIT_NOFILE": None, # Set the maximum number of open file descriptors (int)
  # increasing it allows more processes to be cached (typical system default is 1024)
  # improving the performance and reliability of hashing processes (also caches hash)
  # e.g. short lived processes that may terminate before they can be hashed will live in cache
  "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 short summary of seen processes is stored in ~/.config/picosnitch/summary.json
    • this is used for determining whether to create a notification
{
  "Latest Entries": [], # Log of entries by time
  "Names": {}, # Log of processes by name containing respective executable(s)
  "Processes": {}, # Log of processes by executable containing respective name(s)
  "SHA256": {} # Log of processes by executable containing sha256 hash(es) and VirusTotal results
}
  • the full connection log is stored in ~/.config/picosnitch/snitch.db
    • this is used for picosnitch view
  • 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 from source using python 3 with
    python setup.py install --user
  • dependencies installed automatically from PyPI on setup if not already present
    dbus-python psutil vt-py
  • additional dependency, requires manual installation
    bcc

Metadata

Release files for picosnitch 0.6.1

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.6.1
File Size Uploaded Provenance Actions
picosnitch-0.6.1.tar.gz 32.0 kB Without provenance Details for picosnitch-0.6.1.tar.gz

Built distribution (wheel)

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

Total release size: 64.5 kB

Release files / picosnitch-0.6.1.tar.gz

Download URL picosnitch-0.6.1.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dfe6afc85c758070a843ff8cf98358330674d27fa8f48fa8acd7fe6dbd1abd66
BLAKE2b-256 checksum
How to use checksums
15419048d3edf19f5a39ce7d105afa12a3d256c7880be3053efb192a420e64f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 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.6.1-py3-none-any.whl

Download URL picosnitch-0.6.1-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4214ed428ecd562216c234744aea5179aee11e085460a2326edb31ba316f19c9
BLAKE2b-256 checksum
How to use checksums
583f61ff3de1cfbe546994bc2ac2e0a1a9fe2dd23bea8952f715afd8b5b5ae24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 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.6.1

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.6.1 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