Skip to content
Threat Feed
low advisory

Linux Firewall Rule Manipulation for Defense Evasion

Adversaries manipulate Linux firewall configurations using utilities like iptables, nftables, or ufw to create or modify rules, facilitating unauthorized network access or the disruption of security controls.

Adversaries targeting Linux systems frequently modify firewall rules as a mechanism for defense evasion and persistence. By interacting with common network filtering utilities such as iptables, ip6tables, nftables, and ufw, attackers can implement DROP, ACCEPT, or REJECT actions. This behavior is used to bypass security controls by opening unauthorized inbound access paths, such as permitting SSH traffic from an attacker-controlled address, or to disrupt defensive operations by blocking communication to monitoring, management, or logging systems. This activity typically requires elevated privileges and is often performed post-exploitation to maintain access or conceal malicious network communication. Defenders should monitor for suspicious execution patterns that deviate from established configuration management baselines or administrative workflows.

Impact

Successful manipulation of firewall rules can lead to unauthorized remote access, the silencing of security alerts by blocking telemetry, and the exposure of sensitive services to untrusted networks. If left undetected, this activity provides attackers with a stable, persistent foothold that is shielded from traditional network-based detection and incident response actions.

Recommendation

  • Deploy the provided Sigma rules to detect unauthorized firewall modifications in the environment.
  • Establish a baseline of authorized firewall management processes and alert on deviations, such as manual modifications performed outside of approved maintenance windows or configuration-management tools.
  • Audit the use of administrative tools like iptables, nftables, and ufw to ensure they are only utilized by authorized personnel or automated deployment systems.
  • Implement strict least-privilege access for network configuration changes to prevent unauthorized users from altering system firewall policies.

Threat Hunt

Identification of firewall rule changes on sensitive or internet-facing hosts

T1562.004 medium high confidence convert to detection

Data: Process execution logs containing iptables, nft, or ufw

Mitigations

Enforce strict configuration management and restrict manual firewall modifications

medium_term IT Operations

T1562.004

Detection coverage 1

Detect Linux Firewall Rule Creation or Modification

low

Detects the modification of Linux firewall rules using common utilities such as iptables, nftables, or ufw with actions that weaken security posture.

sigma tactics: defense_evasion techniques: T1562.004 sources: process_creation, linux

Detection queries are available on the platform. Get full rules →