Unusual Linux Network Port Activity

Identifies unusual destination port activity that can indicate command-and-control, persistence mechanism, or data exfiltration activity. Rarely used destination port activity is generally unusual in Linux fleets, and can indicate unauthorized access or threat actor activity.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/03/25"
 3integration = ["auditd_manager", "endpoint"]
 4maturity = "production"
 5updated_date = "2024/06/18"
 6
 7[rule]
 8anomaly_threshold = 50
 9author = ["Elastic"]
10description = """
11Identifies unusual destination port activity that can indicate command-and-control, persistence mechanism, or data
12exfiltration activity. Rarely used destination port activity is generally unusual in Linux fleets, and can indicate
13unauthorized access or threat actor activity.
14"""
15false_positives = ["A newly installed program or one that rarely uses the network could trigger this alert."]
16from = "now-45m"
17interval = "15m"
18license = "Elastic License v2"
19machine_learning_job_id = ["v3_linux_anomalous_network_port_activity"]
20name = "Unusual Linux Network Port Activity"
21setup = """## Setup
22
23This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
24- Elastic Defend
25- Auditd Manager
26
27### Anomaly Detection Setup
28
29Once 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).
30
31### Elastic Defend Integration Setup
32Elastic 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.
33
34#### Prerequisite Requirements:
35- Fleet is required for Elastic Defend.
36- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
37
38#### The following steps should be executed in order to add the Elastic Defend integration to your system:
39- Go to the Kibana home page and click "Add integrations".
40- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
41- Click "Add Elastic Defend".
42- Configure the integration name and optionally add a description.
43- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
44- 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).
45- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
46- 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.
47For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
48- Click "Save and Continue".
49- 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.
50For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
51
52### Auditd Manager Integration Setup
53The Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.
54Auditd 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.
55
56#### The following steps should be executed in order to add the Elastic Agent System integration "auditd_manager" to your system:
57- Go to the Kibana home page and click “Add integrations”.
58- In the query bar, search for “Auditd Manager” and select the integration to see more details about it.
59- Click “Add Auditd Manager”.
60- Configure the integration name and optionally add a description.
61- Review optional and advanced settings accordingly.
62- 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.
63- Click “Save and Continue”.
64- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).
65
66#### Rule Specific Setup Note
67Auditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.
68However, 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.
69- For this detection rule no additional audit rules are required.
70"""
71references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
72risk_score = 21
73rule_id = "3c7e32e6-6104-46d9-a06e-da0f8b5795a0"
74severity = "low"
75tags = [
76    "Domain: Endpoint",
77    "OS: Linux",
78    "Use Case: Threat Detection",
79    "Rule Type: ML",
80    "Rule Type: Machine Learning",
81]
82type = "machine_learning"

References

Related rules

to-top