CyberLearn
← Back to beginner
Beginner

Linux eBPF Security Tracer

Real-time syscall tracing with eBPF

Log in to track progress
2–3hPythonC

What you'll learn

  • eBPF programs
  • Syscall tracing
  • BCC framework
  • Security observability
███████╗██████╗ ██████╗ ███████╗    ████████╗██████╗  █████╗  ██████╗███████╗██████╗
██╔════╝██╔══██╗██╔══██╗██╔════╝    ╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██╔════╝██╔══██╗
█████╗  ██████╔╝██████╔╝█████╗         ██║   ██████╔╝███████║██║     █████╗  ██████╔╝
██╔══╝  ██╔══██╗██╔═══╝ ██╔══╝         ██║   ██╔══██╗██╔══██║██║     ██╔══╝  ██╔══██╗
███████╗██████╔╝██║     ██║            ██║   ██║  ██║██║  ██║╚██████╗███████╗██║  ██║
╚══════╝╚═════╝ ╚═╝     ╚═╝            ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝╚══════╝╚═╝  ╚═╝

Cybersecurity Projects Python C License: AGPLv3

Real-time syscall tracing tool using eBPF for security observability — monitors process execution, file access, network connections, privilege changes, and system operations to detect suspicious behavior.

This is a quick overview — security theory, architecture, and full walkthroughs are in the learn modules.

What It Does

  • Real-time syscall monitoring via eBPF tracepoints (process, file, network, privilege, system)
  • 10 built-in detection rules mapped to MITRE ATT&CK techniques
  • Correlated event analysis for multi-step attacks (reverse shell detection, privilege escalation chains)
  • Multiple output formats: live color-coded stream, JSON, table summary
  • Configurable severity filtering (LOW, MEDIUM, HIGH, CRITICAL)
  • Event enrichment from /proc filesystem (parent process, username)
  • Clean signal handling and eBPF program cleanup

Quick Start

./install.sh
sudo uv run ebpf-tracer

[!TIP] This project uses just as a command runner. Type just to see all available commands.

Install: curl -sSf https://just.systems/install.sh | bash -s -- --to ~/.local/bin

Usage

sudo uv run ebpf-tracer                       # trace all syscalls (live mode)
sudo uv run ebpf-tracer -f json -s MEDIUM      # JSON output, MEDIUM+ severity
sudo uv run ebpf-tracer -t network             # only network events
sudo uv run ebpf-tracer --detections           # only show detection alerts
sudo uv run ebpf-tracer -c nginx               # filter by process name
sudo uv run ebpf-tracer -o events.jsonl        # write events to file while streaming

Detection Rules

IDNameSeverityMITRE ATT&CKTrigger
D001Privilege EscalationCRITICALT1548setuid(0) by non-root
D002Sensitive File ReadMEDIUMT1003.008/etc/shadow access by non-root
D003SSH Key AccessMEDIUMT1552.004SSH key file access
D004Process InjectionMEDIUMT1055.008ptrace ATTACH/SEIZE
D005Kernel Module LoadHIGHT1547.006init_module syscall
D006Reverse ShellCRITICALT1059.004connect + shell execve sequence
D007Persistence via CronMEDIUMT1053.003Write to cron directories
D008Persistence via SystemdMEDIUMT1543.002Write to systemd unit dirs
D009Log TamperingMEDIUMT1070.002Log file deletion/truncation
D010Suspicious MountHIGHT1611mount syscall

Learn

This project includes step-by-step learning materials covering security theory, architecture, and implementation.

ModuleTopic
00 - OverviewPrerequisites and quick start
01 - ConceptseBPF theory and security observability
02 - ArchitectureSystem design and data flow
03 - ImplementationCode walkthrough
04 - ChallengesExtension ideas and exercises

License

AGPL 3.0