Sigma rule: Malicious Usage Of IMDS Credentials Outside Of AWS Infrastructure
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-7a8575d0bebb, updated 2024-07-11T00:00:00.000Z.
Rule
- Title
- Malicious Usage Of IMDS Credentials Outside Of AWS Infrastructure
- Status
- test
- Level
- high
- Author
- jamesc-grafana
- Date
- 2024-07-11
- File
- rules/cloud/aws/cloudtrail/aws_cloudtrail_imds_malicious_usage.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects when an instance identity has taken an action that isn't inside SSM.
This can indicate that a compromised EC2 instance is being used as a pivot point.
Log source
- 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_*False positives (as the rule lists them)
- 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
Tags
- attack.privilege-escalation
- attack.initial-access
- attack.persistence
- attack.stealth
- attack.t1078
- attack.t1078.002
MITRE ATT&CK ids this rule names
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
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/cloud/aws/cloudtrail/aws_cloudtrail_imds_malicious_usage.yml
Sources and licences
SigmaHQ
"Malicious Usage Of IMDS Credentials Outside Of AWS Infrastructure" by jamesc-grafana (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/cloud/aws/cloudtrail/aws_cloudtrail_imds_malicious_usage.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Malicious Usage Of IMDS Credentials Outside Of AWS Infrastructure",
entity page, dataset version ref-7a8575d0bebb, updated 2024-07-11T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/352a918a-34d8-4882-8470-44830c507aa3 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 352a918a-34d8-4882-8470-44830c507aa3, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.