Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: detect binary execution that raise process privileges
Add binary_properties.caps_raised array that contains the reasons why this binary execution gained new capabilities or elevated its privileges. It is an array since we do not handle the case of an unprivileged user id that is _mapped_ to user id root 0 inside its own namespace then performs a setuid to root execution. Current eBPF infrastructure does not support user id translation into target user namespace. Plus current Tetragon design deals with global uids, so it is not clear at this moment how to handle this corner case. For this we make the binary_properties.caps_raised an array that can hold extra values in the future. So privileged execution can happen when the executed binary has: 1. setuid root bit set 2. file capabilities. The new caps_raised contains the reason, no need to rencode the full capabilities there too, let's just indicate to the user and if they are interested they can inspect other fields that contain the permitted and effective capabilities of the current binary. The reasons for why the elevated privileges happened are in form of a new enum type ProcessElevatedPrivsReasons. Signed-off-by: Djalal Harouni <[email protected]>
- Loading branch information