Runtime / Cloud
Falco
97 rules · runtime / container / cloud detection
Falco is the CNCF runtime security engine. These rules match suspicious behaviour at the kernel-syscall, container, and cloud-audit layers - process spawns, file access, network activity, and privilege changes inside running workloads. The condition is Falco's own filter language; a rule fires when its condition evaluates true against a live event stream. Rules ship under Apache-2.0 from the upstream falcosecurity/rules repository.
Using these runtime rules
Deploy. Load them into Falco on your hosts, Kubernetes nodes, or through the cloud-audit plugin; Falco evaluates each condition against the live syscall and audit stream and alerts the instant one matches.
Adapt. Conditions use Falco's own fields and macros - scope a rule with container, namespace, or image filters so it fires only where it should, and add exceptions for known-good behaviour to keep the noise down.
Scope. This is runtime detection: process spawns, file and network activity, and privilege changes inside running workloads. It sees what happens on the box as it happens, and complements rather than replaces log and network detection.
◈
Rules
47 shown of 97
WARNING
Modify Shell Configuration File
open_write and (fd.filename in (shell_config_filenames) or
fd.name in (shell_config_files) or
fd.directory in (shell_config_directories))
and not proc.name in (shell_binaries) and not exe_running_docker_save and not user_known_shell_config_modifiers
ERROR
Modify binary dirs
modify and bin_dir_rename and not package_mgmt_procs and not exe_running_docker_save and not user_known_modify_bin_dir_activities
WARNING
Mount Launched in Privileged Container
spawned_process and container and container.privileged=true and proc.name=mount and not mount_info and not known_gke_mount_in_privileged_containers and not known_aks_mount_in_privileged_containers and not known_eks_mount_in_privileged_containers and not user_known_mount_in_privileged_containers
WARNING
Netcat Remote Code Execution in Container
spawned_process and container and ((proc.name = "nc" and (proc.cmdline contains " -e" or
proc.cmdline contains " -c")) or
(proc.name = "ncat" and (proc.args contains "--sh-exec" or
proc.args contains "--exec" or proc.args contains "-e " or
proc.args contains "-c " or proc.args contains "--lua-exec"))
)
WARNING
Netcat/Socat Remote Code Execution on Host
spawned_process and not container and ((proc.name = "nc" and (proc.cmdline contains "-e" or
proc.cmdline contains "-c")) or
(proc.name = "ncat" and (proc.args contains "--sh-exec" or
proc.args contains "--exec" or proc.args contains "-e " or
proc.args contains "-c " or proc.args contains "--lua-exec")) or
(proc.name = 'socat' and (proc.args contains "EXEC" or
proc.args contains "SYSTEM")))
WARNING
Network Connection outside Local Subnet
inbound_outbound and container and k8s.ns.name in (namespace_scope_network_only_subnet) and not network_local_subnet
WARNING
Network Tool Executed During NPM Package Install
spawned_process and container and network_tool_procs and npm_package_install_ancestor and not user_known_network_tool_in_npm_install_activities
NOTICE
Non sudo setuid
evt.type=setuid and (known_user_in_container or not container) and not (user.name=root or user.uid=0) and not somebody_becoming_themselves and not proc.name in (known_setuid_binaries, userexec_binaries, mail_binaries, docker_binaries,
nomachine_binaries)
and not proc.name startswith "runc:" and not java_running_sdjagent and not nrpe_becoming_nagios and not user_known_non_sudo_setuid_conditions
WARNING
Outbound Connection to C2 Servers
outbound and ((fd.sip in (c2_server_ip_list)) or
(fd.sip.name in (c2_server_fqdn_list)))
WARNING
Outbound or Inbound Traffic not to Authorized Server Process and Port
inbound_outbound and container and container.image.repository in (allowed_image) and not proc.name in (authorized_server_binary) and not fd.sport in (authorized_server_port)
NOTICE
PTRACE anti-debug attempt
evt.type=ptrace and evt.arg.request contains PTRACE_TRACEME and proc_name_exists
WARNING
PTRACE attached to process
ptrace_attach_or_injection and proc_name_exists and not known_ptrace_procs
NOTICE
Packet socket created in container
evt.type=socket and container and evt.arg.domain contains AF_PACKET and not proc.name in (user_known_packet_socket_binaries)
CRITICAL
Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)
spawned_process and user.loginuid != 0 and proc.name=pkexec and proc.args = ''
NOTICE
Potential Local Privilege Escalation via Environment Variables Misuse
spawned_process and glibc_tunables_env
CRITICAL
Privileged Container Device Access
(open_read or open_write) and container and (fd.name startswith /dev/sd or
fd.name startswith /dev/nvme or
fd.name startswith /dev/vd or
fd.name startswith /dev/xvd or
fd.name = /dev/mem or
fd.name = /dev/kmem)
and not user_known_privileged_device_access
NOTICE
Program run with disallowed http proxy env
spawned_process and http_proxy_procs and proc.env icontains HTTP_PROXY and not allowed_ssh_proxy_env
WARNING
Read Shell Configuration File
open_read and (fd.filename in (shell_config_filenames) or
fd.name in (shell_config_files) or
fd.directory in (shell_config_directories))
and not proc.name in (shell_binaries)
WARNING
Read environment variable from /proc files
open_read and container and (fd.name glob /proc/*/environ) and not proc.name in (known_binaries_to_read_environment_variables_from_proc_files)
WARNING
Read sensitive file trusted after startup
open_read and sensitive_files and server_procs and not proc_is_new and proc.name!="sshd" and not user_known_read_sensitive_files_activities
WARNING
Read sensitive file untrusted
open_read and sensitive_files and proc_name_exists and not proc.name in (user_mgmt_binaries, userexec_binaries, package_mgmt_binaries, cron_binaries, read_sensitive_file_binaries, shell_binaries, hids_binaries, vpn_binaries, mail_config_binaries, nomachine_binaries, sshkit_script_binaries, in.proftpd, mandb, salt-call, salt-minion, postgres_mgmt_binaries, google_oslogin_ ) and not cmp_cp_by_passwd and not ansible_running_python and not run_by_qualys and not run_by_chef and not run_by_google_accounts_daemon and not user_read_sensitive_file_conditions and not mandb_postinst and not perl_running_plesk and not perl_running_updmap and not veritas_driver_script and not perl_running_centrifydc and not runuser_reading_pam and not linux_bench_reading_etc_shadow and not user_known_read_sensitive_files_activities and not user_read_sensitive_file_containers
ERROR
Read ssh information
(open_read or open_directory) and (user_ssh_directory or fd.name startswith /root/.ssh) and not user_known_read_ssh_information_activities and not proc.name in (ssh_binaries)
NOTICE
Redirect STDOUT/STDIN to Network Connection in Container
dup and container and evt.rawres in (0, 1, 2) and fd.type in ("ipv4", "ipv6") and not user_known_stand_streams_redirect_activities
WARNING
Remove Bulk Data from Disk
spawned_process and clear_data_procs and not user_known_remove_data_activities
CRITICAL
Reverse Shell from Web Server
spawned_process and spawned_by_web_server and (proc.cmdline contains "/dev/tcp/" or
proc.cmdline contains "nc -e" or
proc.cmdline contains "ncat -e" or
proc.cmdline contains "bash -i" or
proc.cmdline contains "python -c 'import socket" or
proc.cmdline contains "python3 -c 'import socket" or
proc.cmdline contains "perl -e 'use Socket" or
proc.cmdline contains "ruby -rsocket" or
(proc.cmdline contains "mkfifo" and proc.cmdline contains "/tmp"))
NOTICE
Run shell untrusted
spawned_process and shell_procs and proc.pname exists and protected_shell_spawner and not proc.pname in (shell_binaries, gitlab_binaries, cron_binaries, user_known_shell_spawn_binaries,
needrestart_binaries,
mesos_shell_binaries,
erl_child_setup, exechealthz,
PM2, PassengerWatchd, c_rehash, svlogd, logrotate, hhvm, serf,
lb-controller, nvidia-installe, runsv, statsite, erlexec, calico-node,
"puma reactor")
and not proc.cmdline in (known_shell_spawn_cmdlines) and not proc.aname in (unicorn_launche) and not consul_running_net_scripts and not consul_running_alert_checks and not nginx_starting_nginx and not nginx_running_aws_s3_cp and not run_by_package_mgmt_binaries and not serf_script and not check_process_status and not run_by_foreman and not python_mesos_marathon_scripting and not splunk_running_forwarder and not postgres_running_wal_e and not postgres_running_cnpg and not redis_running_prepost_scripts and not rabbitmq_running_scripts and not rabbitmqctl_running_scripts and not run_by_appdynamics and not user_shell_container_exclusions
NOTICE
Schedule Cron Jobs
((open_write and fd.name startswith /etc/cron) or (spawned_process and proc.name = "crontab")) and not user_known_cron_jobs
WARNING
Search Private Keys or Passwords
spawned_process and ((grep_commands and private_key_or_password) or
(proc.name = "find" and (proc.args contains "id_rsa" or
proc.args contains "id_dsa" or
proc.args contains "id_ed25519" or
proc.args contains "id_ecdsa"
)
))
NOTICE
Set Setuid or Setgid bit
chmod and (evt.arg.mode contains "S_ISUID" or evt.arg.mode contains "S_ISGID") 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
CRITICAL
Sudo Potential Privilege Escalation
spawned_process and user.loginuid != 0 and (proc.name=sudoedit or proc.name = sudo) and (proc.args contains -s or proc.args contains -i or proc.args contains --login) and (proc.args contains "\ " or proc.args endswith \)
NOTICE
System procs network activity
inbound_outbound and fd.sockfamily = ip and (system_procs or proc.name in (shell_binaries)) 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
INFO
System user interactive
spawned_process and system_users and interactive and not user_known_system_user_login
NOTICE
Terminal shell in container
spawned_process and container and shell_procs and proc.tty != 0 and container_entrypoint and not user_expected_terminal_shell_in_container_conditions
NOTICE
Unexpected K8s NodePort Connection
inbound_outbound and container and fd.sport >= 30000 and fd.sport <= 32767 and not nodeport_containers
NOTICE
Unexpected UDP Traffic
inbound_outbound and fd.l4proto=udp and not expected_udp_traffic
NOTICE
Unexpected inbound connection source
inbound and not ((fd.cip in (allowed_inbound_source_ipaddrs)) or
(fd.cnet in (allowed_inbound_source_networks)) or
(fd.cip.name in (allowed_inbound_source_domains)))
NOTICE
Unexpected outbound connection destination
outbound and not ((fd.sip in (allowed_outbound_destination_ipaddrs)) or
(fd.snet in (allowed_outbound_destination_networks)) or
(fd.sip.name in (allowed_outbound_destination_domains)))
CRITICAL
Unprivileged Delegation of Page Faults Handling to a Userspace Process
evt.type = userfaultfd and user.uid != 0 and (evt.rawres >= 0 or evt.res != -1) and not proc.name in (user_known_userfaultfd_processes)
NOTICE
Update Package Repository
((open_write and access_repositories) or (modify and modify_repositories)) and not package_mgmt_procs and not package_mgmt_ancestor_procs and not exe_running_docker_save and not user_known_update_package_registry
NOTICE
User mgmt binaries
spawned_process and not container and proc.name in (user_mgmt_binaries) and not proc.name in (su, sudo, lastlog, nologin, unix_chkpwd) and not proc.pname in (cron_binaries, systemd, systemd.postins, udev.postinst, run-parts) and not proc.cmdline startswith "passwd -S" and not proc.cmdline startswith "useradd -D" and not proc.cmdline startswith "systemd --version" and not run_by_qualys and not run_by_sumologic_securefiles and not run_by_yum and not run_by_ms_oms and not run_by_google_accounts_daemon and not chage_list and not user_known_user_management_activities
CRITICAL
Web Server Spawned Shell
spawned_process and spawned_by_web_server and proc.name in (shell_binaries) and not proc.cmdline startswith "sh -c /usr/bin" and not proc.cmdline contains "healthcheck" and not user_known_web_server_shell_activities
WARNING
Web Server Spawned Suspicious Child Process
spawned_process and spawned_by_web_server and proc.name in (suspicious_web_children) and not proc.name in (shell_binaries) and not proc.cmdline contains "healthcheck" and not proc.cmdline contains "status" and not user_known_web_server_child_activities
ERROR
Write below binary dir
open_write and bin_dir and not package_mgmt_procs and not exe_running_docker_save and not python_running_get_pip and not python_running_ms_oms and not user_known_write_below_binary_dir_activities
ERROR
Write below etc
write_etc_common
ERROR
Write below monitored dir
open_write and monitored_dir and not package_mgmt_procs and not coreos_write_ssh_dir and not exe_running_docker_save and not python_running_get_pip and not python_running_ms_oms and not google_accounts_daemon_writing_ssh and not cloud_init_writing_ssh and not user_known_write_monitored_dir_conditions
ERROR
Write below root
open_write and root_dir and proc_name_exists and not fd.name in (known_root_files) and not fd.directory pmatch (known_root_directories) and not exe_running_docker_save and not gugent_writing_guestagent_log and not dse_writing_tmp and not zap_writing_state and not airflow_writing_state and not rpm_writing_root_rpmdb and not maven_writing_groovy and not chef_writing_conf and not kubectl_writing_state and not cassandra_writing_state and not galley_writing_state and not calico_writing_state and not rancher_writing_root and not runc_writing_exec_fifo and not mysqlsh_writing_state and not known_root_conditions and not user_known_write_root_conditions and not user_known_write_below_root_activities
ERROR
Write below rpm database
open_write and fd.name startswith /var/lib/rpm and not rpm_procs and not ansible_running_python and not python_running_chef and not exe_running_docker_save and not amazon_linux_running_python_yum and not user_known_write_rpm_database_activities
Showing 51-97 of 97