GARRETT(8) System Administration GARRETT(8)

garrett - host intrusion sentinel that stops what it catches

garrett enroll --server address [--key key] [--mode kill|decide|pause|report] [--label name]
garrett status
garrett forget
garrett cases
garrett trust|stop|release|restore case
garrett confirm case
garrett learned [--reset]
garrett update [--check]
garrett run

garrett watches this machine's running programs and their connections, scores them on the machine, and pauses or ends a program it judges hostile. Installed with nothing else, it protects the machine it is on and keeps its cases there. Enrolled, it reports cases to a Sentinel service that you run, and applies what that service has learned from the rest of your machines.

It normally runs as the garrett systemd service. Enrolling starts the service.

Enrol this machine with a Sentinel service and start the service. The enrolment key may be given in the environment variable SENTINEL_ENROLL_KEY instead of on the command line.
Show which service this machine reports to, and its response mode.
Stop the service and remove this machine's credential.
List the latest cases on this machine.
This program is mine: leave it alone from now on.
Decide a program the agent paused: end it, or let it continue.
Put back everything that was cleaned up after a stop: quarantined files and switched-off startup entries.
That was an attack. If the program runs again the agent will not leave it alone, and the verdict is something it learns from.
What this machine has learned from your verdicts, and whether it is still settling in. --reset forgets it. See LEARNING.
Install the newest version now. --check only says whether there is one. The running agent does this by itself a few times a day; see UPDATES.
Watch and report in the foreground. The service runs this.

End a hostile program and everything it started, at once. The default.
Freeze it, then let the service's decision model say stop, release or hold.
Freeze it and wait for an operator.
Only report.

The service may hold a machine to a lower mode than it asked for.

/etc/garrett/garrett.conf
Optional, mode 0600. Lines SERVER=, ENROLL_KEY=, and optionally MODE=, LABEL=, CLEAN=off, UPDATE=off and LEARN_HOURS=. When this file exists and the machine is not enrolled, the service enrols itself on first start.
/var/lib/garrett/
This machine's credential and what the agent remembers about it.

A fresh install settles in for a day (LEARN_HOURS). What is plainly an attack, such as a web server starting a shell that downloads and runs a script, is stopped from the first second. A program that only its score speaks against is reported and left running, during that day and after it, until you say what it is with trust or confirm: it was on the machine before garrett knew the machine, and may be yours.

On a machine with no service, every verdict you give (trust, restore, release, stop, confirm) is kept as the case's signals and nothing else. A signal you keep calling yours comes to count for less here, one you keep confirming for more, by at most two points, and never so far that a confirmed attack or a known attack pattern would go unreported. Two signals that your confirmed attacks share become a sign of attack on this machine. No model is involved. An enrolled machine learns from its service instead.

The running agent asks the project's site a few times a day whether a newer version is out, and installs it. It installs nothing unless the site's list of program files carries the project's signature, names a version newer than the one installed, and matches the file it downloaded. Where this package is installed, apt does the installing from the project's signed repository. UPDATE=off in the configuration file turns this off.

When the service has fleet blocking on, garrett keeps one nftables table named garrett. It is removed when the service stops and when the package is removed.

systemctl(1), nft(8)

November 2026 garrett