YARA
$ yara Official Low RiskYARA (yara) classifies and identifies malware samples, suspicious binaries, and leaked artifacts using declarative .yar rule files. Completely offline and read-only with deterministic exit codes, though it outputs line-oriented text (RULE TARGET) rather than JSON.
brew install yara yara scans large local files, memory dumps, and directory trees at native C speed without transferring binaries over MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Fully non-interactive and deterministic, though yara emits space-separated text lines and lacks a built-in --json flag.
- Non-interactive flag execution with
-r,-s,-m,-w - No native
--jsonoutput format
Strictly read-only and 100% offline; supports --timeout to guard against expensive regex backtracking in rules.
- Zero network calls and zero target file modifications
Fast C binary available via brew, Linux apt/dnf packages, and Windows release archives.
- Available across macOS, Linux, and Windows
Industry-standard malware and pattern-matching engine; requires external .yar rule files to be useful.
- De-facto standard DFIR pattern-matching CLI
Maintained by VirusTotal (VirusTotal/yara) under BSD-3-Clause (transitioning alongside YARA-X).
- Official VirusTotal repository under BSD-3-Clause
Comprehensive ReadTheDocs manual covering rule syntax and CLI flags.
- Official docs at yara.readthedocs.io
Security, Auth & Guardrails
No authentication or credentials used; reads local .yar rule files and target files only.
BSD-3-Clause open-source CLI; free and 100% offline.
# YARA (yara) Agent Rules - Pass `-w` in automated runs to suppress non-fatal rule syntax warnings from polluting stdout. - Use `-r` on bounded target directories and `-p <threads>` for large trees; keep `--timeout` set on untrusted rule sets.
Agent-Ready Command Recipes
Safe Read-Only Queries
yara -r -m -w rules.yar ./artifacts
Scans ./artifacts recursively (-r), prints matched rule -m metadata, and suppresses rule warnings (-w).
yara -s -g rules.yar suspicious.bin
Prints rule tags (-g) and exact hex/string match offsets (-s) on suspicious.bin.
Strengths for Agents
- + Fast, offline, strictly read-only scanning with
-soffset evidence and-mmetadata. - + Clean
--timeoutsafeguard prevents pathological rule regexes from hanging agent runs.
Caveats & Pitfalls
- ! Lacks native
--jsonoutput—agents must parse line-orientedRULE [TAGS] FILEtext. - ! Does not ship built-in malware rules; requires pointing to a
.yarrule file or compiled ruleset.