Skip to main content
Version: 2.8.1

πŸ›οΈ Architecture

Jibril's architecture represents a fundamental reimagining of how runtime security tools should work. By replacing traditional event streaming with query-driven data retrieval, Jibril eliminates the performance bottlenecks that plague conventional security monitoring.

🎯 The Core Innovation: Query-Driven eBPF​

❌ Traditional Approach: Ring Buffers​

Traditional security tools push events from kernel to userspace through ring buffers:

Ring-Buffer

⚠️ Problems with this approach:

  • πŸ’₯ Ring buffers overflow during high-event scenarios
  • πŸ“ˆ CPU usage spikes exponentially under load
  • πŸ”€ Memory consumption becomes unpredictable
  • ❗ Critical events get dropped when you need them most

βœ… Jibril's Query-Driven Approach​

Jibril's revolutionary approach stores events in kernel maps and retrieves them on demand:

Query-Driven

🌟 Advantages:

  • βœ… Zero event loss - maps don't overflow
  • ⚑ Constant overhead - CPU usage stays flat
  • πŸ“Š Bounded memory - configurable, predictable usage
  • πŸš€ Better performance at scale - higher loads improve caching

πŸ’‘ Learn more about eBPF maps: eBPF Map Types

πŸ—οΈ System Architecture​

Jibril consists of three main layers working together seamlessly:

Detection-Events

1️⃣ Kernel Space (eBPF Programs)​

πŸ“‘ Event Capture​

eBPF programs attach to kernel hooks and capture system events in real-time:

  • βš™οΈ Process execution and lifecycle
  • πŸ“ File access and modifications
  • 🌐 Network connections and communication
  • πŸ“¦ Container operations
  • πŸ” Security-relevant system calls

πŸ’Ύ In-Kernel Storage​

Events are stored in high-performance eBPF maps:

  • πŸ—ƒοΈ Hash maps for event metadata and context
  • πŸ“Š Array maps for configuration and counters
  • ♻️ LRU maps for automatic memory management
  • πŸ”’ Cryptographic hashing ensures data integrity

πŸ”„ Uniform Execution​

eBPF programs run consistently across all kernel versions without modules or recompilation (thanks to CO-RE).

2️⃣ Userspace Daemon​

πŸ” Query Engine​

The daemon periodically queries kernel maps to retrieve relevant events:

  • 🎯 Selective data retrieval reduces overhead
  • πŸ“¦ Batch processing optimizes performance
  • ⏱️ Configurable query intervals balance latency and efficiency

πŸ›‘οΈ Detection Engine​

Retrieved events are analyzed against detection rules:

  • πŸ”Ž Pattern matching identifies suspicious behavior
  • 🧠 Contextual analysis reduces false positives
  • πŸ“ˆ Real-time threat scoring prioritizes alerts

🧩 Plugin System​

Modular architecture organizes detection logic by event type:

  • βš™οΈ Execution plugins - Process and binary monitoring
  • πŸ“ File access plugins - Filesystem operation tracking
  • 🌐 Network plugins - Connection and traffic analysis
  • πŸ”— Thread-based isolation ensures stability and performance

3️⃣ Output Layer (Printers)​

πŸš€ Flexible Routing​

Events can be sent to multiple destinations simultaneously:

  • πŸ’» Standard output (stdout) for debugging
  • πŸ“ Log files for persistence
  • πŸ” SIEM platforms for centralized monitoring
  • πŸ”Œ Custom APIs for integration
  • πŸ“Š Dashboards for visualization

πŸ” Secure Transmission​

All external communication uses authenticated HTTPS with API tokens.

πŸ‘οΈ What Jibril Monitors​

Jibril provides comprehensive visibility into all system resources and operations.

What-Jibril-Monitors

πŸ“Š Resources Tracked​

πŸ‘€ Identity & Access​

  • πŸ‘₯ Users and groups
  • πŸ”‘ Permissions and capabilities
  • πŸ” Authentication events

πŸ–₯️ Infrastructure​

  • πŸ’» Physical and virtual machines
  • πŸ“¦ Container hosts and nodes
  • 🏷️ Hostnames and namespaces

