-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
069b9e8
commit eb43028
Showing
7 changed files
with
75 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rules/aws_cloudtrail_rules/aws_secretsmanager_retrieve_secrets_batch.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
rules/aws_cloudtrail_rules/aws_secretsmanager_retrieve_secrets_catchall.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 5 additions & 9 deletions
14
rules/aws_cloudtrail_rules/aws_secretsmanager_retrieve_secrets_multiregion.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
rules/aws_cloudtrail_rules/aws_secretsmanager_retrieve_secrets_multiregion.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
AnalysisType: rule | ||
Filename: aws_secretsmanager_retrieve_secrets_catchall.py | ||
RuleID: "AWS.SecretsManager.RetrieveSecretsMultiRegion" | ||
DisplayName: "AWS Secrets Manager Retrieve Secrets Multi-Region" | ||
Enabled: true | ||
LogTypes: | ||
- AWS.CloudTrail | ||
Tags: | ||
- AWS | ||
- Credential Access | ||
- Stratus Red Team | ||
Reports: | ||
MITRE ATT&CK: | ||
- TA0006:T1552 # Credentials from Password Stores | ||
Severity: Medium | ||
Description: > | ||
An attacker attempted to retrieve a high number of Secrets Manager secrets by batch, through secretsmanager:BatchGetSecretValue (released Novemeber 2023). | ||
An attacker may attempt to retrieve a high number of secrets by batch, to avoid detection and generate fewer calls. Note that the batch size is limited to 20 secrets. | ||
This rule identifies BatchGetSecretValue events for multiple regions in a short period of time. | ||
Runbook: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html | ||
Reference: https://stratus-red-team.cloud/attack-techniques/AWS/aws.credential-access.ec2-get-password-data/ | ||
Threshold: 1 | ||
DedupPeriodMinutes: 60 | ||
SummaryAttributes: | ||
- eventName | ||
- userAgent | ||
- sourceIpAddress | ||
- recipientAccountId | ||
- p_any_aws_arns | ||
Tests: | ||
- Name: BatchGetSecretValue Catch-All | ||
ExpectedResult: true | ||
Log: { | ||
"eventSource": "secretsmanager.amazonaws.com", | ||
"eventName": "BatchGetSecretValue", | ||
"requestParameters": { | ||
"filters": [ | ||
{ | ||
"key": "tag-key", | ||
"values": [ | ||
"!tagKeyThatWillNeverExist" | ||
] | ||
} | ||
] | ||
}, | ||
"responseElements": null, | ||
"readOnly": true, | ||
"eventType": "AwsApiCall", | ||
"managementEvent": true, | ||
"recipientAccountId": "012345678901" | ||
} |