event.dataset: "aws.cloudtrail"
and event.provider: ec2.amazonaws.com
and event.action: AuthorizeSecurityGroupIngress
and event.outcome: success
and aws.cloudtrail.flattened.request_parameters.ipPermissions.items.ipRanges.items.cidrIp: ("0.0.0.0/0" or "::/0")
and aws.cloudtrail.flattened.request_parameters.ipPermissions.items.fromPort: (
21 or 22 or 23 or 445 or 3389 or 5985 or 5986)
Install detection rules in Elastic Security
Detect Insecure AWS EC2 VPC Security Group Ingress Rule Added 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).