Add An Existing Role To A New Ec2 Instance (aws)
Platform | Author | Last Update |
---|---|---|
aws | Nick Jones | 2024-12-02 |
An adversary may attach an existing role to a new EC2 instance to which they have access
MITRE IDs
Required Permissions
- iam:PassRole
- ec2:RunInstances
Required Parameters
Name | Type | Description | Example Value |
---|---|---|---|
image_id | str | AMI to create instance from | ami-a4dc46db |
instance_type | str | Type of instance to create | t2.micro |
iam_instance_profile_name | str | EC2 instance profile to assign | ec2-instance-profile |
key_name | str | Name of SSH key to assign to instance | my-ssh-key |
security_group_id | str | ID of a security group to apply to the instance | sg-123456 |
Attacker Action
Detection Case
ELK query
When logs are ingested into ELK, the following Lucene query can be used to identify relevant events.