Sapo-boi: Bypassing Linux Kernel Network Stack in the Implementation of an XDP-based NIDS - Machnicki, Raphael Kaviak; Andreotti, João Ribeiro; Penteado, Ulisses; Correia, Jorge Pires; Fulber-Garcia, Vinicius; Grégio, André (Journal of the Brazilian Computer Society, 2026)
Network intrusion detection systems (NIDS) must inspect multiple parts of a packet to detect patterns of known attacks. With the advent of XDP, it has become feasible to implement such a system within the kernel’s own network stack for the evaluation of ingress traffic. In this work, we propose Sapo-boi, an NIDS solution consisting of two modules: (i) the Suspicion Module, an XDP program capable of processing packets in parallel, discarding packets considered safe, and redirecting suspicious packets for verdict in user space through XDP sockets (Af_XDP); and (ii) the Evaluation Module, a user-level process capable of finding the rule to which the suspicious packet should be analyzed in constant time and triggering notifications if the suspicion is confirmed. The system demonstrated superior results in terms of packet analysis rates and CPU usage compared to traditional NIDS alternatives (Snort and Suricata).