Skip to content

Commit 6753bb7

Browse files
sodhikirti07github-actions[bot]
authored andcommitted
Adding setup templates to the ML rules (#3798)
* Added setup instructions for ml rules (cherry picked from commit 51b9717)
1 parent 1225f06 commit 6753bb7

File tree

47 files changed

+2230
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2230
-67
lines changed

rules/integrations/aws/ml_cloudtrail_error_message_spike.toml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/07/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/18"
66

77
[rule]
88
anomaly_threshold = 50
@@ -23,6 +23,27 @@ interval = "15m"
2323
license = "Elastic License v2"
2424
machine_learning_job_id = "high_distinct_count_error_message"
2525
name = "Spike in AWS Error Messages"
26+
setup = """## Setup
27+
28+
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
29+
30+
### Anomaly Detection Setup
31+
32+
Once 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).
33+
34+
### AWS Integration Setup
35+
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
36+
37+
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
38+
- Go to the Kibana home page and click “Add integrations”.
39+
- In the query bar, search for “AWS” and select the integration to see more details about it.
40+
- Click “Add AWS”.
41+
- Configure the integration name and optionally add a description.
42+
- Review optional and advanced settings accordingly.
43+
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
44+
- Click “Save and Continue”.
45+
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
46+
"""
2647
note = """## Triage and analysis
2748
2849
### Investigating Spike in AWS Error Messages
@@ -76,10 +97,6 @@ This rule uses a machine learning job to detect a significant spike in the rate
7697
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
7798
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
7899
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
79-
80-
## Setup
81-
82-
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
83100
"""
84101
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
85102
risk_score = 21

rules/integrations/aws/ml_cloudtrail_rare_error_code.toml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/07/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/18"
66

77
[rule]
88
anomaly_threshold = 50
@@ -23,6 +23,27 @@ interval = "15m"
2323
license = "Elastic License v2"
2424
machine_learning_job_id = "rare_error_code"
2525
name = "Rare AWS Error Code"
26+
setup = """## Setup
27+
28+
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
29+
30+
### Anomaly Detection Setup
31+
32+
Once 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).
33+
34+
### AWS Integration Setup
35+
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
36+
37+
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
38+
- Go to the Kibana home page and click “Add integrations”.
39+
- In the query bar, search for “AWS” and select the integration to see more details about it.
40+
- Click “Add AWS”.
41+
- Configure the integration name and optionally add a description.
42+
- Review optional and advanced settings accordingly.
43+
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
44+
- Click “Save and Continue”.
45+
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
46+
"""
2647
note = """## Triage and analysis
2748
2849
### Investigating Rare AWS Error Code
@@ -78,10 +99,6 @@ Detection alerts from this rule indicate a rare and unusual error code that was
7899
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
79100
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
80101
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
81-
82-
## Setup
83-
84-
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
85102
"""
86103
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
87104
risk_score = 21

rules/integrations/aws/ml_cloudtrail_rare_method_by_city.toml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/07/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/18"
66

77
[rule]
88
anomaly_threshold = 50
@@ -24,6 +24,27 @@ interval = "15m"
2424
license = "Elastic License v2"
2525
machine_learning_job_id = "rare_method_for_a_city"
2626
name = "Unusual City For an AWS Command"
27+
setup = """## Setup
28+
29+
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
30+
31+
### Anomaly Detection Setup
32+
33+
Once 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).
34+
35+
### AWS Integration Setup
36+
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
37+
38+
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
39+
- Go to the Kibana home page and click “Add integrations”.
40+
- In the query bar, search for “AWS” and select the integration to see more details about it.
41+
- Click “Add AWS”.
42+
- Configure the integration name and optionally add a description.
43+
- Review optional and advanced settings accordingly.
44+
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
45+
- Click “Save and Continue”.
46+
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
47+
"""
2748
note = """## Triage and analysis
2849
2950
### Investigating Unusual City For an AWS Command
@@ -80,10 +101,6 @@ Detection alerts from this rule indicate an AWS API command or method call that
80101
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
81102
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
82103
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
83-
84-
## Setup
85-
86-
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
87104
"""
88105
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
89106
risk_score = 21

rules/integrations/aws/ml_cloudtrail_rare_method_by_country.toml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/07/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/18"
66

77
[rule]
88
anomaly_threshold = 50
@@ -24,6 +24,27 @@ interval = "15m"
2424
license = "Elastic License v2"
2525
machine_learning_job_id = "rare_method_for_a_country"
2626
name = "Unusual Country For an AWS Command"
27+
setup = """## Setup
28+
29+
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
30+
31+
### Anomaly Detection Setup
32+
33+
Once 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).
34+
35+
### AWS Integration Setup
36+
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
37+
38+
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
39+
- Go to the Kibana home page and click “Add integrations”.
40+
- In the query bar, search for “AWS” and select the integration to see more details about it.
41+
- Click “Add AWS”.
42+
- Configure the integration name and optionally add a description.
43+
- Review optional and advanced settings accordingly.
44+
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
45+
- Click “Save and Continue”.
46+
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
47+
"""
2748
note = """## Triage and analysis
2849
2950
### Investigating Unusual Country For an AWS Command
@@ -80,10 +101,6 @@ Detection alerts from this rule indicate an AWS API command or method call that
80101
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
81102
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
82103
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
83-
84-
## Setup
85-
86-
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
87104
"""
88105
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
89106
risk_score = 21

rules/integrations/aws/ml_cloudtrail_rare_method_by_user.toml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/07/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/18"
66

77
[rule]
88
anomaly_threshold = 75
@@ -23,6 +23,27 @@ interval = "15m"
2323
license = "Elastic License v2"
2424
machine_learning_job_id = "rare_method_for_a_username"
2525
name = "Unusual AWS Command for a User"
26+
setup = """## Setup
27+
28+
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
29+
30+
### Anomaly Detection Setup
31+
32+
Once 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).
33+
34+
### AWS Integration Setup
35+
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
36+
37+
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
38+
- Go to the Kibana home page and click “Add integrations”.
39+
- In the query bar, search for “AWS” and select the integration to see more details about it.
40+
- Click “Add AWS”.
41+
- Configure the integration name and optionally add a description.
42+
- Review optional and advanced settings accordingly.
43+
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
44+
- Click “Save and Continue”.
45+
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
46+
"""
2647
note = """## Triage and analysis
2748
2849
### Investigating Unusual AWS Command for a User
@@ -78,10 +99,6 @@ Detection alerts from this rule indicate an AWS API command or method call that
7899
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
79100
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
80101
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
81-
82-
## Setup
83-
84-
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
85102
"""
86103
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
87104
risk_score = 21

rules/ml/command_and_control_ml_packetbeat_dns_tunneling.toml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/03/25"
33
integration = ["endpoint", "network_traffic"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/18"
66

77
[rule]
88
anomaly_threshold = 50
@@ -24,6 +24,50 @@ interval = "15m"
2424
license = "Elastic License v2"
2525
machine_learning_job_id = "packetbeat_dns_tunneling"
2626
name = "DNS Tunneling"
27+
setup = """## Setup
28+
29+
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
30+
- Elastic Defend
31+
- Network Packet Capture
32+
33+
### Anomaly Detection Setup
34+
35+
Once 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).
36+
37+
### Elastic Defend Integration Setup
38+
Elastic 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.
39+
40+
#### Prerequisite Requirements:
41+
- Fleet is required for Elastic Defend.
42+
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
43+
44+
#### The following steps should be executed in order to add the Elastic Defend integration to your system:
45+
- Go to the Kibana home page and click "Add integrations".
46+
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
47+
- Click "Add Elastic Defend".
48+
- Configure the integration name and optionally add a description.
49+
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
50+
- 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).
51+
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
52+
- 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.
53+
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
54+
- Click "Save and Continue".
55+
- 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.
56+
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
57+
58+
### Network Packet Capture Integration Setup
59+
The Network Packet Capture integration sniffs network packets on a host and dissects known protocols. Monitoring the network traffic is critical to gaining observability and securing your environment — ensuring high levels of performance and security. The Network Packet Capture integration captures the network traffic between your application servers, decodes common application layer protocols and records the interesting fields for each transaction.
60+
61+
#### The following steps should be executed in order to add the Elastic Agent System integration "network_traffic" to your system:
62+
- Go to the Kibana home page and click “Add integrations”.
63+
- In the query bar, search for “Network Packet Capture” and select the integration to see more details about it.
64+
- Click “Add Network Packet Capture”.
65+
- Configure the integration name and optionally add a description.
66+
- Review optional and advanced settings accordingly.
67+
- Add the newly installed “network_traffic” to an existing or a new agent policy, and deploy the agent on your system from which network log files are desirable.
68+
- Click “Save and Continue”.
69+
- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/network_traffic).
70+
"""
2771
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
2872
risk_score = 21
2973
rule_id = "91f02f01-969f-4167-8f66-07827ac3bdd9"

0 commit comments

Comments
 (0)