Attempt to Disable IPTables or Firewall

Adversaries may attempt to disable the iptables or firewall service in an attempt to affect how a host is allowed to receive or send network traffic.

Elastic rule (View on GitHub)

 2creation_date = "2023/02/22"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/11/02"
10author = ["Elastic"]
11description = """
12Adversaries may attempt to disable the iptables or firewall service in an attempt to affect how a host is allowed to
13receive or send network traffic.
15from = "now-9m"
16index = ["*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Attempt to Disable IPTables or Firewall"
20risk_score = 21
21rule_id = "83e9c2b3-24ef-4c1d-a8cd-5ebafb5dfa2f"
22setup = """
24This rule requires data coming in from Elastic Defend.
26### Elastic Defend Integration Setup
27Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
29#### Prerequisite Requirements:
30- Fleet is required for Elastic Defend.
31- To configure Fleet Server refer to the [documentation](
33#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
34- Go to the Kibana home page and click "Add integrations".
35- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
36- Click "Add Elastic Defend".
37- Configure the integration name and optionally add a description.
38- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
39- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](
40- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
41- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
42For more details on Elastic Agent configuration settings, refer to the [helper guide](
43- Click "Save and Continue".
44- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
45For more details on Elastic Defend refer to the [helper guide](
48severity = "low"
49tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Defend"]
50timestamp_override = "event.ingested"
51type = "eql"
52query = '''
53process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
54 (
55   /* disable FW */
56   (
57     ( == "ufw" and process.args == "disable") or
58     ( == "iptables" and process.args == "-F" and process.args_count == 2)
59   ) or
61   /* stop FW service */
62   (
63     (( == "service" and process.args == "stop") or
64       ( == "chkconfig" and process.args == "off") or
65       ( == "systemctl" and process.args in ("disable", "stop", "kill"))) and
66    process.args in ("firewalld", "ip6tables", "iptables")
67    )
68  )
73framework = "MITRE ATT&CK"
75name = "Impair Defenses"
76id = "T1562"
77reference = ""
79name = "Disable or Modify Tools"
80id = "T1562.001"
81reference = ""
86name = "Defense Evasion"
87id = "TA0005"
88reference = ""

Related rules