πŸ’Ύ Storage​

  • πŸ’Ώ Disks and filesystems
  • πŸ“‚ Volumes and mount points
  • πŸ“„ Files and directories
  • πŸ”— Symbolic links

βš™οΈ Execution Context​

  • πŸ“¦ Containers and pods
  • πŸ”„ Processes and threads
  • πŸ“‹ Binary executables
  • πŸ“š Shared libraries
  • 🐍 Interpreters

🌐 Network​

  • πŸ“‘ Network protocols
  • 🌍 Domain names and DNS
  • πŸ”Œ Ports and sockets
  • 🌐 IP addresses
  • πŸ”„ Network flows and peers

🎬 Actions Monitored​

Actions-Monitored

πŸ”„ Lifecycle Events​

  • βž• Create, destroy
  • ▢️ Start, stop, restart
  • πŸ”€ Fork, clone, exit

✏️ Modifications​

  • βœ‚οΈ Truncate, link, rename
  • πŸ“‚ Open, close
  • πŸ—‚οΈ Mount, unmount
  • 🏷️ Attribute changes

πŸ“ Data Operations​

  • πŸ“– Read, write, seek
  • ▢️ Execute
  • πŸ“‹ Copy, move

πŸ”§ Advanced Operations​

  • πŸ—ΊοΈ Memory mapping
  • πŸ”„ Synchronization
  • πŸ”’ Locking and unlocking
  • 🎚️ Capability modifications

πŸ”„ Execution Flow​

Jibril follows a structured initialization and execution sequence:

πŸš€ Startup Sequence​

  1. πŸ”§ Initialization - Core libraries and system checks
  2. 🐝 eBPF and Caches - eBPF programs loading and caches setup
  3. 🧩 Components - Components initialization
  4. πŸ”Œ Features - Features initialization (Netpolicy, Alchemies, Detect, etc.)
  5. πŸ“€ Printers - Printers initialization (Stdout, Varlog, etc.)
  6. πŸ”„ Main Loop - Main loop execution

All components follow: Init β†’ Start β†’ Execute β†’ Finish β†’ Exit in an hiearchy of components.

⚑ Runtime Operation​

  1. πŸ“‘ Event Capture - eBPF programs capture system events in kernel space
  2. πŸ’Ύ Storage - Events stored in eBPF maps with metadata and context
  3. πŸ” Query - Daemon queries maps at configured intervals
  4. πŸ›‘οΈ Detection - Retrieved events analyzed against detection rules
  5. 🎯 Action - Matching events trigger alerts or reactions
  6. πŸ“€ Output - Results sent to configured destinations

πŸ”’ Data Immutability​

Once captured, event data is immutable:

  • βœ… Ensures forensic integrity
  • πŸ›‘οΈ Prevents tampering
  • πŸ“‹ Creates trustworthy audit trails
  • πŸ” Enables reliable investigation

⚑ Performance Characteristics​

  • A pre-defined cadence stipulates deterministic CPU behavior. CPU consumption is reduced with higher cadence values.

CPU-Cadence

  • Minimal CPU consumption can be obtained controlling cache size and cadence values. There is no security event processing loss.

Minimal-Overhead

πŸ“Š Deterministic Resource Usage​

πŸ’» CPU Consumption​

  • πŸ“‰ Constant overhead regardless of event volume
  • ⚑ Typically less than 2% CPU even at 100,000+ events/second
  • 🎯 No performance spikes during attacks or high activity

πŸ’Ύ Memory Usage​

  • πŸ“¦ Bounded, configurable memory footprint
  • πŸ“ Predictable allocation based on map sizes
  • ♻️ Automatic LRU eviction prevents unbounded growth

⏱️ Latency​

  • πŸš€ Sub-second query response times
  • ⚑ Immediate threat detection
  • πŸ‘οΈ Real-time event visibility

πŸ“ˆ Scaling Behavior​

Traditional tools degrade under load. Jibril improves:

  • 🎯 Higher event volumes create better cache hit ratios
  • πŸ“¦ Batch processing becomes more efficient
  • πŸ”„ Query-driven model naturally handles bursts
  • ⚑ Kernel-space storage eliminates context-switching overhead

πŸš€ Jibril has been designed and tested on high workload environments.

πŸ” Security Model​

