Skip to content

Conversation

@djoreilly
Copy link

Using eBPF to trace execve system calls is more efficient than using the audit subsystem, so systems with high exec workloads should see less overall performance degradation. The new plugin requires kernel 5.8+ and systems without this will continue to use the audit plugin.

@djoreilly djoreilly marked this pull request as draft March 5, 2025 16:46
@djoreilly
Copy link
Author

Noticed that after the module is closed the tracepoint continues to appear in bpftool prog but not associated with any process. It goes after velociraptor is stopped. Need to debug.

This plugin uses eBPF and has less performance overhead than using the
audit subsystem to capture execve system calls. Also it does not drop
events under heavy load conditions.

It requires linux 5.8+ for eBPF ringbuffer support - artifacts should
check that before calling it.

It uses tracepoint/sched/sched_process_exec because
tracepoint/syscalls/sys_enter_execve is not reliable
bpftrace/bpftrace#2523 (comment)
The execsnoop plugin can be used if it's in the binary and the
kernel is 5.8+ required for eBPF ringbuffer support. Otherwise
the audit plugin will be used as before.
@djoreilly djoreilly marked this pull request as ready for review March 7, 2025 15:01
@djoreilly djoreilly requested a review from jeffmahoney March 19, 2025 14:58
Copy link
Member

@jeffmahoney jeffmahoney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@djoreilly djoreilly merged commit 4fbdd45 into SUSE:sensor-base-0.7.0 Mar 20, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants