[Security Content] Add Investigation Guides to Cloud Rules - AWS (#2104)
* [Security Content] Add Investigation Guides to Cloud Rules - AWS
* Apply suggestion from review
* Update rules/integrations/aws/exfiltration_ec2_snapshot_change_activity.toml
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
* Update rules/integrations/aws/impact_cloudwatch_log_stream_deletion.toml
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
* Apply suggestions from review
* Apply suggestions from code review
Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
* .
* Applies suggestions from the https://github.com/elastic/detection-rules/pull/2124 PR
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
(cherry picked from commit d854b943e5)
This commit is contained in:
committed by
github-actions[bot]
parent
900a8cdbe9
commit
edef90b3ec
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/06"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -22,17 +22,73 @@ interval = "10m"
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "AWS Access Secret in Secrets Manager"
|
||||
note = """## Setup
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating AWS Access Secret in Secrets Manager
|
||||
|
||||
AWS Secrets Manager is a service that enables the replacement of hardcoded credentials in code, including passwords, with
|
||||
an API call to Secrets Manager to retrieve the secret programmatically.
|
||||
|
||||
This rule looks for the retrieval of credentials using the API `GetSecretValue` action.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the account and its role in the environment, and inspect the related policy.
|
||||
- Identify the applications that should use this account.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Investigate abnormal values in the `user_agent.original` field by comparing them with the intended and authorized usage
|
||||
and historical data. Suspicious user agent values include non-SDK, AWS CLI, custom user agents, etc.
|
||||
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.
|
||||
- Contact the account owner and confirm whether they are aware of this activity.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Review IAM permission policies for the user identity and specific secrets accessed.
|
||||
- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher
|
||||
confidence. Consider adding exceptions — preferably with a combination of user agent and IP address conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Rotate secrets or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
|
||||
references = [
|
||||
"https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html",
|
||||
"http://detectioninthe.cloud/credential_access/access_secret_in_secrets_manager/",
|
||||
]
|
||||
risk_score = 73
|
||||
risk_score = 47
|
||||
rule_id = "a00681e3-9ed6-447c-ab2c-be648821c622"
|
||||
severity = "high"
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Data Protection"]
|
||||
severity = "medium"
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Data Protection", "Credential Access"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "query"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/06/26"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -23,17 +23,72 @@ index = ["filebeat-*", "logs-aws*"]
|
||||
interval = "10m"
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "AWS Config Service Tampering"
|
||||
note = """## Setup
|
||||
name = "AWS Config Resource Deletion"
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating AWS Config Resource Deletion
|
||||
|
||||
AWS Config provides a detailed view of the configuration of AWS resources in your AWS account. This includes how the
|
||||
resources are related to one another and how they were configured in the past so that you can see how the configurations
|
||||
and relationships change over time.
|
||||
|
||||
This rule looks for the deletion of AWS Config resources using various API actions. Attackers can do this to cover their
|
||||
tracks and impact security monitoring that relies on these sources.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account that performed the action and whether it should perform this kind of action.
|
||||
- Identify the AWS resource that was involved and its criticality, ownership, and role in the environment. Also investigate
|
||||
if the resource is security-related.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Contact the account and resource owners and confirm whether they are aware of this activity.
|
||||
- Check if this operation was approved and performed according to the organization's change management policy.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a
|
||||
combination of user and IP address conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
|
||||
references = [
|
||||
"https://docs.aws.amazon.com/config/latest/developerguide/how-does-config-work.html",
|
||||
"https://docs.aws.amazon.com/config/latest/APIReference/API_Operations.html",
|
||||
]
|
||||
risk_score = 47
|
||||
risk_score = 21
|
||||
rule_id = "7024e2a0-315d-4334-bb1a-552d604f27bc"
|
||||
severity = "medium"
|
||||
severity = "low"
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Monitoring"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "query"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/06/24"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -23,7 +23,62 @@ interval = "10m"
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "AWS EC2 Snapshot Activity"
|
||||
note = """## Setup
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating AWS EC2 Snapshot Activity
|
||||
|
||||
Amazon EC2 snapshots are a mechanism to create point-in-time references to data that reside in storage volumes. System
|
||||
administrators commonly use this for backup operations and data recovery.
|
||||
|
||||
This rule looks for the modification of snapshot attributes using the API `ModifySnapshotAttribute` action. This can be
|
||||
used to share snapshots with unauthorized third parties, giving others access to all the data on the snapshot.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account that performed the action and whether it should perform this kind of action.
|
||||
- Search for dry run attempts against the resource ID of the snapshot from other user accounts within CloudTrail.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.
|
||||
- Contact the account owner and confirm whether they are aware of this activity.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Check if this operation was approved and performed according to the organization's change management policy.
|
||||
- Check if the shared permissions of the snapshot were modified to `Public` or include unknown account IDs.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a
|
||||
combination of user and IP address conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
|
||||
references = [
|
||||
@@ -33,7 +88,7 @@ references = [
|
||||
risk_score = 47
|
||||
rule_id = "98fd7407-0bd5-5817-cda0-3fcc33113a56"
|
||||
severity = "medium"
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Asset Visibility"]
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Asset Visibility", "Exfiltration"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "query"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/05/20"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -23,7 +23,65 @@ interval = "10m"
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "AWS CloudWatch Log Stream Deletion"
|
||||
note = """## Setup
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating AWS CloudWatch Log Stream Deletion
|
||||
|
||||
Amazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of
|
||||
logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize
|
||||
logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your
|
||||
applications running smoothly.
|
||||
|
||||
A log stream is a sequence of log events that share the same source. Each separate source of logs in CloudWatch Logs
|
||||
makes up a separate log stream.
|
||||
|
||||
This rule looks for the deletion of a log stream using the API `DeleteLogStream` action. Attackers can do this to cover
|
||||
their tracks and impact security monitoring that relies on these sources.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account that performed the action and whether it should perform this kind of action.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Contact the account and resource owners and confirm whether they are aware of this activity.
|
||||
- Check if this operation was approved and performed according to the organization's change management policy.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Investigate the deleted log stream's criticality and whether the responsible team is aware of the deletion.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a
|
||||
combination of user and IP address conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
|
||||
references = [
|
||||
@@ -33,7 +91,7 @@ references = [
|
||||
risk_score = 47
|
||||
rule_id = "d624f0ae-3dd1-4856-9aad-ccfe4d4bfa17"
|
||||
severity = "medium"
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Log Auditing"]
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Log Auditing", "Impact"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "query"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/06"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -24,14 +24,70 @@ interval = "10m"
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "AWS Execution via System Manager"
|
||||
note = """## Setup
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating AWS Execution via System Manager
|
||||
|
||||
Amazon EC2 Systems Manager is a management service designed to help users automatically collect software inventory, apply
|
||||
operating system patches, create system images, and configure Windows and Linux operating systems.
|
||||
|
||||
This rule looks for the execution of commands and scripts using System Manager. Note that the actual contents of these
|
||||
scripts and commands are not included in the event, so analysts must gain visibility using an host-level security product.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account that performed the action and whether it should perform this kind of action.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Validate that the activity is not related to planned patches, updates, network administrator activity, or legitimate
|
||||
software installations.
|
||||
- Investigate the commands or scripts using host-level visibility.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.
|
||||
- Contact the account owner and confirm whether they are aware of this activity.
|
||||
- Check if this operation was approved and performed according to the organization's change management policy.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a
|
||||
combination of user and IP address conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
|
||||
references = ["https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-plugins.html"]
|
||||
risk_score = 21
|
||||
rule_id = "37b211e8-4e2f-440f-86d8-06cc8f158cfa"
|
||||
severity = "low"
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Log Auditing"]
|
||||
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Log Auditing", "Initial Access"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "query"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/13"
|
||||
maturity = "production"
|
||||
updated_date = "2022/02/28"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -23,41 +23,77 @@ interval = "15m"
|
||||
license = "Elastic License v2"
|
||||
machine_learning_job_id = "high_distinct_count_error_message"
|
||||
name = "Spike in AWS Error Messages"
|
||||
note = """
|
||||
## Setup
|
||||
note = """## Triage and analysis
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
### Investigating Spike in AWS Error Messages
|
||||
|
||||
## Triage and analysis
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and
|
||||
understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity
|
||||
when deviations occur.
|
||||
|
||||
### Investigating Spikes in CloudTrail Errors
|
||||
This rule uses a machine learning job to detect a significant spike in the rate of a particular error in the CloudTrail
|
||||
messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.
|
||||
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding
|
||||
what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations
|
||||
occur. This example rule triggers from a large spike in the number of CloudTrail log messages that contain a particular
|
||||
error message. The error message in question was associated with the response to an AWS API command or method call, this
|
||||
has the potential to uncover unknown threats or activity.
|
||||
#### Possible investigation steps
|
||||
|
||||
#### Possible investigation steps:
|
||||
- Examine the history of the error. Has it manifested before? If the error, which is visible in the `aws.cloudtrail.error_message` field, only manifested recently, it might be related to recent changes in an automation module or script.
|
||||
- Examine the request parameters. These may provide indications as to the nature of the task being performed when the error occurred. Is the error related to unsuccessful attempts to enumerate or access objects, data, or secrets? If so, this can sometimes be a byproduct of discovery, privilege escalation or lateral movement attempts.
|
||||
- Consider the user as identified by the `user.name field`. Is this activity part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an
|
||||
automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Validate the activity is not related to planned patches, updates, or network administrator activity.
|
||||
- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed
|
||||
when the error occurred.
|
||||
- Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal
|
||||
time of day?
|
||||
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False Positive Analysis
|
||||
- This rule has the possibility to produce false positives based on unexpected activity occurring such as bugs or recent
|
||||
changes to automation modules or scripting.
|
||||
### False positive analysis
|
||||
|
||||
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation
|
||||
module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence),
|
||||
it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
|
||||
- The adoption of new services or the addition of new functionality to scripts may generate false positives.
|
||||
|
||||
### Related Rules
|
||||
- Unusual AWS Command for a User
|
||||
- Rare AWS Error Code
|
||||
|
||||
### Response and Remediation
|
||||
- If suspicious or malicious activity is observed, immediately rotate and delete relevant AWS IAM access keys.
|
||||
- If any unauthorized new user accounts were created, remove them. Request password resets for other IAM users.
|
||||
- Look into enabling multi-factor authentication for users.
|
||||
- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276
|
||||
- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1
|
||||
- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1
|
||||
- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
"""
|
||||
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
|
||||
risk_score = 21
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/13"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -23,19 +23,81 @@ interval = "15m"
|
||||
license = "Elastic License v2"
|
||||
machine_learning_job_id = "rare_error_code"
|
||||
name = "Rare AWS Error Code"
|
||||
note = """
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating Rare AWS Error Code
|
||||
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and
|
||||
understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity
|
||||
when deviations occur.
|
||||
|
||||
This rule uses a machine learning job to detect an unusual error in a CloudTrail message. This can be byproducts of
|
||||
attempted or successful persistence, privilege escalation, defense evasion, discovery, lateral movement, or collection.
|
||||
|
||||
Detection alerts from this rule indicate a rare and unusual error code that was associated with the response to an AWS
|
||||
API command or method call.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an
|
||||
automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Validate the activity is not related to planned patches, updates, or network administrator activity.
|
||||
- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed
|
||||
when the error occurred.
|
||||
- Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal
|
||||
time of day?
|
||||
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation
|
||||
module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence),
|
||||
it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
|
||||
- The adoption of new services or the addition of new functionality to scripts may generate false positives.
|
||||
|
||||
### Related Rules
|
||||
|
||||
- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276
|
||||
- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1
|
||||
- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1
|
||||
- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
|
||||
## Triage and analysis
|
||||
|
||||
Investigating Unusual CloudTrail Error Activity ###
|
||||
Detection alerts from this rule indicate a rare and unusual error code that was associated with the response to an AWS API command or method call. Here are some possible avenues of investigation:
|
||||
- Examine the history of the error. Has it manifested before? If the error, which is visible in the `aws.cloudtrail.error_code field`, only manifested recently, it might be related to recent changes in an automation module or script.
|
||||
- Examine the request parameters. These may provide indications as to the nature of the task being performed when the error occurred. Is the error related to unsuccessful attempts to enumerate or access objects, data, or secrets? If so, this can sometimes be a byproduct of discovery, privilege escalation, or lateral movement attempts.
|
||||
- Consider the user as identified by the `user.name` field. Is this activity part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?"""
|
||||
"""
|
||||
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
|
||||
risk_score = 21
|
||||
rule_id = "19de8096-e2b0-4bd8-80c9-34a820813fff"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/13"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -24,20 +24,82 @@ interval = "15m"
|
||||
license = "Elastic License v2"
|
||||
machine_learning_job_id = "rare_method_for_a_city"
|
||||
name = "Unusual City For an AWS Command"
|
||||
note = """
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating Unusual City For an AWS Command
|
||||
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and
|
||||
understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity
|
||||
when deviations occur.
|
||||
|
||||
This rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is
|
||||
sourcing from a geolocation (city) that is unusual for the command. This can be the result of compromised credentials or
|
||||
keys used by a threat actor in a different geography than the authorized user(s).
|
||||
|
||||
Detection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation
|
||||
of the source IP address.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.
|
||||
- Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the
|
||||
`aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.
|
||||
- The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Validate the activity is not related to planned patches, updates, or network administrator activity.
|
||||
- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal
|
||||
time of day?
|
||||
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- False positives can occur if activity is coming from new employees based in a city with no previous history in AWS.
|
||||
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation
|
||||
module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence),
|
||||
it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
|
||||
|
||||
### Related Rules
|
||||
|
||||
- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1
|
||||
- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1
|
||||
- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff
|
||||
- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
|
||||
## Triage and analysis
|
||||
|
||||
### Investigating an Unusual CloudTrail Event
|
||||
Detection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address. Here are some possible avenues of investigation:
|
||||
- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?
|
||||
- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.
|
||||
- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing."""
|
||||
"""
|
||||
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
|
||||
risk_score = 21
|
||||
rule_id = "809b70d3-e2c3-455e-af1b-2626a5a1a276"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/13"
|
||||
maturity = "production"
|
||||
updated_date = "2021/09/13"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -24,41 +24,81 @@ interval = "15m"
|
||||
license = "Elastic License v2"
|
||||
machine_learning_job_id = "rare_method_for_a_country"
|
||||
name = "Unusual Country For an AWS Command"
|
||||
note = """
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating Unusual Country For an AWS Command
|
||||
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and
|
||||
understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity
|
||||
when deviations occur.
|
||||
|
||||
This rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is
|
||||
sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials
|
||||
or keys used by a threat actor in a different geography than the authorized user(s).
|
||||
|
||||
Detection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation
|
||||
of the source IP address.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.
|
||||
- Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the
|
||||
`aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.
|
||||
- The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Validate the activity is not related to planned patches, updates, or network administrator activity.
|
||||
- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal
|
||||
time of day?
|
||||
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False Positive Analysis
|
||||
|
||||
- False positives can occur if activity is coming from new employees based in a country with no previous history in AWS.
|
||||
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation
|
||||
module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence),
|
||||
it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
|
||||
|
||||
### Related Rules
|
||||
|
||||
- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276
|
||||
- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1
|
||||
- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff
|
||||
- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
|
||||
## Triage and analysis
|
||||
|
||||
### Investigating an Unusual Country For an AWS Command
|
||||
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding
|
||||
what is considered normal behavior within an organization, suspicious or malicious activity can be spotted when deviations
|
||||
are observed. This example rule focuses on AWS command activity where the country from the source of the activity has been
|
||||
considered unusual based on previous history.
|
||||
|
||||
#### Possible investigation steps:
|
||||
- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?
|
||||
- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.
|
||||
- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing.
|
||||
|
||||
### False Positive Analysis
|
||||
- False positives can occur if activity is coming from new employees based in a country with no previous history in AWS,
|
||||
therefore it's important to validate the activity listed in the investigation steps above.
|
||||
|
||||
### Related Rules
|
||||
- Unusual City For an AWS Command
|
||||
- Unusual AWS Command for a User
|
||||
- Rare AWS Error Code
|
||||
|
||||
### Response and Remediation
|
||||
- If suspicious or malicious activity is observed, immediately rotate and delete relevant AWS IAM access keys.
|
||||
- Validate if any unauthorized new users were created, remove these accounts and request password resets for other IAM users.
|
||||
- Look into enabling multi-factor authentication for users.
|
||||
- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
"""
|
||||
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
|
||||
risk_score = 21
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
creation_date = "2020/07/13"
|
||||
maturity = "production"
|
||||
updated_date = "2021/07/20"
|
||||
updated_date = "2022/07/14"
|
||||
integration = "aws"
|
||||
|
||||
[rule]
|
||||
@@ -23,21 +23,81 @@ interval = "15m"
|
||||
license = "Elastic License v2"
|
||||
machine_learning_job_id = "rare_method_for_a_username"
|
||||
name = "Unusual AWS Command for a User"
|
||||
note = """
|
||||
note = """## Triage and analysis
|
||||
|
||||
### Investigating Unusual AWS Command for a User
|
||||
|
||||
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and
|
||||
understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity
|
||||
when deviations occur.
|
||||
|
||||
This rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is
|
||||
being made by a user context that does not normally use the command. This can be the result of compromised credentials or
|
||||
keys as someone uses a valid account to persist, move laterally, or exfiltrate data.
|
||||
|
||||
Detection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the calling IAM
|
||||
user.
|
||||
|
||||
#### Possible investigation steps
|
||||
|
||||
- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.
|
||||
- Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the
|
||||
`aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.
|
||||
- The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Investigate other alerts associated with the user account during the past 48 hours.
|
||||
- Validate the activity is not related to planned patches, updates, or network administrator activity.
|
||||
- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.
|
||||
- Considering the source IP address and geolocation of the user who issued the command:
|
||||
- Do they look normal for the calling user?
|
||||
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source
|
||||
IP from an EC2 instance that's not under your control?
|
||||
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles?
|
||||
Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal
|
||||
time of day?
|
||||
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
|
||||
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services,
|
||||
and data accessed by the account in the last 24 hours.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation
|
||||
module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence),
|
||||
it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
|
||||
|
||||
### Related Rules
|
||||
|
||||
- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276
|
||||
- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1
|
||||
- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff
|
||||
- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670
|
||||
|
||||
### Response and remediation
|
||||
|
||||
- Initiate the incident response process based on the outcome of the triage.
|
||||
- Disable or limit the account during the investigation and response.
|
||||
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
|
||||
- Identify the account role in the cloud environment.
|
||||
- Assess the criticality of affected services and servers.
|
||||
- Work with your IT team to identify the impact on users.
|
||||
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
|
||||
- Identify any regulatory or legal ramifications related to this activity.
|
||||
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
||||
identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with
|
||||
your IT teams to minimize the impact on business operations during these actions.
|
||||
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
|
||||
- Consider enabling multi-factor authentication for users.
|
||||
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
|
||||
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
|
||||
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
|
||||
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
|
||||
- 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).
|
||||
|
||||
## Setup
|
||||
|
||||
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
|
||||
## Triage and analysis
|
||||
|
||||
### Investigating an Unusual CloudTrail Event
|
||||
|
||||
Detection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the calling IAM user. Here are some possible avenues of investigation:
|
||||
- Consider the user as identified by the `user.name` field. Is this command part of an expected workflow for the user context? Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context. The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
|
||||
- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user? If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts, or could it be sourcing from an EC2 instance that's not under your control? If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
|
||||
- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?
|
||||
- Examine the history of the command. If the command, which is visible in the `event.action field`, only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, if it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process.
|
||||
- Examine the request parameters. These may provide indications as to the source of the program or the nature of the tasks it is performing."""
|
||||
"""
|
||||
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
|
||||
risk_score = 21
|
||||
rule_id = "ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1"
|
||||
|
||||
@@ -33,7 +33,7 @@ for prevalence, whether they are located in expected locations, and if they are
|
||||
- Investigate the export operation:
|
||||
- Identify the user account that performed the action and whether it should perform this kind of action.
|
||||
- Contact the account owner and confirm whether they are aware of this activity.
|
||||
- Check if this operation is done under change management and approved according to the organization's policy.
|
||||
- Check if this operation was approved and performed according to the organization's change management policy.
|
||||
- Retrieve the operation status and use the `Get-MailboxExportRequest` cmdlet to review previous requests.
|
||||
- By default, no group in Exchange has the privilege to import or export mailboxes. Investigate administrators that
|
||||
assigned the "Mailbox Import Export" privilege for abnormal activity.
|
||||
|
||||
@@ -45,7 +45,7 @@ prevalence, whether they are located in expected locations, and if they are sign
|
||||
|
||||
- This mechanism can be used legitimately. If trusted software uses this command and the triage has not identified
|
||||
anything suspicious, this alert can be closed as a false positive.
|
||||
- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination
|
||||
of user and command line conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
@@ -42,7 +42,7 @@ and inspect the credentials used.
|
||||
|
||||
- This mechanism can be used legitimately. Analysts can dismiss the alert if the Administrator is aware of the activity
|
||||
and there are justifications for this configuration.
|
||||
- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination
|
||||
of user and command line conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
@@ -32,7 +32,7 @@ software installations.
|
||||
- Identify the user account that performed the action and whether it should perform this kind of action.
|
||||
- Contact the account owner and confirm whether they are aware of this activity.
|
||||
- Investigate other alerts associated with the user/host during the past 48 hours.
|
||||
- Check if this operation is done under change management and approved according to the organization's policy.
|
||||
- Check if this operation was approved and performed according to the organization's change management policy.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ for prevalence, whether they are located in expected locations, and if they are
|
||||
### False positive analysis
|
||||
|
||||
- This rule has a high chance to produce false positives as it is a legitimate tool used by network administrators.
|
||||
- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination
|
||||
of user and command line conditions.
|
||||
- Malicious behavior with `AdFind` should be investigated as part of a step within an attack chain. It doesn't happen in
|
||||
isolation, so reviewing previous logs/activity from impacted machines can be very telling.
|
||||
|
||||
@@ -47,7 +47,7 @@ modifications, and any spawned child processes.
|
||||
|
||||
- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify
|
||||
suspicious activity related to the user or host, such alerts can be dismissed.
|
||||
- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination
|
||||
of user and command line conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
@@ -47,7 +47,7 @@ network connections.
|
||||
|
||||
- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify
|
||||
suspicious activity related to the user or host, such alerts can be dismissed.
|
||||
- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination
|
||||
of user and command line conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
@@ -45,7 +45,7 @@ modifications, and any spawned child processes.
|
||||
|
||||
### False positive analysis
|
||||
|
||||
- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination
|
||||
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination
|
||||
of user and command line conditions.
|
||||
|
||||
### Response and remediation
|
||||
|
||||
Reference in New Issue
Block a user