-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracee-ebpf: add security_bpf{,_map} events (#617)
Add the following events to tracee-ebpf: - security_bpf: allows bpf() syscall command to be traced. - security_bpf_map: called from bpf() BPF_MAP_GET_FD_BY_ID command. The first is important for generic bpf syscall tracing while the later is triggered whenever some process tries to get an eBPF MAP fd in order to read or update MAP contents: an important feature for tampering prevention. Signed-off-by: Rafael David Tinoco <rafaeldtinoco@gmail.com>
- Loading branch information
Rafael David Tinoco
committed
Jun 2, 2021
1 parent
9387554
commit d8e348d
Showing
2 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d8e348d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like you suggested, now.. having the map_id tied to the security_bpf_map event, we have:
We can now check the new (to be added) MAP for map_ids (populated by tracee) within the security_bpf_map() kprobe handler and have a bool variable saying if it was a tamper attempt:
(map_id is mine && pid is not) && tainted = true;
It could always exist or just when the tampering was done. Something like:
For example.