v1.0.0
This release marks the first stable release of Boreal as it is now entirely feature complete with YARA:
- All features available in YARA are available in boreal
- A CLI binary is available that is 100% compatible with invocations of the yara CLI binary.
- A new python library has been released, also 100% compatible with the yara python library.
Here is a list of the major features since 0.9.0:
-
Python bindings have been added, and are available through the
boreal-pythonpypi package. Those bindings provide a "yara compatibility" mode with full compatibility with the yara python bindings, allowing seamless transition from it. -
The
borealCLI tool has been reworked and completed. It now supports all options from theyaraCLI tool (except--atom-quality-table) and provides a "yara compatibility" mode through the use of theyrsubcommand, allowing seamless transition from it. -
A scanner can now be serialized into bytes (and deserialized) through the
serializefeature. This is the equivalent of the yara save/load API. This however increases the scanner size by a few percent, and has a lot of caveats linked to it. See theScanner::to_bytesfor more details. -
All scanning APIs now have a variant that uses a callback. This callback will be called on specific events: when a rule matches, when a module is imported, etc.
scanner::ScanEventfor more details. -
Several more features have been added: modifying the include callback, limiting the number of strings per rule, etc. See the changelog below for details.
-
The benchmarks have been reworked:
YARA-Xhave been added to it and benchmarks on the serialize feature have been added.
Since this is the first stable release, several breaking changes have been done to stabilize the API. See the breaking changes list just below.
Breaking changes:
- The
Compiler::into_scannermethod has been renamed toCompiler::finalize#226. - The
namespacefield for rules is now non optional, and the default namespace is named"default". This means that if you previously added rules in the default namespace and rules in a custom namespace named"default", this would now add to the same namespace and may conflict. This aligns the logic on what yara does and simplifies compatibility 4ffca07 - The
ScanResult::statisticsfield is now boxed. This reduces the size of the object greatly. - The
ScanResult::module_valuesfield has been replaced byScanResult::modules, which also returns a pointer to the modules, allowing access to their static values #225. boreal::scanner::MatchedRulehas been renamed toboreal::scanner::EvaluatedRule
979f162.boreal::Compiler::defaulthas been removed, use of theCompilerBuilderobject is mandatory to customize which modules are enabled 586be27.- Bump MSRV to 1.74 928e380.
boreal::scanner::StringMatch::datahas changed from aVec<u8>to aBox<[u8]>to reduce the memory size of this object 928e380.boreal::compiler::AddRuleErrorno longer has ato_short_descriptionmethod. Instead, this object implementsstd::fmt::Displaywhich can be used to generate the same short description 6658ebb.
Added
- Added callback based API variants for all
Scanner::scan_*methods. For example,Scanner::scan_mem_with_callback,Scanner::scan_process_with_callback. This callback can receive several type of events, and is able to abort the scan during any received event. Seeboreal::scanner::ScanEventandboreal::scanner::CallbackEventsfor more details on the types of events handled #187. - Added
serializefeature to serialize aScannerobject into bytes which can be deserialized on another computer. SeeScanner::to_bytesfor more details. #203. - Added ability to customize include behavior with a callback used during compilation. See
Compiler::set_include_callbackfor more details 637dece. - Added scan parameters to include not matched rules in results 8a951d8.
- Callback for console module can now be provided in the scanner rather than during compilation 3522484.
- Added
Scanner::rulesto iterate over the rules contained in a scanner 68ee69b. - Added
max_strings_per_rulecompilation parameter to fail compilation if a rule contains too many rules 696ce79. - Added
xor_keyfield inboreal::scanner::StringMatchto indicate which xor key was used on a given match 7c9fd27. - Added
has_xor_modifierfield inboreal::scanner::StringMatches6853938. - Implement
std::fmt::Displayandstd::error::Erroronboreal::compiler::AddRuleError. This means this is now a real Error object and theAddRuleError::to_short_descriptionmethod no longer needs to be called to generate a description for the error 6658ebb.