Join our Newsletter — 33% off our NHI Course

Did startup configuration let EC2 and SageMaker reach execution roles?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20217
Topic starter  

TL;DR: The ability to alter startup-time configuration lets an attacker reach execution-role privileges, according to Plerion, because the permission check happens before the later code runs. Cloud compute controls need to treat boot scripts and lifecycle hooks as privileged execution paths, not ordinary settings.

Editorial analysis by NHI Mgmt Group, based on content published by Plerion: “Privilege escalation with SageMaker and there's more hiding in execution roles”.

Key questions

Q: Why do startup scripts create privilege escalation risk in cloud workloads?

A: Startup scripts create privilege escalation risk because they run automatically at boot or instance launch, often before normal monitoring and hardening controls are fully active.

Q: How does cloud workload identity differ from human admin access?

A: Cloud workload identity is a machine identity used by an application, service, or workload to authenticate to other systems without a human logging in.

Q: How do I detect instance-profile abuse through startup configuration changes?

A: Look for stop, modify, and start activity on the same compute resource, especially when the modifying identity normally does not manage that asset.

Practitioner guidance

  • Separate role binding from startup mutation permissions Limit who can stop instances, attach lifecycle configs, or modify startup settings on workloads that run with sensitive execution roles.
  • Monitor stop-modify-start sequences as privilege escalation indicators Alert on CloudTrail patterns where an identity changes boot-time configuration and then restarts the same resource, especially outside normal admin roles.
  • Treat user data and lifecycle hooks as code execution surfaces Require review and approval for any change that can execute on boot, including notebook lifecycle configs, instance user data, and similar startup hooks.

Bottom line: The core issue is a lifecycle gap where an attacker can modify startup behaviour after role approval and still inherit trusted execution.

Glossary terms: Execution Role, Lifecycle Configuration, CloudTrail, PassRole Permission

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 20707
 

Cloud privilege escalation becomes a lifecycle problem, not just an access-control problem. The important failure mode is the gap between configuration approval and later execution, because that gap lets an attacker change what a trusted resource will do after the permission check has already passed. In practical terms, the sensitive object is not only the role assignment but the startup path that can activate it. Teams should treat those configuration surfaces as part of privileged access governance.

A few things that frame the scale:

A question worth separating out:

Q: What should teams do first when a cloud execution role is exposed?

A: First, disable or rotate the exposed execution role credentials and identify every workload or process that could still use them. Then review the role policy, attached secrets, and recent API activity for signs of runtime mutation such as injected commands, modified startup paths, or new persistence mechanisms. Contain the affected instance, reissue credentials, and validate that no unintended privilege paths remain.

👉 Read our full editorial: Startup configuration can trigger code execution in cloud roles



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.