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

Chapter 8: Reference

0x00 Quick Reference and Resources

Spotted a bug or have an exercise idea? Reach out on Discord.

Want to know what happens when you click Run? See how it works under the hood.

This project runs on bare-metal servers and has real infrastructure costs. If you find it useful, consider supporting it.