CLI-Anything Bundle #66 — AIDE Intrusion Detection Trust Recon Pack
Four agent-native read-only harnesses that census the AIDE intrusion-detection trust surface: the layer that decides whether this host can still PROVE its own file integrity — the installed checker binary and its first-run posture, the aide.conf rule and database grammar, the report channel family, and the baseline snapshot database. No other bundle owns this surface — #43 keeps package-manager verification (the dpkg + conffile layer), #41 keeps the LSM/mandatory-access posture (census: 0 exact / 0 name-class substring token collisions across the whole shipping catalog, 139 Gumroad products pulled fresh). AIDE's own install, config, report and baseline-database layers are unclaimed census territory.
- aidepeek — AIDE install/binary trust census (aide binaries on /usr/bin /usr/sbin /usr/local/bin /bin, stat-only and never executed with usrmerge identities deduped; /etc/aide.conf candidate locations stat-only; /var/lib/aide database artifacts aide.db/.new/.gz; /var/log/aide report listings; /usr/share/doc/aide* docs listings; dpkg status aide rows parsed as text with rpm db binaries never read). First-run no-db posture = BINARY_NO_DB finding; config without binary = ORPHAN_CONFIG; aide.db.new without aide.db = DB_NEW_NO_DB (interrupted refresh); multiple distinct binaries = MULTI_BINARY; world-writable log dir = LOGDIR_WORLD_WRITABLE; honest absence rc6.
- aideconfpeek — aide.conf trust parse (the documented grammar read one line at a time: database=/database_in=/database_out=/database_new=, gzip_dbout, root_prefix=, verbose=, warn_dead_symlinks; sorted @@include descent honoring the census cap; @@define/@@undef rows; rule classes R = > with attribute strings). Database target outside /var/lib/aide = DB_PATH_UNTRUSTED finding; R-class rule with no checksum attribute = RULE_NO_CKSUM; no rule covering /etc = ETC_RULE_MISSING; world-writable config or include dir = CONF_WORLD_WRITABLE / INCLUDE_UNTRUSTED; duplicate database= rows = DUP_DB_LINE; zero report_url rows = REPORT_URL_MISSING; honest rc6 when no config exists.
- aiderptpeek — report channel trust census (the report_url family parsed: stdout, stderr, syslog: facilities, mail: addresses, file: paths with legacy numeric aliases carried; report_format / report_level / report_ignore_* / report_top_dirs rows; the live log surface /var/log/aide/aide.log plus .1 rotation with size, mtime and perms). Config with no report channel = NO_REPORT_URL finding; file: target under a world-writable parent = REPORT_PARENT_WORLD_WRITABLE; mail channels named as MAIL_REPORT rows; per-facility SYSLOG_FACILITY rows; log older than its config = LOG_STALE (relative, deterministic); LOGDIR_WORLD_WRITABLE; ROTATION_PRESENT; honest rc6 when neither config nor logs exist.
- aidedbpeek — baseline snapshot trust census (/var/lib/aide/aide.db plus .new and .gz artifacts with presence, size, mtime and perms; the database TEXT parsed when plain — header comments counted, @@-directive spec rows carried, entry rows counted; gzip magic detected as an honest GZIPPED_DB parse-skip note). Config without baseline = DB_MISSING finding; baseline without config = ORPHAN_DB; new-baseline-only = NEW_DB_ONLY; world-writable db = DB_WORLD_WRITABLE; db older than its config = DB_STALE (relative); odd or empty formats = DB_HEADER_ODD / DB_EMPTY; honest rc6 when no db artifacts exist.
The contract
Every tool: rc0 clean / rc4 findings / rc6 honest nothing-readable / rc2 usage; --json emits the full report; --conf points the census at one config file, --dir replaces the root list — any tree or fixture. Pure Python stdlib — zero subprocesses, zero writes, zero sockets, zero network; AIDE artifacts are only ever READ and statted, the checker binary is never executed, and any secret-shaped literal is masked by length only. The census never "fixes" an exposed posture — it names it.
Self-test battery inside
731 fixture-based executed assertions (checks.py + runner_count.py per bundle norm) — verified as: three green fires from the shipping tree (fire1, fire2, merged-kit fire) and two clean-room fires from THIS exact shipping zip (731/0 every fire). The battery pins rc laws, every finding code, the never-execute law (the aide binary is only ever statted), grammar edges, caps, stat hygiene, and write-nothing fingerprints.
Who this is for
Admins who inherited AIDE installs nobody can honestly call a working integrity baseline; hardening teams proving the checker, its rules, its report channel and its database still form a closed loop; agent builders who want their AI to census a host's AIDE trust posture without ever mutating it. The census reads — the intrusion-detection stack is never touched.
MIT licensed · Python 3.8+ · 40 files · stdlib-only