AWS CloudTrail: Instance Profile Role Assumed Actions Outside SSM RegisterManagedInstance
Identifies CloudTrail activity from assumed-role instance identities when it is not part of SSM RegisterManagedInstance.
- Product
- aws
- Service
- cloudtrail
- Author
- jamesc-grafana (SigmaHQ), DRL 1.1
- Published
- 2024-07-11
- Updated
- 2026-07-31
ATT&CK techniques
Initial Access → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags CloudTrail events where an assumed role ARN for an EC2 instance identity performs an action, but the event is not the specific SSM RegisterManagedInstance operation originating from AWS Internal. Such activity can indicate misuse of IMDS-provided credentials from a compromised instance to interact with AWS services in unexpected ways. The detection relies on CloudTrail telemetry, matching assumed-role ARNs and filtering for the single allowed SSM registration pattern.
Reporting behind it
- docs.aws.amazon.comhttps://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-identity-roles.html
- ermetic.comhttps://ermetic.com/blog/aws/aws-ec2-imds-what-you-need-to-know/
- packetmischief.cahttps://www.packetmischief.ca/2023/07/31/amazon-ec2-credential-exfiltration-how-it-happens-and-how-to-mitigate-it/#lifting-credentials-from-imds-this-is-why-we-cant-have-nice-things
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/cloud/aws/cloudtrail/aws_cloudtrail_imds_malicious_usage.yml
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "AWS CloudTrail: Instance Profile Role Assumed Actions Outside SSM RegisterManagedInstance"
id: 86777e12-c3bb-4a7b-b654-6871de7a81e1
status: test
description: This rule flags CloudTrail events where an assumed role ARN for an EC2 instance identity performs an action, but the event is not the specific SSM RegisterManagedInstance operation originating from AWS Internal. Such activity can indicate misuse of IMDS-provided credentials from a compromised instance to interact with AWS services in unexpected ways. The detection relies on CloudTrail telemetry, matching assumed-role ARNs and filtering for the single allowed SSM registration pattern.
references:
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-identity-roles.html
- https://ermetic.com/blog/aws/aws-ec2-imds-what-you-need-to-know/
- https://www.packetmischief.ca/2023/07/31/amazon-ec2-credential-exfiltration-how-it-happens-and-how-to-mitigate-it/#lifting-credentials-from-imds-this-is-why-we-cant-have-nice-things
- https://github.com/SigmaHQ/sigma/blob/master/rules/cloud/aws/cloudtrail/aws_cloudtrail_imds_malicious_usage.yml
author: jamesc-grafana, Huntrule Team
date: 2024-07-11
tags:
- attack.privilege-escalation
- attack.initial-access
- attack.persistence
- attack.stealth
- attack.t1078
- attack.t1078.002
logsource:
product: aws
service: cloudtrail
detection:
selection:
userIdentity.arn|re: .+:assumed-role/aws:.+
filter_main_generic:
- eventSource: ssm.amazonaws.com
- eventName: RegisterManagedInstance
- sourceIPAddress: AWS Internal
condition: selection and not 1 of filter_main_*
falsepositives:
- A team has configured an EC2 instance to use instance profiles that grant the option for the EC2 instance to talk to other AWS Services
level: high
license: DRL-1.1
related:
- id: 352a918a-34d8-4882-8470-44830c507aa3
type: derived