Hacker News new | ask | show | jobs
by ed25519FUUU 1456 days ago
You can set a permission that says “these credentials can only be used on an aws instance owned by this account”

Even if the creds are stolen they’d need access to an instance in your account to use them. Also you can be alerted if someone attempts to use them anywhere else.

2 comments

There are very few situations where it even makes sense to have static credentials on an AWS instance any more. "Ambient" short-lived credentials from the instance profile and assumed roles are much safer.
Exactly. My assumed roles last an hour and are protected by MFA.
In the article they claim the package is literally stealing the IAM role credentials from the EC2’s metadata URL. So it’s presumed that the code is already running on your EC2.

Of course, just because it takes the credentials doesn’t mean it does anything else with them, but it could have done anything.