πŸ›‘οΈ Tamper-Proof Operation​

πŸ”’ Kernel-Level Enforcement​

  • 🚫 Cannot be bypassed from userspace
  • πŸ‘‘ Root processes cannot evade detection
  • πŸ“¦ Container escapes are visible

βœ… Verified Execution​

  • πŸ” eBPF verifier guarantees program safety
  • πŸ’š No kernel crashes possible
  • πŸ–οΈ Sandboxed execution environment

πŸ“š Learn more about eBPF security: eBPF Verifier

πŸ‘οΈ Comprehensive Coverage​

🎯 No Blind Spots​

  • 🌐 System-wide monitoring
  • πŸ‘€ All processes visible
  • πŸ“‹ Complete event capture
  • πŸ” Full context for every action

πŸ›‘οΈ Defense in Depth​

  • πŸ”„ Multiple detection mechanisms
  • πŸ—οΈ Layered security checks
  • ♻️ Redundant event capture

🎨 Extensibility​

πŸ”§ Custom Detections​

Jibril supports custom detection rules for organization-specific threats:

  • πŸ” Pattern matching on events
  • 🧠 Contextual analysis
  • πŸ”— Multi-event correlation
  • πŸ“Š Threat scoring

πŸ“– Learn more: Customization

πŸ€– Reaction Engine​

Automatically respond to detected threats with JavaScript-based reactions:

  • 🚫 Block malicious processes
  • πŸ“¦ Isolate compromised containers
  • πŸ“’ Alert security teams
  • πŸ”§ Trigger automated remediation

⚑ Learn more: Reactions

πŸ”Œ Integration Points​

Seamlessly integrate with existing security infrastructure:

  • πŸ” SIEM platforms (Splunk, Elastic, etc.)
  • πŸ“’ Alert management (PagerDuty, Slack, etc.)
  • 🎫 Ticketing systems (Jira, ServiceNow, etc.)
  • πŸ”— Custom APIs and webhooks

πŸš€ Deployment Modes​

πŸ“¦ Standalone​

Single binary with no dependencies:

  • βœ… Simple installation
  • βš™οΈ Minimal configuration
  • πŸš€ Quick deployment
  • πŸ”„ Easy updates

πŸ“– Standalone

βš™οΈ System Service​

Run as a systemd service:

  • πŸ”„ Automatic startup
  • πŸ‘οΈ Process supervision
  • πŸ“ Log management
  • πŸ“Š Resource limits

πŸ“– Systemd Service

🐳 Container​

Deploy in containerized environments:

  • 🐳 Docker container
  • ☸️ Kubernetes DaemonSet
  • ⎈ Helm chart
  • πŸ”„ GitOps ready

πŸ“– Kubernetes Deployment

βš™οΈ Configuration​

Jibril uses a simple YAML configuration file:

cadences:
file-access: 3 # File access cadence
network-peers: 3 # Network peers cadence
network-flows: 3 # Network flows cadence
env-vars: 3 # Environment variables cadence

caches:
rec-tasks: 32 # * 1k of recent tasks
tasks: 64 # * 1k of tasks
cmds: 32 # * 1k of commands
args: 32 # * 1k of arguments
files: 32 # * 1k of files
dirs: 16 # * 1k of directories
bases: 32 # * 1k of bases
task-file: 32 # * 1k of task-file mapping
file-task: 32 # * 1k of file-task mapping
task-ref: 32 # * 1k of task-ref tracking
flows: 32 # * 1k of network flows
task-flow: 32 # * 1k of task-flow mapping
flow-task: 32 # * 1k of flow-task mapping
flow-ref: 32 # * 1k of flow-ref tracking

πŸ“– Learn more: Configuration File

βš–οΈ Comparison with Traditional Architectures​

Aspect❌ Traditional Streamingβœ… Jibril Query-Driven
πŸ“Š Data FlowPush (ring buffers)Pull (on-demand)
πŸ’Ύ MemoryUnpredictableBounded & configurable
πŸ’» CPU OverheadIncreases with loadConstant
πŸ“‰ Event LossCommon under stressImpossible by design
⏱️ LatencyVariable, degradesConsistent sub-second
πŸ“ˆ ScalabilityDecreases with loadIncreases with load