Linux Firewall Rule Creation or Modification

Last updated 7 days ago on 2026-10-23
Created 2 months ago on 2026-09-14

About

Adversaries may create or modify Linux firewall rules with DROP, ACCEPT, or REJECT actions to affect how a host receives or sends network traffic. This activity may be used to bypass security controls, block defensive tooling, or gain unauthorized access to the network.
Tags
Domain: EndpointOS: LinuxPlatform: LinuxUse Case: Threat DetectionTactic: Defense EvasionData Source: Auditd ManagerData Source: Elastic DefendData Source: Elastic EndgameData Source: CrowdstrikeData Source: SentinelOneRule Type: Event Correlation (EQL)Language: eql
Severity
low
Risk Score
21
MITRE ATT&CK™

Defense Evasion (TA0005)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.process*endgame-*logs-crowdstrike.fdr*logs-sentinel_one_cloud_funnel.*logs-auditd_manager.auditd-*auditbeat-*
Related Integrations

endpoint(external, opens in a new tab or window)

sentinel_one_cloud_funnel(external, opens in a new tab or window)

crowdstrike(external, opens in a new tab or window)

auditd_manager(external, opens in a new tab or window)

Query
text code block:
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and ( ( process.name in ( "iptables", "ip6tables", "iptables-nft", "ip6tables-nft", "iptables-legacy", "ip6tables-legacy", "xtables-nft-multi", "xtables-legacy-multi" ) and process.args in ("-A", "--append", "-I", "--insert", "-R", "--replace", "-P", "--policy") and process.args like~ ("DROP", "ACCEPT", "REJECT") ) or ( process.name == "nft" and process.args in ("add", "insert", "replace") and process.args == "rule" and process.args like~ ("DROP", "ACCEPT", "REJECT") and not process.args in ("-c", "--check") ) or ( process.name == "ufw" and process.args like~ ("deny", "allow", "reject") and not process.args in ("delete", "--dry-run") ) ) and not ( process.parent.name in ("firewalld", "libvirtd") or process.parent.executable like ( "/usr/bin/dockerd", "/usr/libexec/podman/netavark", "/usr/bin/cilium-agent", "/run/k0s/containerd/io.containerd.runtime.v2.task/k8s.io/*/cilium-agent", "/run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/*/cilium-agent", "/nix/store/*/docker/dockerd", "/usr/bin/fail2ban-server", "/usr/local/bin/dockerd", "/usr/sbin/NetworkManager", "/usr/sbin/tailscaled", "/var/lib/rancher/rke2/*/kubelet" ) )

Install detection rules in Elastic Security

Detect Linux Firewall Rule Creation or Modification in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).