-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tetragon: library policy module load audit
Signed-off-by: John Fastabend <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This tracing policy monitors kernel modules operations. | ||
apiVersion: cilium.io/v1alpha1 | ||
kind: TracingPolicy | ||
metadata: | ||
name: "monitor-kernel-modules" | ||
#annotations: | ||
#description: "Monitor kernel modules operations" | ||
spec: | ||
kprobes: | ||
- call: "security_kernel_module_request" | ||
# Automatic module loading detection | ||
syscall: false | ||
return: true | ||
args: | ||
- index: 0 | ||
type: "string" | ||
returnArg: | ||
index: 0 | ||
type: "int" | ||
- call: "security_kernel_read_file" | ||
# Explicit module loading using file descriptor finit_module() to print module full path | ||
syscall: false | ||
return: true | ||
args: | ||
- index: 0 | ||
type: "file" | ||
- index: 1 | ||
type: "int" | ||
returnArg: | ||
index: 0 | ||
type: "int" | ||
selectors: | ||
- matchArgs: | ||
- index: 1 | ||
operator: "Equal" | ||
values: | ||
- "2" # READING_MODULE |