|
| 1 | +[metadata] |
| 2 | +creation_date = "2024/10/25" |
| 3 | +integration = ["aws"] |
| 4 | +maturity = "production" |
| 5 | +updated_date = "2024/10/25" |
| 6 | + |
| 7 | + |
| 8 | +[rule] |
| 9 | +author = ["Elastic"] |
| 10 | +description = """ |
| 11 | +Identifies when a user has assumed a role using a new MFA device. Users can assume a role to obtain temporary credentials and access AWS resources using the AssumeRole API of AWS Security Token Service (STS). |
| 12 | +While a new MFA device is not always indicative of malicious behavior it should be verified as adversaries can use this technique for persistence and privilege escalation. |
| 13 | +""" |
| 14 | +false_positives = [ |
| 15 | + "AWS administrators or automated processes might regularly assume roles for legitimate administrative purposes and to perform periodic tasks such as data backups, updates, or deployments.", |
| 16 | +] |
| 17 | +index = ["filebeat-*", "logs-aws.cloudtrail-*"] |
| 18 | +language = "kuery" |
| 19 | +license = "Elastic License v2" |
| 20 | +name = "AWS STS AssumeRole with New MFA Device" |
| 21 | +note = """## Setup |
| 22 | +
|
| 23 | +The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.""" |
| 24 | +references = [ |
| 25 | + "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html", |
| 26 | + "https://github.com/RhinoSecurityLabs/cloudgoat/blob/d5863b80afd082d853f2e8df1955c6393695a4da/scenarios/iam_privesc_by_key_rotation/README.md", |
| 27 | +] |
| 28 | +risk_score = 21 |
| 29 | +rule_id = "a22f566b-5b23-4412-880d-c6c957acd321" |
| 30 | +severity = "low" |
| 31 | +tags = [ |
| 32 | + "Domain: Cloud", |
| 33 | + "Data Source: AWS", |
| 34 | + "Data Source: Amazon Web Services", |
| 35 | + "Data Source: AWS STS", |
| 36 | + "Use Case: Identity and Access Audit", |
| 37 | + "Tactic: Privilege Escalation", |
| 38 | + "Tactic: Persistence", |
| 39 | + "Tactic: Lateral Movement", |
| 40 | +] |
| 41 | +timestamp_override = "event.ingested" |
| 42 | +type = "new_terms" |
| 43 | + |
| 44 | +query = ''' |
| 45 | +event.dataset:aws.cloudtrail |
| 46 | + and event.provider:sts.amazonaws.com |
| 47 | + and event.action:(AssumeRole or AssumeRoleWithSAML or AssumeRoleWithWebIdentity) |
| 48 | + and event.outcome:success |
| 49 | + and user.id:* |
| 50 | + and aws.cloudtrail.flattened.request_parameters.serialNumber:* |
| 51 | +''' |
| 52 | + |
| 53 | + |
| 54 | +[[rule.threat]] |
| 55 | +framework = "MITRE ATT&CK" |
| 56 | +[[rule.threat.technique]] |
| 57 | +id = "T1556" |
| 58 | +name = "Modify Authentication Process" |
| 59 | +reference = "https://attack.mitre.org/techniques/T1556/" |
| 60 | +[[rule.threat.technique.subtechnique]] |
| 61 | +id = "T1556.006" |
| 62 | +name = "Multi-Factor Authentication" |
| 63 | +reference = "https://attack.mitre.org/techniques/T1556/006/" |
| 64 | + |
| 65 | + |
| 66 | +[rule.threat.tactic] |
| 67 | +id = "TA0003" |
| 68 | +name = "Persistence" |
| 69 | +reference = "https://attack.mitre.org/tactics/TA0003/" |
| 70 | +[[rule.threat]] |
| 71 | +framework = "MITRE ATT&CK" |
| 72 | +[[rule.threat.technique]] |
| 73 | +id = "T1548" |
| 74 | +name = "Abuse Elevation Control Mechanism" |
| 75 | +reference = "https://attack.mitre.org/techniques/T1548/" |
| 76 | + |
| 77 | + |
| 78 | +[rule.threat.tactic] |
| 79 | +id = "TA0004" |
| 80 | +name = "Privilege Escalation" |
| 81 | +reference = "https://attack.mitre.org/tactics/TA0004/" |
| 82 | +[[rule.threat]] |
| 83 | +framework = "MITRE ATT&CK" |
| 84 | +[[rule.threat.technique]] |
| 85 | +id = "T1550" |
| 86 | +name = "Use Alternate Authentication Material" |
| 87 | +reference = "https://attack.mitre.org/techniques/T1550/" |
| 88 | +[[rule.threat.technique.subtechnique]] |
| 89 | +id = "T1550.001" |
| 90 | +name = "Application Access Token" |
| 91 | +reference = "https://attack.mitre.org/techniques/T1550/001/" |
| 92 | + |
| 93 | + |
| 94 | +[rule.threat.tactic] |
| 95 | +id = "TA0008" |
| 96 | +name = "Lateral Movement" |
| 97 | +reference = "https://attack.mitre.org/tactics/TA0008/" |
| 98 | + |
| 99 | +[rule.new_terms] |
| 100 | +field = "new_terms_fields" |
| 101 | +value = ["user.id", "aws.cloudtrail.flattened.request_parameters.serialNumber"] |
| 102 | +[[rule.new_terms.history_window_start]] |
| 103 | +field = "history_window_start" |
| 104 | +value = "now-10d" |
| 105 | + |
| 106 | + |
0 commit comments