Spectra Detect YARA Sync — Ruleset Synchronization Across Appliances
This section is available in OVA and Kubernetes microservices deployments.
The YARA Sync page (Administration ‣ YARA Synchronization) allows users to easily track the status of YARA ruleset synchronization between connected appliances, and trigger a manual synchronization if rules are not up-to-date. The Manager stores all synchronized rules in a local database and becomes the single source of truth for all connected appliances.
When YARA ruleset synchronization is enabled, the YARA Sync page displays a table of all appliances connected to the Manager and their YARA ruleset synchronization status. Any connected Spectra Analyze appliances must have YARA Synchronization enabled (Administration ‣ Spectra Detect Manager ‣ General ‣ Synchronization) to properly display the current status and synchronize rulesets.
Appliances can show one of the following statuses:
- In Sync
- Out of Sync
- Error
- Unavailable
- Pending
- Disabled
- No Rules
- Unsupported
Workers poll the Manager for rule changes every minute. Spectra Analyze appliances push new rules to the Manager as soon as they are created, and pull new rules every 5 minutes.
Example case: One Spectra Analyze appliance and one Worker attached to a Manager with YARA Synchronization enabled
Any YARA ruleset change made on Spectra Analyze will take up to 5 minutes to be synchronized to the Manager. Once the change reaches the Manager, it will take up to 1 minute for the change to be synchronized to the Worker. In total, it will take up to 6 minutes for a change to be synchronized from a Spectra Analyze appliance to a Worker.
Appliances that are Not In Sync can be manually synchronized at any time by clicking the Start YARA Sync button in the far right column of the table. For the secondary node of a Spectra Analyze redundancy cluster, the synchronization runs on its primary, because the nodes share their YARA rulesets.
Rulesets created on Spectra Analyze appliances before YARA synchronization was enabled will not synchronize to the Manager until the user changes their status or modifies them in any way. Rules present on the Manager, however, will synchronize to newly connected Spectra Analyze appliances regardless of when they were created.
Apart from new rulesets, changes in existing rulesets will be synchronized as well. If a ruleset is disabled or deleted on one appliance, its status will be distributed to other appliances.
In case of Workers, disabled rulesets will be removed until re-enabled on another appliance. When enabled again, rulesets will be synchronized on the Worker as if they have been newly created.
Since all rulesets have owners, their user accounts will be mirrored to other connected appliances, but won’t be able to log into that instance until an administrator enables their account by assigning it a password.
YARA-X
Workers 7.1.0 and later, and Spectra Analyze 10.1.0 and later, run YARA rules with YARA-X. Earlier versions use YARA. The YARA-X column on the YARA Sync page shows which engine each appliance uses: Supported for YARA-X, Not supported for YARA. For Hubs, which don't sync YARA rulesets, and for appliances whose version SDM doesn't know yet, the column shows --.
Rulesets disabled after upgrading
After a Worker is upgraded to 7.1.0 or later, it checks its synced rulesets once with YARA-X, and disables the ones that aren't valid. Their first error is Disabled after upgrade to yara-x. To use a disabled ruleset again, fix it on Spectra Analyze 10.1.0 or later, which validates rulesets with YARA-X, and save it. The new revision then syncs to the Workers.
Appliances with different engines
If SDM manages appliances that use YARA and appliances that use YARA-X, each appliance compiles the rulesets with its own engine:
- Rulesets that are valid under both engines sync to all appliances and match on all Workers.
- Rulesets that only one engine accepts match only on the Workers that use that engine. The other Workers report them as not applied.
- If a ruleset is changed to YARA-X syntax, Workers that use YARA stop matching it completely. They don't keep the previous revision.
- Spectra Analyze 10.0 and earlier can't save rulesets that only YARA-X accepts, so they show Out of Sync. Spectra Analyze 10.1.0 and later disable rulesets that only YARA accepts, and also show Out of Sync.
YARA Ruleset Restrictions
- Naming restrictions:
- YARA ruleset names must be between 3 and 48 characters.
- The underscore ( _ ) should be used instead of spaces, and any other special characters should be avoided. Ruleset names should only use numbers (0-9) and a-z/A-Z letters.
- Ruleset size restrictions:
- A ruleset file should not be larger than 40 MB.
- A ruleset larger than 1 MB (1048576 bytes) cannot be saved and run in the Spectra Intelligence cloud.
- File size restrictions:
- YARA rulesets on Spectra Analyze are not applied to files larger than 700 MB.
Only rules that have been successfully compiled on Spectra Analyze can be synchronized.