RQL Query to search for suspicious activity on specific S3 Bucket

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RQL Query to search for suspicious activity on specific S3 Bucket

L0 Member

We have a specific S3 bucket that we'd like to watch for events and alert on them.  I've used this query:

 

event from cloud.audit_logs where operation IN ( 'AddUserToGroup', 'AttachGroupPolicy', 'AttachGroupPolicy', 'AttachUserPolicy' , 'AttachRolePolicy' , 'CreateAccessKey', 'CreateKeyPair', 'DeleteKeyPair', 'DeleteLogGroup' )

 

but need to modify it to only query if events happen on a specific S3 bucket (not on all buckets).  Anyone know how I can add to this RQL query to only query against the specific S3 bucket?

 

Thanks!

2 REPLIES 2

L0 Member

Hello RDunsirn23, 

Can you check if the below RQL query works for your use case

event from cloud.audit_logs where cloud.service = 's3.amazonaws.com' AND json.rule = $.requestParameters.bucketName = "<bucket_name>"

Here, replace the bucket name with the S3 bucket name and this should generate an alert anytime any event is performed on the bucket. You can filter this further such that alerts are generated only for specific events by using operation IN ( '<API name>') 
Refer Event Query attributes doc to learn about the different attributes for event query.

L0 Member

Thank you!  I will try this out.

  • 1019 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!