Overview
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.
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
kind
andname
should clearly indicate what they detectSet appropriate limits: Use
times
entries to reduce false positivesTest thoroughly: Start with
enabled: false
and 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
times
limitsAdd
arbitrary
filtersUse more specific patterns
Missing detections:
Verify
enabled: true
Check file/network patterns match
Ensure correct
file_actions
are specified
Debug Tips
Set
log-level: debug
inconfig.yaml
Check logs for
activating
anddeactivating
messagesValidation errors will appear as
ignoring errored recipe
Last updated