avwatch

File integrity monitoring + YARA-lite scan + event-driven file routing

v1.2.2
Linux

Quick Start

Install via jcli (recommended)

jcli install avwatch

Baseline then check

avwatch baseline --path /etc --name etc-baseline       # snapshot every file
# ... time passes, an attacker tampers a file ...
avwatch check --name etc-baseline                       # diff vs the baseline
avwatch scan --path /var/www                            # YARA-lite signature scan

What it does

avwatch is a tiny offline file-integrity-monitoring (FIM) and signature-scan CLI. baseline records a SHA-256 + size + mtime + mode for every file under a path. check re-walks and emits a finding for every new / modified / deleted / permission-changed file. scan searches file bytes against a small embedded YARA-lite ruleset (EICAR, PHP webshells, reverse-shell patterns). Designed for hardened / airgapped systems where a full AV stack is impractical.

Subcommands

CommandStatusWhat it does
baseline --path <P> [--name <N>]workingBuild a SHA-256 baseline of every file under --path
check --name <N>workingRe-walk and diff: check.new / check.modified / check.deleted / check.perm_changed
scan --path <P>workingYARA-lite signature scan
watch --path <P>stubContinuous inotify-backed watcher (needs notify crate)

Diff severities

FindingSeverityWhen
check.modifiedHighSHA-256 changed — the content was tampered
check.newMediumA file appeared that wasn't in the baseline
check.deletedMediumA baselined file is gone
check.perm_changedLowSame content, different mode (e.g. chmod 777)

On-disk layout

~/.avwatch/baselines/<name>.db    # SQLite DB, chmod 600
~/.avwatch/signatures.toml         # operator pluggable signatures (stub)

The AVWATCH_HOME env var overrides the default — tests sandbox it with a tempdir; the live deploy reads from the operator's home.

Not a replacement for full YARA: the embedded scanner is substring-based, not the full YARA grammar. It catches the seven hard-coded signature families but won't compile real .yar rule files. If you need that, install YARA separately and pipe avwatch's file-list output into yara <rules>.