Sample rules
AWS IAM AdministratorAccess Policy Attached to User
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to compromised user accounts. This rule looks for use of the IAM AttachUserPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachUserPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM AdministratorAccess Policy Attached to Group
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to user groups the compromised user account belongs to. This rule looks for use of the IAM AttachGroupPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user group.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachGroupPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
Sample rules
AWS IAM AdministratorAccess Policy Attached to User
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to compromised user accounts. This rule looks for use of the IAM AttachUserPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachUserPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM AdministratorAccess Policy Attached to Group
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to user groups the compromised user account belongs to. This rule looks for use of the IAM AttachGroupPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user group.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachGroupPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM AdministratorAccess Policy Attached to Role
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to compromised IAM roles. This rule looks for use of the IAM AttachRolePolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM role.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachRolePolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
Sample rules
AWS IAM AdministratorAccess Policy Attached to User
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to compromised user accounts. This rule looks for use of the IAM AttachUserPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachUserPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM AdministratorAccess Policy Attached to Group
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to user groups the compromised user account belongs to. This rule looks for use of the IAM AttachGroupPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user group.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachGroupPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
Sample rules
AWS IAM AdministratorAccess Policy Attached to User
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to compromised user accounts. This rule looks for use of the IAM AttachUserPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachUserPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM AdministratorAccess Policy Attached to Group
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to user groups the compromised user account belongs to. This rule looks for use of the IAM AttachGroupPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user group.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachGroupPolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM AdministratorAccess Policy Attached to Role
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to compromised IAM roles. This rule looks for use of the IAM AttachRolePolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM role.
Detection logic
iam where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "AttachRolePolicy"
and event.outcome == "success"
and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
AWS IAM User Created Access Keys For Another User
- source: elastic
- technicques:
- T1098
Description
An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by creating a
new set of credentials for an existing user. This rule looks for use of the IAM CreateAccessKey API operation to
create new programmatic access keys for another IAM user.
Detection logic
from logs-aws.cloudtrail-* metadata _id, _version, _index
| where event.dataset == "aws.cloudtrail"
and event.provider == "iam.amazonaws.com"
and event.action == "CreateAccessKey"
and event.outcome == "success"
and user.name != user.target.name
| keep
@timestamp,
cloud.account.id,
cloud.region,
event.provider,
event.action,
event.outcome,
event.dataset,
user.name,
source.address,
source.ip,
user.target.name,
user_agent.original,
aws.cloudtrail.request_parameters,
aws.cloudtrail.response_elements,
aws.cloudtrail.user_identity.arn,
aws.cloudtrail.user_identity.type,
aws.cloudtrail.user_identity.access_key_id,
source.geo.*