Overview
A Powerful Dynamic Recipe Generation System for Jibril
The Alchemies feature introduces a powerful dynamic recipe generation system for Jibril that allows users to define detection rules in YAML format instead of only relying in the built-in hardcoded recipes.
Check out Jibril's public recipes repository at https://github.com/garnet-org/jibril-wahy.
Key Features
YAML-based recipe definitions: Define detection rules in human-readable YAML format
Dynamic loading: Recipes can be loaded from YAML files at runtime.
Hot reload: Monitor external recipe directories for changes (add/modify/remove).
Built-in recipes: Pre-configured detection recipes shipped with Jibril.
Validation: Comprehensive validation of recipe configurations.
Multiple recipe types: Support for file access, execution, and network peer detections.
Architecture
The alchemies system consists of several key components:
Alchemy: The YAML representation of a detection recipe
Recipe: The runtime detection rule generated from an alchemy
Monitor: Watches external directories for YAML file changes
Recipes: Handles built-in recipe loading from embedded files
Validation: Ensures recipe configurations are correct
Monitoring and Hot Reload
When using external recipe directories with the path option, the alchemies system automatically:
Monitors the directory for changes
Loads new YAML files when added
Reloads modified files
Removes recipes when files are deleted
Validates all changes before applying
Best Practices
Use descriptive names: Recipe
kindandnameshould clearly indicate what they detectSet appropriate limits: Use
timesentries to reduce false positivesTest thoroughly: Start with
enabled: falseand test before enablingDocument well: Include links to documentation explaining the detection logic
Version control: Track recipe files in git for change management
Organize by type: Group similar recipes in subdirectories
Common Issues
Recipe not loading:
Check YAML syntax
Verify all required fields are present
Look for validation errors in logs
Too many alerts:
Adjust
timeslimitsAdd
arbitraryfiltersUse more specific patterns
Missing detections:
Verify
enabled: trueCheck file/network patterns match
Ensure correct
file_actionsare specified
Debug Tips
Set
log-level: debuginconfig.yamlCheck logs for
activatinganddeactivatingmessagesValidation errors will appear as
ignoring errored recipe
Last updated
Was this helpful?