Skip to main content
Challenges BPF filter
Reverse engineering Hard Reading a classic BPF (cBPF) program and computing in reverse Solves: 3

BPF filter

Author: CyberSamSU
Points
100

A security team catches a special "wake-up" packet on the network with a single BPF filter. The filter is in the filter.bpf file, in the tcpdump -ddd output format: the first line is the number of instructions, followed by code jt jf k on each line (decimal numbers). Opcode table: Linux include/uapi/linux/filter.h (BPF_LD, BPF_LDX, BPF_ST, BPF_ALU, BPF_JMP, BPF_RET).

The program examines an Ethernet + IPv4 (header length 20 bytes) + UDP frame: a certain UDP port, then several arithmetic checks on a 16-byte portion of the UDP data (lowercase hexadecimal characters, 0-9a-f). The packet is accepted only if the program returns ret #262144. The accepted 16 characters are unique. Flag: BAYROQ{BPF_FILTR_<16 belgi>}.

Attached files
filter.bpf Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −10 pts Log in
Hint 2 −20 pts Log in
Hint 3 −30 pts Log in
To submit a flag, log in.

First solvers

1. Mirjaxon Qaxxarov 25.11.2026
2. Odam 25.11.2026
3. AGENT X 28.11.2026