common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
956 stars 90 forks source link

Security Vulnerability - Lateral Movement #609

Closed jon-spaeth closed 4 months ago

jon-spaeth commented 4 months ago

I'm getting flagged by our security team for using this tool with the following issue:

image

I assume this is coming from the assume -c command used to open the console.

chrnorm commented 4 months ago

Hey Jon, do you know what tool generated this report? Also, could you share an example profile that you’re using with Granted? (please redact any sensitive info like account IDs etc)

jon-spaeth commented 4 months ago

I believe the tool they are using is called Artic Wolf

My profile config is just region us-west-1 and output type json and my credentials look like this

Screenshot February 13 2024 16:47:05

chrnorm commented 4 months ago

Thanks Jon. Unfortunately the sts:GetFederationToken is what drives the core functionality of assume -c :(

This is of course a false positive from the scanning tool (as you are using the credentials for legitimate purposes and aren’t an attacker!). I can appreciate though the alerts may be a cause of frustration for your security team, and because of this, a frustration for you.

The API that we are using are legitimate AWS APIs and aren’t anything inherently malicious. You can find the AWS documentation for the process here. Our specific implementation of this can be found here.

Some ideas as to how we could solve this (some of these require changes to IAM roles in your account, so depending on who owns these you may be out of luck unfortunately):

and then run assume -c example. From the wording of the alert it appears as though assuming a role first would cause the alert not to fire. I note though that this approach isn’t doing anything meaningfully different from a security perspective.

Overall sorry to hear Granted is causing some pain and I hope I’ve shed some light onto the internals and some possibilities here.

I’m going to close this issue for now but you are most welcome to re-open it if you have any additional questions on any parts of my response.

jon-spaeth commented 4 months ago

Thanks for the detailed response @chrnorm. I'll bring it up with the security team. Still love the product, hoping to get this resolved so I can keep using it 🤞