Unusual Linux Network Activity

Identifies Linux processes that do not usually use the network but have unexpected network activity, which can indicate command-and-control, lateral movement, persistence, or data exfiltration activity. A process with unusual network activity can denote process exploitation or injection, where the process is used to run persistence mechanisms that allow a malicious actor remote access or control of the host, data exfiltration, and execution of unauthorized network applications.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/03/25"
  3integration = ["auditd_manager", "endpoint"]
  4maturity = "production"
  5updated_date = "2025/11/18"
  6
  7[rule]
  8anomaly_threshold = 50
  9author = ["Elastic"]
 10description = """
 11Identifies Linux processes that do not usually use the network but have unexpected network activity, which can indicate
 12command-and-control, lateral movement, persistence, or data exfiltration activity. A process with unusual network
 13activity can denote process exploitation or injection, where the process is used to run persistence mechanisms that
 14allow a malicious actor remote access or control of the host, data exfiltration, and execution of unauthorized network
 15applications.
 16"""
 17from = "now-45m"
 18interval = "15m"
 19license = "Elastic License v2"
 20machine_learning_job_id = ["v3_linux_anomalous_network_activity"]
 21name = "Unusual Linux Network Activity"
 22setup = """## Setup
 23
 24This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
 25- Elastic Defend
 26- Auditd Manager
 27
 28### Anomaly Detection Setup
 29
 30Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
 31
 32### Elastic Defend Integration Setup
 33Elastic 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.
 34
 35#### Prerequisite Requirements:
 36- Fleet is required for Elastic Defend.
 37- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 38
 39#### The following steps should be executed in order to add the Elastic Defend integration to your system:
 40- Go to the Kibana home page and click "Add integrations".
 41- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 42- Click "Add Elastic Defend".
 43- Configure the integration name and optionally add a description.
 44- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 45- 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](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
 46- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 47- 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.
 48For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 49- Click "Save and Continue".
 50- 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.
 51For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 52
 53### Auditd Manager Integration Setup
 54The Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.
 55Auditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.
 56
 57#### The following steps should be executed in order to add the Elastic Agent System integration "auditd_manager" to your system:
 58- Go to the Kibana home page and click “Add integrations”.
 59- In the query bar, search for “Auditd Manager” and select the integration to see more details about it.
 60- Click “Add Auditd Manager”.
 61- Configure the integration name and optionally add a description.
 62- Review optional and advanced settings accordingly.
 63- Add the newly installed “auditd manager” to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.
 64- Click “Save and Continue”.
 65- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).
 66
 67#### Rule Specific Setup Note
 68Auditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.
 69However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the "audit rules" configuration box or the "auditd rule files" box by specifying a file to read the audit rules from.
 70- For this detection rule no additional audit rules are required.
 71"""
 72note = """## Triage and analysis
 73
 74### Investigating Unusual Linux Network Activity
 75Detection alerts from this rule indicate the presence of network activity from a Linux process for which network activity is rare and unusual.  Here are some possible avenues of investigation:
 76- Consider the IP addresses and ports. Are these used by normal but infrequent network workflows? Are they expected or unexpected?
 77- If the destination IP address is remote or external, does it associate with an expected domain, organization or geography? Note: avoid interacting directly with suspected malicious IP addresses.
 78- Consider the user as identified by the username field. Is this network activity part of an expected workflow for the user who ran the program?
 79- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business or maintenance process.
 80- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing."""
 81references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
 82risk_score = 21
 83rule_id = "52afbdc5-db15-485e-bc24-f5707f820c4b"
 84severity = "low"
 85tags = [
 86    "Domain: Endpoint",
 87    "OS: Linux",
 88    "Use Case: Threat Detection",
 89    "Rule Type: ML",
 90    "Rule Type: Machine Learning",
 91    "Resources: Investigation Guide",
 92]
 93type = "machine_learning"
 94
 95[[rule.threat]]
 96framework = "MITRE ATT&CK"
 97
 98[rule.threat.tactic]
 99id = "TA0011"
100name = "Command and Control"
101reference = "https://attack.mitre.org/tactics/TA0011/"
102
103[[rule.threat.technique]]
104id = "T1071"
105name = "Application Layer Protocol"
106reference = "https://attack.mitre.org/techniques/T1071/"
107
108[[rule.threat]]
109framework = "MITRE ATT&CK"
110
111[rule.threat.tactic]
112id = "TA0008"
113name = "Lateral Movement"
114reference = "https://attack.mitre.org/tactics/TA0008/"
115
116[[rule.threat]]
117framework = "MITRE ATT&CK"
118
119[rule.threat.tactic]
120id = "TA0003"
121name = "Persistence"
122reference = "https://attack.mitre.org/tactics/TA0003/"
123
124[[rule.threat]]
125framework = "MITRE ATT&CK"
126
127[rule.threat.tactic]
128id = "TA0005"
129name = "Defense Evasion"
130reference = "https://attack.mitre.org/tactics/TA0005/"
131
132[[rule.threat.technique]]
133id = "T1055"
134name = "Process Injection"
135reference = "https://attack.mitre.org/techniques/T1055/"
136
137[[rule.threat]]
138framework = "MITRE ATT&CK"
139
140[rule.threat.tactic]
141id = "TA0010"
142name = "Exfiltration"
143reference = "https://attack.mitre.org/tactics/TA0010/"
144
145[[rule.threat.technique]]
146id = "T1041"
147name = "Exfiltration Over C2 Channel"
148reference = "https://attack.mitre.org/techniques/T1041/"

Triage and analysis

Investigating Unusual Linux Network Activity

Detection alerts from this rule indicate the presence of network activity from a Linux process for which network activity is rare and unusual. Here are some possible avenues of investigation:

  • Consider the IP addresses and ports. Are these used by normal but infrequent network workflows? Are they expected or unexpected?
  • If the destination IP address is remote or external, does it associate with an expected domain, organization or geography? Note: avoid interacting directly with suspected malicious IP addresses.
  • Consider the user as identified by the username field. Is this network activity part of an expected workflow for the user who ran the program?
  • Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business or maintenance process.
  • Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.

References

Related rules

to-top