Leaving eBPF access open demonstratively has made way for file-less persistent malware to linger on unwantedly.
A real cybersecurity specialist would only allow eBPF access on host OS if no network access can be made to the host OS (and its ok for guest VMs to have eBPF).
An Uber cybersecurity goon, however, would compile out the eBPF JIT access from the Linux kernel (or use BSD-variant, instead).
Execute and monitor a program/app while running its full test suite, to generate a model of all the stuff that program normally does.
Then monitor it in prod and if it starts behaving weirdly, kill it (and investigate).
I wonder how well the models will hold up against attacks that merely exercise normal application functions in unusual ways?
https://debian-handbook.info/browse/stable/sect.apparmor.htm...
Also worth looking into is seccomp profiles, although that's a bit different but useful for containers and securing your own code where the attack surface might be massive or you may be running untrusted code. Think trying to secure things like online language "playgrounds" from server side exploitation.
Also, I think people underestimate the runtime cost of linux syscall tracing. It's pretty high.