Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new(rules): Change namespace privileges via unshare #160

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions rules/falco-incubating_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,20 @@
priority: NOTICE
tags: [maturity_incubating, host, container, process, mitre_privilege_escalation, T1611]

- rule: Change namespace privileges via unshare
desc: >
Unprivileged users in containers may not have CAP_SYS_ADMIN or other elevated privileges. However, they can
use the "unshare(CLONE_NEWNS|CLONE_NEWUSER)" system call to create or clone a namespace or user with the
necessary privileges to conduct further attacks. It is best practice to block the unshare system call via
seccomp if it is not needed. Misuse of unshare can be related to misconfigured Kubernetes clusters, for example.
condition: >
evt.type=unshare and evt.dir=<
and container
and not thread.cap_permitted contains CAP_SYS_ADMIN
output: Change namespace privileges via unshare (res=%evt.res evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline terminal=%proc.tty exe_flags=%evt.arg.flags %container.info)
priority: NOTICE
tags: [maturity_incubating, container, mitre_privilege_escalation, T1611]

- macro: allowed_openshift_registry_root
condition: >
(container.image.repository startswith openshift3/ or
Expand Down
Loading