Panther informational experimental python
AWS Secrets Manager Batch Retrieve Secrets Catch-All
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. Although BatchGetSecretValue requires a list of secret IDs or a filter, an attacker may use a catch-all filter to retrieve all secrets by batch. This rule identifies BatchGetSecretValue events with a catch-all filter.
Detection Logic
from panther_aws_helpers import aws_rule_context
def rule(event):
if event.get("eventName") != "BatchGetSecretValue":
return False
filters = event.deep_get("requestParameters", "filters", default=[])
for filt in filters:
if filt.get("key") != "tag-key":
return False
if any(not value.startswith("!") for value in filt.get("values")):
return False
return True
def title(event):
user = event.udm("actor_user")
return (
f"[{user}] attempted to batch retrieve secrets from "
"AWS Secrets Manager with a catch-all filter"
)
def alert_context(event):
return aws_rule_context(event) Field Validations
Loading…
Comments (0)
Loading comments...