CLI-Anything Bundle #69 — Rootkit & Malware Trust Recon Pack
Four agent-native read-only harnesses that census the rootkit & malware-detection trust surface: the layers that decide whether this host's malware-detection tooling itself can still be TRUSTED — the rkhunter config/DB/log posture, the chkrootkit config/cron/log posture, the Lynis profile/report posture, and the ClamAV daemon/freshclam/DB posture. No other bundle owns this surface — #53 keeps the audit-rules layer, #63 the bootloader/EFI layer, #66 the AIDE integrity layer, #67 the firejail sandbox layer, #68 the USBGuard device-authorization layer (census: 0 exact / 0 name-class substring token collisions across the whole shipping catalog, 141 Gumroad products pulled fresh). The rootkit/malware detection-tooling layer (rkhunter, chkrootkit, lynis, clamav) is unclaimed census territory.
- rkhunterpeek — Rootkit Hunter posture census (/etc/rkhunter.conf + .local key=value grammar, case-insensitive keys, quoting-tolerant; known-key vocabulary (ENABLE_TESTS, DISABLE_TESTS, LOGFILE, TMPDIR, DBDIR, SCRIPTDIR, USE_SYSLOG, UPDATE_MIRRORS, MIRRORS_MODE, WEB_CMD, ALLOWDEVFILE, ALLOWHIDDENDIR, ALLOWHIDDENPROC, PKGMGMT_NOVERIFY, UNOW, WDIR); UNK_KEY typo-defeats, DUP_KEY, list-key continuation, LOCAL_WINS, CONFLICTING_TESTS; /etc/default/rkhunter CRON_DAILY_RUN posture; cron.d + cron.daily wrappers stat-only; DBDIR (default /var/lib/rkhunter/db) stat-only file census; /var/log/rkhunter capped-tail Warning counting; long values masked len-only; BINARY_ABSENT / CONF_ABSENT / DB_ABSENT honest rc6; RKP_CONF/RKP_CONF_LOCAL/RKP_ROOT/RKP_DB/RKP_LOG overrides).
- chkrootkitpeek — chkrootkit posture census (/etc/chkrootkit.conf small key grammar (RUN_DAILY / RUN_DAILY_OPTS / DIFF_MODE / TDIR); boolean law (true/yes normalized, BOOLEAN_UNPARSEABLE honest); UNK_KEY + DUP_KEY classes; /etc/cron.daily/chkrootkit wrapper posture (RUN_DAILY true with wrapper missing = real finding); binary paths stat-only (PATH never resolved, version never read); /var/log/chkrootkit census — INFECTED/ROOTKIT rows counted and hashed, full row tails NEVER printed (hard masking law); BINARY_ABSENT / CONF_ABSENT / WRAPPER_ABSENT honest rc6; CKP_CONF/CKP_ROOT/CKP_LOG overrides).
- lynispeek — Lynis auditor posture census (binary paths stat-only + in-process PATH read; /etc/lynis/lynis.cfg + default.prf + custom.prf profile grammar — plugin= / skip-test= / include= chains resolved stat-only with UNRESOLVED_INCLUDE, depth cap 3, cycle notes; UNK_KEY + DUP_KEY; value masking len-only; /var/log/lynis/report.dat + lynis-report.dat stat-only census with capped counts only; lynis.log capped-tail Warning counts; LYNIS_ABSENT honest rc6; LYNISPEEK_ROOT override).
- clamavpeek — ClamAV antivirus posture census (/etc/clamav/clamd.conf key=value grammar (DatabaseDirectory, LocalSocket*, LogFile*, PidFile, Max* guards, Scan* toggles, DetectPUA, ExcludePath); UNK_KEY + DUP_KEY; value masking len-only; LocalSocket file LSTAT-only (never connects); /etc/clamav/freshclam.conf grammar (DatabaseOwner, UpdateLogFile, DatabaseMirror shaped host-only, Checks, NotifyClamd); /var/lib/clamav stat-only DB census (daily.c?? freshness law — STALE_DB past 30 days, CLAMAVPEEK_NOW pins the clock for determinism); DB_DIR_ABSENT / BINARY_ABSENT honest rc6; CLAMAVPEEK_CONF/CLAMAVPEEK_ROOT/CLAMAVPEEK_DBDIR overrides).
The contract
Every tool: rc0 clean / rc4 findings / rc6 honest nothing-readable / rc2 usage; --json emits exactly one report object with the keys data/findings/notes/rc/summary/tool; the default mode prints one human summary line plus capped findings rows. Pure Python stdlib — zero subprocesses, zero writes, zero sockets, zero network, zero process enumeration; configs, logs and DB dirs are read and statted once, and nothing is ever executed. The census never "fixes" an exposed posture — it names it.
Self-test battery inside
893 fixture-based executed assertions (checks.py + runner_count.py per bundle norm) — verified as: three green fires from the shipping tree and two clean-room fires from THIS exact shipping zip (893/0 every fire). The battery pins rc laws, every finding code, the never-execute + no-process-enumeration laws, grammar edges, caps, masking laws, stat hygiene, and write-nothing fingerprints with zero scratch remnants.
Who this is for
Admins who can't honestly answer whether their rootkit detector or antivirus tooling can still be trusted on this host; hardening teams proving configs, DBs, cron glue and DB freshness still form a closed loop; agent builders who want their AI to census a host's detection-trust posture without ever mutating it. The census reads — your detection tooling is never touched.
MIT licensed · Python 3.8+ · 40 files · stdlib-only