This release is a pre-release and may not be stable for production use.
Probolos
A deny-by-default USB gate for Linux. New USB devices stay switched off until you decide. While a device waits, Probolos checks what it claims to be, whether those claims add up and, optionally, what it does and what its storage holds.
Probolos (πρόβολος) is Greek for a barrier set in front: the thing you must get past first.
Beta (1.0.0b2). It runs on real hardware, but it has never been tested against a real attack device (Rubber Ducky, O.MG cable). Do not make it your only protection. Its known weak spots are listed in SECURITY.md.
How it works
Linux binds a driver as soon as a USB device appears, so a fake keyboard can
type before anything notices. Probolos sets authorized_default=0 on every
USB root hub, so a new device arrives switched off. It is checked in up to
four stages, and only your answer switches it on.
| Stage | Question | The device is |
|---|---|---|
| 1 · Identity | What does it claim to be? | off |
| 2 · Consistency | Do its claims agree? (a "USB stick" that is also a keyboard?) | off |
| 3 · Behaviour | Does it type by itself? | on for a few seconds, input captured |
| 4 · Storage | What partitions does it carry? | on briefly, read-only, never mounted |
Stages 3 and 4 switch the device on for a moment, and keys it sends before its
input is captured can still get through. --observe 0 --no-storage-scan keeps
unknown devices fully off until you answer.
Devices you allowed with "always" get in without a question, unless something CRITICAL turns up.
Quick start
git clone https://github.com/capitan0n/probolos
cd probolos
sudo pacman -S python-pyudev # Debian/Ubuntu: sudo apt install python3-pyudev
sudo python3 -m probolos
Plug in a device: you get a report and a question. Ctrl-C stops Probolos and
reopens the gate.
Keep a way back in while testing: SSH, or the laptop's built-in keyboard (often PS/2, which Probolos never touches). Internal USB ports (
removable=fixed) are not gated unless you add--gate-fixed-ports, and neither is a port given to--allow-port, even while the screen is locked (see SECURITY.md).
Desktop prompts and privilege separation (recommended)
sudo python3 -m probolos --privsep --agent --agent-user "$USER"
python3 -m probolos.agent # in your desktop session
--privsepsplits Probolos in two: a small root "gate" that flips the USB switches, and an unprivileged analyzer that does everything else. The analyzer runs asnobodyby default; onceinstall.shhas created theprobolosaccount, add--privsep-user probolos(safer, see SECURITY.md).--agentasks through desktop dialogs, with more friction for riskier devices:- one dialog for a plain storage device with no warnings;
- two dialogs for anything that can type or carry network traffic, or that raised a warning;
- a 10-second countdown before "Allow anyway" for a CRITICAL finding.
Install as a service
sudo ./install.sh # install and start; re-run after `git pull` to update
sudo ./install.sh --uninstall # remove (device history is kept)
This copies the code to /opt/probolos (owned by root), adds a probolos
command (sudo probolos --history), runs the gate as a system service (with
--privsep, analyzer as the probolos account) and the desktop prompt as a
user service for the account that ran sudo. Details:
systemd/README.md.
When there is no desktop to ask (login screen, logout), new devices are held switched off and asked about once the prompt is back. Remembered devices still get in.
Card readers
A card reader is the USB device; the card inside it is not. Swapping cards does not re-plug anything, so once a reader is allowed, every card you insert later gets in without a question.
--watch-media adds a watcher for that. When a card goes into an allowed
reader (or one already plugged in when Probolos started), it reads the card's
layout (raw, read-only, never mounted) and reports:
- an EFI system or hidden partition (CRITICAL);
- a card inserted while the screen is locked (WARNING);
- a layout different from the first card seen in that slot;
- a card the reader cannot read (
UNREADABLE CARD, after 15 s).
The same card rules apply at the plug-in prompt to a card that is already in the reader. The card you approved there is not judged again, and a card the reader announces twice is reported once.
It detects; it does not block. On a CRITICAL card:
--media-policy log(default): it is reported, nothing more. Your desktop may still mount it.--media-policy deauthorize: the whole reader is switched off, every slot. Replug the reader to get it back; the card inside is checked again (at the plug-in prompt, or by the watcher for a reader you allowed with "always").
Under --privsep this also lets the analyzer read every USB storage device it
watches (card readers, but also sticks and USB disks) and switch it off, never
on.
Stop automount (recommended for stage 4 and --watch-media)
Probolos never mounts anything, but your desktop may mount a stick or card
while it is being checked. Either skip the storage check (--no-storage-scan)
or stop desktop automount for USB storage:
sudo tee /etc/udev/rules.d/60-probolos-inhibit-automount.rules <<'EOF'
# Probolos reads USB storage before anything mounts it.
SUBSYSTEM=="block", ENV{ID_BUS}=="usb", ENV{UDISKS_IGNORE}="1"
EOF
sudo udevadm control --reload # then replug the device
- Works on KDE Plasma and GNOME.
UDISKS_AUTO="0"is not enough on KDE, which ignores it. On KDE you can instead turn off System Settings → Disks & Cameras → Device Auto-Mount. - It applies to every USB drive, also when Probolos is not running, and
hides them from the file manager. Mount by hand with
udisksctl mount -b /dev/sdX1. Delete the file and reload to undo. - It only stops udisks-based automount. Each card report says whether automount was off.
Common options
| Option | What it does |
|---|---|
--observe SEC |
length of the behaviour check (default 3; 0 skips stage 3) |
--no-storage-scan |
skip stage 4 |
--privsep, --privsep-user USER |
privilege separation, and the analyzer's account (default nobody) |
--agent |
ask through desktop dialogs |
--timeout SEC |
deny after SEC seconds without an answer (default 0: the terminal waits; a desktop dialog gives up after 60 s) |
--lock-policy queue|deny|ignore |
devices plugged in while the screen is locked (default queue: ask on unlock) |
--watch-media, --media-policy log|deauthorize |
watch cards in allowed readers, and what to do with a CRITICAL card |
--allow-port PORT |
never gate this port, even while the screen is locked (keep a rescue keyboard there) |
--dry-run |
report only; never block or allow anything |
--list [-v] |
show attached devices (read-only) |
--history [-v] |
every device seen: its type, decisions and changes |
--trusted, --remove-trusted N|PATTERN|all |
list or forget remembered devices (history is kept) |
--remove-all |
forget remembered devices and all history (asks first) |
--capture-payload |
record what a quarantined device typed (off by default) |
--log FILE |
append every decision to FILE as JSON lines (under --privsep the analyzer writes it: use /var/lib/probolos/state/) |
--release |
recovery: switch blocked devices on and reopen the gate |
python3 -m probolos --help lists them all.
If something goes wrong
The gate reopens whenever Probolos exits, crashes or is stopped; only
kill -9 or a kernel panic can prevent that. If devices stay blocked:
sudo probolos --release # after install.sh
sudo python3 -m probolos --release # from the source folder
--release refuses while Probolos is still running. If Probolos hangs, force
the gate open from another terminal or over SSH. The file must be created by
root, and the watchdog must be on (the default; --watchdog 0 turns off
both):
sudo touch /run/probolos.panic
Last resort, without Probolos:
for hub in /sys/bus/usb/devices/usb*/authorized_default; do echo 1 | sudo tee "$hub"; done
Then replug anything still dead, or switch it on with
echo 1 | sudo tee /sys/bus/usb/devices/<name>/authorized.
What it does not protect against
- bugs in the kernel's own USB code (reached before Probolos sees the device);
- a device that behaves for days and attacks later;
- a perfect copy of a real device (such as an O.MG cable) that stays quiet while it is checked;
- Thunderbolt/DMA, USB-C power delivery, Bluetooth and other wireless devices;
- anything after you allow a device (except cards, with
--watch-media); - malware inside files: it reads partition tables, not files.
The full list is in SECURITY.md; the exact feature list is in CAPABILITIES.md.
Status
- Tested on real hardware: closing and restoring the gate on all five root
hubs of a laptop; USB sticks through stages 1 and 4; descriptor-change
detection, including the harmless change of a stick moved between USB 2 and
USB 3 ports; both prompt types;
--watch-mediawith a USB card reader on KDE Plasma. The service runs on the author's own machine. - Not yet tested on real hardware: stage 3 against a real attack device,
--close-race-window, and the planned matrix of devices and desktops (ROADMAP 2.2).
The feature set is frozen since 0.11.0: until 1.0 only fixes, tests and documentation go in (ROADMAP.md). Defects found since the freeze are logged in docs/QA-LOG.md; what changed is in CHANGELOG.md.
Requirements
- Linux with USB authorization in sysfs (
/sys/bus/usb/devices/*/authorized) - Python 3.10+ and
pyudev(nopython-evdevneeded) - Optional:
PyYAMLfor--rules FILE;kdialog,zenityortkinterfor desktop prompts
Development
python3 -m unittest discover -b -s tests -t . # the whole test suite
python3 -m tests.run_all # the same tests; skips the few that need AF_UNIX sockets
ruff check . # lint
python3 -m mypy # type check of the root-side code
Both test commands collect the same tests: if their totals ever differ, that is
a bug. The suite needs no root, no USB hardware and no pyudev. CI pins the
tool versions in .github/requirements-*.txt and keeps a coverage floor on the
root-side code.
tests/ has one file per area of the code. testbed/ emulates USB devices in
software (BadUSB, descriptor drift, ...) so the CRITICAL paths can be tried
without hardware (testbed/README.md). Internals and the map of the
tests: docs/TECHNICAL-REFERENCE.md.
License
GPL-3.0-or-later; see LICENSE. This is beta, security-relevant software, provided as is, without warranty.
Metadata
Release files for probolos 1.0.0b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| probolos-1.0.0b2.tar.gz | 571.2 kB | With provenance | Details for probolos-1.0.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| probolos-1.0.0b2-py3-none-any.whl | Python 3 | none | any | Details for probolos-1.0.0b2-py3-none-any.whl |
Total release size: 862.9 kB
Release files / probolos-1.0.0b2.tar.gz
| Download URL | probolos-1.0.0b2.tar.gz |
|---|---|
| Size | 571.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fa09efd6db03e33652b42a4aec734cf1ef2f95350d5390939d5aef3a0e23029
|
|
BLAKE2b-256 checksum How to use checksums |
fdc2fc8c2af6ee65a09585035a5ddc2336652acfdc55429916c3efabbcea3ea6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / probolos-1.0.0b2-py3-none-any.whl
| Download URL | probolos-1.0.0b2-py3-none-any.whl |
|---|---|
| Size | 291.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9a9fa6f6bcfc7106976eea215293f5347762d887e4882c4c8de731082c8be11
|
|
BLAKE2b-256 checksum How to use checksums |
773895809e185139b63d2665a5aac625ee992816937ae03fd5bf6750462583f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for probolos 1.0.0b2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for probolos-1.0.0b2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA 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.