Microsoft Sentinel medium experimental kql
AWSCloudTrail - Unauthorized EC2 Instance Setup Attempt
Detects an unauthorized attempt to launch an EC2 instance by a user without the necessary permissions. This may indicate an attempt to provision malicious infrastructure within the AWS subscription. Reference: https://stratus-red-team.cloud/attack-techniques/AWS/aws.execution.ec2-launch-unusual-instances/
Detection Logic
AWSCloudTrail
| where EventName == "RunInstances"
| where ErrorCode == "Client.UnauthorizedOperation"
| project TimeGenerated, AwsEventId, EventTypeName, UserIdentityPrincipalid, UserIdentityType, UserIdentityAccountId, SessionMfaAuthenticated, SessionCreationDate, SessionIssuerUserName, SourceIpAddress, AWSRegion, UserAgent, RequestParameters, ErrorMessage
| extend UserName = substring(UserIdentityPrincipalid, indexof_regex(UserIdentityPrincipalid, ":") + 1)
| extend Name = split(UserName,'@')[0],UpnSuffix = split(UserName,'@')[1] Field Validations
Loading…
Comments (0)
Loading comments...