💡 Dual-Mode Syscall Monitoring Explained

cella provides two complementary approaches to syscall monitoring: passive observation and active blocking.

Why Two Modes?

Monitoring and enforcement are different goals. You might want to observe what a container does without interfering (profiling, compliance auditing), or you might want to block dangerous operations in real time (security hardening). cella supports both.

Mode 1: Passive Monitoring (bpftrace)

Activated with t. Uses bpftrace to attach to the kernel's tracepoint for syscall entry, filtered by the container's cgroup ID.

How It Works

  1. cella spawns a bpftrace process with a script that traces tracepoint:raw_syscalls:sys_enter
  2. The script filters by the container's cgroup ID to capture only that container's syscalls
  3. Output is parsed line by line and categorized into 7 families
  4. Statistics are maintained in a ring buffer for sparkline rendering

Syscall Families

FamilyExamples
file-ioread, write, open, close, stat, fstat, lstat, lseek
networksocket, connect, bind, listen, accept, sendto, recvfrom
processfork, clone, execve, wait4, exit_group
memorymmap, mprotect, munmap, brk, mremap
signalsrt_sigaction, rt_sigprocmask, kill, tgkill
ipcpipe, futex, eventfd, epoll_ctl
systemioctl, prctl, sysinfo, getrandom

Key Properties

Mode 2: Active Blocking (LXD BPF Deny)

Activated with Z. Uses LXD's security.syscalls.deny config, which leverages the kernel's BPF mechanism to block specific syscalls at the container level.

How It Works

  1. cella sets security.syscalls.deny via the LXD API
  2. LXD configures a BPF program that returns EPERM for the listed syscalls
  3. If bpftrace detects an attempt to call a blocked syscall, cella shows an operator approval overlay

Blocked Syscalls

The default deny list targets high-risk syscalls: ptrace, mount, umount2, bpf, kexec_load, kexec_file_load, reboot, init_module, finit_module, delete_module.

Key Properties

Using Both Together

The recommended workflow:

  1. Start with passive monitoring (t) to understand the container's normal behavior
  2. Generate a seccomp profile (G) from observed traffic
  3. Enable active blocking (Z) to enforce restrictions
  4. Use the approval overlay to handle edge cases