Detection Logic
from panther_aws_helpers import aws_cloudtrail_success, aws_rule_context
# API calls that are indicative of an EC2 VPC modification
EC2_VPC_MODIFIED_EVENTS = {
"CreateVpc",
"DeleteVpc",
"ModifyVpcAttribute",
"AcceptVpcPeeringConnection",
"CreateVpcPeeringConnection",
"DeleteVpcPeeringConnection",
"RejectVpcPeeringConnection",
"AttachClassicLinkVpc",
"DetachClassicLinkVpc",
"DisableVpcClassicLink",
"EnableVpcClassicLink",
}
def rule(event):
return aws_cloudtrail_success(event) and event.get("eventName") in EC2_VPC_MODIFIED_EVENTS
def dedup(event):
return event.get("recipientAccountId")
def alert_context(event):
return aws_rule_context(event) Field Validations
Loading…
Comments (0)
Loading comments...