-
Notifications
You must be signed in to change notification settings - Fork 71
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
cleanup: remove evt.arg.*
fields when always return <NA>
#215
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -442,7 +442,7 @@ | |
and not calico_node | ||
and not weaveworks_scope | ||
and not user_known_change_thread_namespace_activities | ||
output: Namespace change (setns) by unexpected program (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) | ||
output: Namespace change (setns) by unexpected program (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 %container.info) | ||
priority: NOTICE | ||
tags: [maturity_incubating, host, container, process, mitre_privilege_escalation, T1611] | ||
|
||
|
@@ -623,7 +623,7 @@ | |
and not falco_privileged_containers | ||
and not user_privileged_containers | ||
and not redhat_image | ||
output: Privileged container started (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) | ||
output: Privileged container started (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 %container.info) | ||
priority: INFO | ||
tags: [maturity_incubating, container, cis, mitre_execution, T1610, PCI_DSS_10.2.5] | ||
|
||
|
@@ -652,7 +652,7 @@ | |
and excessively_capable_container | ||
and not falco_privileged_containers | ||
and not user_privileged_containers | ||
output: Excessively capable container started (cap_permitted=%thread.cap_permitted 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) | ||
output: Excessively capable container started (cap_permitted=%thread.cap_permitted 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 %container.info) | ||
priority: INFO | ||
tags: [maturity_incubating, container, cis, mitre_execution, T1610] | ||
|
||
|
@@ -673,7 +673,7 @@ | |
and not proc.name in (known_system_procs_network_activity_binaries) | ||
and not login_doing_dns_lookup | ||
and not user_expected_system_procs_network_activity_conditions | ||
output: Known system binary sent/received network traffic (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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) | ||
output: Known system binary sent/received network traffic (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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 %container.info) | ||
priority: NOTICE | ||
tags: [maturity_incubating, host, network, process, mitre_execution, T1059] | ||
|
||
|
@@ -752,7 +752,7 @@ | |
inbound_outbound | ||
and fd.l4proto=udp | ||
and not expected_udp_traffic | ||
output: Unexpected UDP Traffic Seen (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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) | ||
output: Unexpected UDP Traffic Seen (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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 %container.info) | ||
priority: NOTICE | ||
tags: [maturity_incubating, host, container, network, mitre_exfiltration, TA0011] | ||
|
||
|
@@ -804,7 +804,7 @@ | |
and not java_running_sdjagent | ||
and not nrpe_becoming_nagios | ||
and not user_known_non_sudo_setuid_conditions | ||
output: Unexpected setuid call by non-sudo, non-root program (arg_uid=%evt.arg.uid 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) | ||
output: Unexpected setuid call by non-sudo, non-root program (arg_uid=%evt.arg.uid 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 %container.info) | ||
priority: NOTICE | ||
tags: [maturity_incubating, host, container, users, mitre_privilege_escalation, T1548.001] | ||
|
||
|
@@ -891,7 +891,7 @@ | |
and container | ||
and fd.sip="169.254.169.254" | ||
and not ec2_metadata_containers | ||
output: Outbound connection to EC2 instance metadata service (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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) | ||
output: Outbound connection to EC2 instance metadata service (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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 %container.info) | ||
priority: NOTICE | ||
tags: [maturity_incubating, network, aws, container, mitre_credential_access, T1552.005] | ||
|
||
|
@@ -912,7 +912,7 @@ | |
and fd.sip="169.254.169.254" | ||
and not user_known_metadata_access | ||
enabled: true | ||
output: Outbound connection to cloud instance metadata service (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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) | ||
output: Outbound connection to cloud instance metadata service (connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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 %container.info) | ||
priority: NOTICE | ||
tags: [maturity_incubating, network, container, mitre_discovery, T1565] | ||
|
||
|
@@ -1017,6 +1017,10 @@ | |
- macro: var_lib_docker_filepath | ||
condition: (evt.arg.name startswith /var/lib/docker or fd.name startswith /var/lib/docker) | ||
|
||
# todo!: the usage of `evt.arg*` filter check in the output should be avoided | ||
# when more than one event type is involved because some event will populate | ||
# the filtercheck and others will always return <NA>. It would be better to use | ||
# a more generic filter like `fs.path.*` | ||
- rule: Delete or rename shell history | ||
desc: > | ||
Detect shell history deletion, frequently used by unsophisticated adversaries to eliminate evidence. | ||
|
@@ -1026,7 +1030,7 @@ | |
(modify_shell_history or truncate_shell_history) | ||
and not var_lib_docker_filepath | ||
and not proc.name in (docker_binaries) | ||
output: Shell history deleted or renamed (file=%fd.name name=%evt.arg.name path=%evt.arg.path oldpath=%evt.arg.oldpath 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) | ||
output: Shell history deleted or renamed (file=%fd.name name=%evt.arg.name path=%evt.arg.path oldpath=%evt.arg.oldpath 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 %container.info) | ||
priority: | ||
WARNING | ||
tags: [maturity_incubating, host, container, process, filesystem, mitre_defense_evasion, T1070] | ||
|
@@ -1040,6 +1044,11 @@ | |
- macro: user_known_set_setuid_or_setgid_bit_conditions | ||
condition: (never_true) | ||
|
||
# todo!: the usage of `evt.arg*` filter check in the output should be avoided | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #214 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just picking this comment as random comment to provide feedback re the open item #176 (comment), can we also consistently rename it to It's a real real bummer Falco cannot handle this gracefully, a bit disappointed and surprised. Given we won't schedule the fixes for Falco 0.37 and we probably need more discussions, yes we need to remove them in such cases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uhm here I would prefer to remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW the comment here is related to another possible issue #214, that is not related to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ACK, yes I have the website PR already up to make this clear in the Style Guide. I'll open a follow up PR to rename exe_flags to flags (unrelated to this PR) https://github.com/falcosecurity/rules/pull/215/files#r1443163428 ACK re https://github.com/falcosecurity/rules/pull/215/files#r1444885132 |
||
# when more than one event type is involved because some event will populate | ||
# the filtercheck and others will always return <NA>. In this specific | ||
# rule, 'chmod' doesn't have a `%evt.arg.fd` argument for example so | ||
# we will always return `<NA>`. | ||
- rule: Set Setuid or Setgid bit | ||
desc: > | ||
This rule is focused on detecting the use of setuid or setgid bits set via chmod. These bits, when set for an application, | ||
|
@@ -1052,7 +1061,7 @@ | |
and not proc.name in (user_known_chmod_applications) | ||
and not exe_running_docker_save | ||
and not user_known_set_setuid_or_setgid_bit_conditions | ||
output: Setuid or setgid bit is set via chmod (fd=%evt.arg.fd filename=%evt.arg.filename mode=%evt.arg.mode 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) | ||
output: Setuid or setgid bit is set via chmod (fd=%evt.arg.fd filename=%evt.arg.filename mode=%evt.arg.mode 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 %container.info) | ||
priority: | ||
NOTICE | ||
tags: [maturity_incubating, host, container, process, users, mitre_privilege_escalation, T1548.001] | ||
|
@@ -1107,7 +1116,7 @@ | |
and container | ||
and k8s.ns.name in (namespace_scope_network_only_subnet) | ||
and not network_local_subnet | ||
output: Network connection outside local subnet (fd_rip_name=%fd.rip.name fd_lip_name=%fd.lip.name fd_cip_name=%fd.cip.name fd_sip_name=%fd.sip.name connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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) | ||
output: Network connection outside local subnet (fd_rip_name=%fd.rip.name fd_lip_name=%fd.lip.name fd_cip_name=%fd.cip.name fd_sip_name=%fd.sip.name connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=fd.l4proto 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 %container.info) | ||
priority: WARNING | ||
tags: [maturity_incubating, container, network, mitre_discovery, T1046, PCI_DSS_6.4.2] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
events like
accept,accept4,listen,connect
don't have aflag
param soexe_flags=%evt.arg.flags
will be always evaluated to<NA>
. Same thing in many of the other cases in this PR