yarax

Plugin

ArgDescriptionType
rulesYara rules in the yara DSL or after being compiled by the yarac compiler.string
filesThe list of files to scan.list of Any (required)
accessorAccessor (e.g. ntfs,file)string
contextHow many bytes to include around each hitint
startThe start offset to scanuint64
endEnd scanning at this offset (100mb)uint64
numberStop after this many hits (1).int64
blocksizeBlocksize for scanning (10mb).uint64
keyIf set use this key to cache the yara rules.string
namespaceThe Yara namespece to use.string
varsThe Yara variables to use.ordereddict.Dict
dll_pathFunction to resolve path to the yarax DLLLambda (required)
force_buffersForce buffer scan in all cases.bool

Required permissions:FILESYSTEM_READ EXECVE

Description

Scan files using yara rules (Using the new yarax engine).

This is an experimental new functionality to use the YaraX project instead of the more traditional C based Yara engine.

One of the biggest issues for Velociraptor integration is the very large size of the YaraX library (which is written in Rust). Including YaraX in Velociraptor will increase our binary size by a third (about 25Mb) for a single experimental plugin.

Therefore, we have decided to distribute YaraX as a third party tool and load the DLL at runtime.

You must specify a lambda function to the dll_path parameter which will be evaluated only if needed. The function should return the absolute path to the YaraX DLL on disk. Once the dll is loaded, it is not unloaded again. This way you can avoid having to download or hash the dll until actually needed.