Skip to content

Instantly share code, notes, and snippets.

@tgraf
Created May 20, 2022 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgraf/e5bd8fb4955cac139b02b370a87b268a to your computer and use it in GitHub Desktop.
Save tgraf/e5bd8fb4955cac139b02b370a87b268a to your computer and use it in GitHub Desktop.
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "capability-change"
spec:
kprobes:
- call: "__close_fd"
syscall: false
args:
- index: 0
type: "nop"
- index: 1
type: "nop"
selectors:
- matchCapabilities:
- type: Effective
operator: In
values:
- "CAP_SYS_ADMIN"
matchCapabilityChanges:
- type: Effective
operator: In
values:
- "CAP_SYS_ADMIN"
matchActions:
- action: Sigkill
argError: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment