This is a good write-up and I like the diagrams. What appears to still be notably missing from eBPF is an "off switch". AFAIK there are still no kernel boot time commands [0] to disable eBPF entirely. I have to recompile the kernel to disable it and it is known that most people will not do this.<p>eBPF has the potential for file-less malware to run hidden from detection and I foresee the ability to tickle ring -3 (and -4?) <i>CPU within CPU</i> functions while bypassing local firewalls.<p>Here is some example code of what people already know how to do today and this list will grow as people discover more capabilities. [1][2][3][4][5][6] These do require some privileges to insert but will remain running and hidden until reboot. Privilege escalation today is easier than ever with the growing misuse and poor configurations of sudo as well as the growing number of suid/setcap binaries. A common argument I get is <i>"Well if someone ... then its game over"</i>. They are not entirely wrong, but I do not want yet another file-less anti-forensics vector that risks Linux being forbidden in secure zones nor do I want to play whack-a-mole using commercial tools like sysdig or complex tools people avoid like SELinux to try to fight this stuff.<p>[0] - <a href="https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html" rel="nofollow">https://www.kernel.org/doc/html/latest/admin-guide/kernel-pa...</a><p>[1] - <a href="https://github.com/citronneur/pamspy" rel="nofollow">https://github.com/citronneur/pamspy</a><p>[2] - <a href="https://github.com/h3xduck/TripleCross" rel="nofollow">https://github.com/h3xduck/TripleCross</a><p>[3] - <a href="https://github.com/krisnova/boopkit" rel="nofollow">https://github.com/krisnova/boopkit</a><p>[4] - <a href="https://github.com/pathtofile/bad-bpf" rel="nofollow">https://github.com/pathtofile/bad-bpf</a><p>[5] - <a href="https://doublepulsar.com/bpfdoor-an-active-chinese-global-surveillance-tool-54b078f1a896?gi=a1053e659852" rel="nofollow">https://doublepulsar.com/bpfdoor-an-active-chinese-global-su...</a><p>[6] - <a href="https://blog.doyensec.com/2022/10/11/ebpf-bypass-security-monitoring.html" rel="nofollow">https://blog.doyensec.com/2022/10/11/ebpf-bypass-security-mo...</a>
As others have mentioned, eBPF is quite neat software, but it's observability in an of itself is quite difficult. It's hard to understand WHAT eBPF programs are loaded, and what they're doing. Supposedly Android has a dozen or two eBPF programs running at anytime. Is Ubuntu on my laptop running a similar batch? I have no clue, and many of us here probably wouldn't know where to look either without some Googling.