eBPFHub
Reset TR

Learn eBPF through hands-on exercises. Write, compile, and run programs directly from your browser.

Chapter 0: Getting Started

0x00 Intro to eBPF
0x01 Platform overview
0x02 Resources and Prerequisites

Chapter 1: C Fundamentals

0x00 Program Structure, Types and Operators
0x01 Control Flow and Loops
0x02 Functions and Arrays
0x03 Pointers and Strings
0x04 Struct, Memory Layout and Byte Order
0x05 BPF C Specifics

Chapter 2: First eBPF Program and Tracepoints

0x00 Process context
0x01 Reading event data
0x02 Tracing a system call
0x03 Reading syscall arrays

Chapter 3: BPF Maps and State Management

0x00 Maps and multiple programs
0x01 Reading syscall buffers
0x02 Cross-syscall state tracking

Chapter 4: eBPF Tools and Concepts

0x00 Development Environment and bpftool
0x01 Verifier and BTF/CO-RE
0x02 Fix the Verifier Errors

Chapter 5: Network Tracing

0x00 Tracking network connections
0x01 Kprobe Fundamentals and TCP
0x02 TCP Packet Reading - HTTP
0x03 DNS packet parsing

Chapter 6: XDP Packet Processing

0x00 XDP Fundamentals and Packet Parsing
0x01 Rate Limiting and IP Blocklist
0x02 Packet Rewriting and Load Balancing
0x03 Program Types, Deep Dive and Debugging

Chapter 7: Advanced Topics and Go Integration

0x00 Tracing Mechanisms and XDP Root Pattern
0x01 Observability
0x02 Go Integration

Did you find an issue, or have an idea for a new exercise? Create an issue in the repository.

Curious about how it works? Here's an explanation.