7ddae4b493
* [Security Content] Add Investigation Guides - Cloud - 2 * Replace config/setup * Applies suggestions from review * Update credential_access_aws_iam_assume_role_brute_force.toml * Apply suggestions from code review * Update credential_access_aws_iam_assume_role_brute_force.toml * Apply suggestions from code review Co-authored-by: nastasha-solomon <79124755+nastasha-solomon@users.noreply.github.com> Co-authored-by: nastasha-solomon <79124755+nastasha-solomon@users.noreply.github.com>
107 lines
5.3 KiB
TOML
107 lines
5.3 KiB
TOML
[metadata]
|
|
creation_date = "2020/05/26"
|
|
maturity = "production"
|
|
updated_date = "2022/07/19"
|
|
integration = "aws"
|
|
|
|
[rule]
|
|
author = ["Elastic", "Austin Songer"]
|
|
description = """
|
|
Identifies the deactivation of a specified multi-factor authentication (MFA) device and removes it from association with
|
|
the user name for which it was originally enabled. In AWS Identity and Access Management (IAM), a device must be
|
|
deactivated before it can be deleted.
|
|
"""
|
|
false_positives = [
|
|
"""
|
|
A MFA device may be deactivated by a system or network administrator. Verify whether the user identity, user agent,
|
|
and/or hostname should be making changes in your environment. MFA device deactivations from unfamiliar users or
|
|
hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
|
|
""",
|
|
]
|
|
from = "now-60m"
|
|
index = ["filebeat-*", "logs-aws*"]
|
|
interval = "10m"
|
|
language = "kuery"
|
|
license = "Elastic License v2"
|
|
name = "AWS IAM Deactivation of MFA Device"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating AWS IAM Deactivation of MFA Device
|
|
|
|
Multi-factor authentication (MFA) in AWS is a simple best practice that adds an extra layer of protection on top of your
|
|
user name and password. With MFA enabled, when a user signs in to an AWS Management Console, they will be prompted for
|
|
their user name and password (the first factor—what they know), as well as for an authentication code from their AWS MFA
|
|
device (the second factor—what they have). Taken together, these multiple factors provide increased security for your
|
|
AWS account settings and resources.
|
|
|
|
For more information about using MFA in AWS, access the [official documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html).
|
|
|
|
This rule looks for the deactivation or deletion of AWS MFA devices. These modifications weaken account security and can
|
|
lead to the compromise of accounts and other assets.
|
|
|
|
#### 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.
|
|
- 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
|
|
|
|
- While this activity can be done by administrators, all users must use MFA. The security team should address any
|
|
potential benign true positive (B-TP), as this configuration can risk the user and domain.
|
|
|
|
### 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 and minimize 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.
|
|
- Reactivate multi-factor authentication for the user.
|
|
- 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.
|
|
- Determine 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://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/deactivate-mfa-device.html",
|
|
"https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html",
|
|
]
|
|
risk_score = 47
|
|
rule_id = "d8fc1cca-93ed-43c1-bbb6-c0dd3eff2958"
|
|
severity = "medium"
|
|
tags = ["Elastic", "Cloud", "AWS", "Continuous Monitoring", "SecOps", "Monitoring"]
|
|
timestamp_override = "event.ingested"
|
|
type = "query"
|
|
|
|
query = '''
|
|
event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:(DeactivateMFADevice or DeleteVirtualMFADevice) and event.outcome:success
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1531"
|
|
name = "Account Access Removal"
|
|
reference = "https://attack.mitre.org/techniques/T1531/"
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0040"
|
|
name = "Impact"
|
|
reference = "https://attack.mitre.org/tactics/TA0040/"
|