Impact (TA0040)(opens in a new tab or window)
from logs-aws.cloudtrail*
| where
event.provider == "s3.amazonaws.com"
and aws.cloudtrail.error_code == "AccessDenied"
and tls.client.server_name is not null
and cloud.account.id is not null
// keep only relevant ECS fields
| keep
tls.client.server_name,
source.address,
cloud.account.id
// count access denied requests per server_name, source, and account
| stats
Esql.event_count = count(*)
by
tls.client.server_name,
source.address,
cloud.account.id
// Threshold: more than 40 denied requests
| where Esql.event_count > 40
Install detection rules in Elastic Security
Detect AWS S3 Bucket Enumeration or Brute Force in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).