Malware Scanning
Last updated
Security → Malware. The detection and response surface for Linux Malware Detect (LMD) and YARA-X.
Detection stack
- Linux Malware Detect (LMD) 2.0 — the scanner. LMD’s native HEX, MD5 and SHA-256 scanner uses the rfxn signature pack, which targets web threats. It replaced ClamAV, which was removed: scans no longer need 1.5 GB of RAM, and there is no daily freshclam download.
- LMD real-time monitor —
jabali-maldet-monitor.service, opt-in (default off, migration 000082 added the toggle). The “apply then persist” pattern means flipping the toggle starts the monitor immediately and writes the persistent flag. - YARA-X (
yr) — pattern matching for LMD. It runs the rfxn rule pack, the signature-base (Neo23x0) rules, and any rules the admin uploads on this page. - mail-yara-async — async post-delivery JMAP-poll YARA scan against mailbox storage. Not a Stalwart MtaHook / MtaMilter; runs after delivery so it never blocks legitimate mail.
Page layout
- Detector state — a row per detector: enabled, last run, hits in the last 24 h.
- Open file-hits — every detected file currently quarantined; per-row owner, detector, signature, file path, file size, SHA-256.
- Quarantine — files moved to
/var/lib/jabali/quarantine/<user>/with0600 root:root. Per-row actions: Restore, Delete, Download (encrypted). - Scan now — manual scan of a path or a user’s home via
jabali malware scan. - Settings — schedule, quarantine retention, notification routing for malware events.
Notification flow
A hit fires malware.quarantine.added, or malware.realtime.critical for a high-confidence hit from the real-time monitor. The flow:
- Writes an audit row.
- Quarantines the file (moves it out of the user’s tree).
- Inserts a
quarantinerow. - Sends the event to the bell and to every enabled channel (see Notifications Routing).
The end-to-end EICAR plant → quarantine → notification flow was live-verified on 192.168.100.150.
LMD chmod scar
lmd_init.sh resets the signature directory’s permissions on every maldet run. A chmod o+rx /usr/local/maldetect/sigs is reverted; the panel uses a POSIX ACL (setfacl u:jabali:rx) that survives.
CLI
jabali malware scan --user <username> # scan a user's home
jabali malware scan --path <absolute-path>
jabali malware quarantine list
jabali malware-purge # hard-delete quarantine rows past retention