Hacker News new | past | comments | ask | show | jobs | submit | kmcquade's comments login

Depot is freaking awesome. Sped up two of our Docker image builds from 11 minutes to 1-1.5 minutes and the drop-in Docker build replacement in GitHub Actions was super easy. Can't imagine our CI/CD system without it.


Love using Depot. The speed improvements are insane


> the tool can discover incorrect configurations that would allow someone who extracted the key to change permissions of the bucket.

Nit: The tool can discover and abuse excessive permissions.


Yes, you'd have to leverage compromised credentials. That could be obtained via SSRF, RCE on a privileged box, leakage of user access keys, or other means. In the context of a penetration test, it's more of a post-exploitation tool.


Aw, thank you. I really appreciate that.


Great feedback! I will update the docs accordingly.


Not sure. I did uncover a ridiculously destructive approach to abusing Azure Service Principals in CI/CD pipelines that deploy infrastructure in Azure (Confused Deputy problem): https://kmcquade.com/2020/11/nuking-all-azure-resource-group...

for sub in `az account list | jq -r '.[].id'`; do \ for rg in `az group list --subscription $sub | jq -r '.[].name'`; do \ az group delete --name ${rg} --subscription $sub --no-wait --yes; \ done; done;


>I did uncover a ridiculously destructive approach to abusing Azure Service Principals in CI/CD pipelines that deploy infrastructure in Azure (Confused Deputy problem):

> for sub in `az account list | jq -r '.[].id'`; do \ for rg in `az group list --subscription $sub | jq -r '.[].name'`; do \ az group delete --name ${rg} --subscription $sub --no-wait --yes; \ done; done;

The CI provider giving you an over-privileged SP to play with needs to fix that, sure. SPs start with zero role assignments, so it's particularly egregious that they gave it unnecessary permissions.

(Though, for the CI providers I'm familiar with, you the user would be the one creating the SP and providing it to the pipeline. So making it over-privileged would be your mistake.)

But it's not a Confused Deputy problem when you have a service principal with delete access to all resource groups in all subscription and tell it delete those resource groups. Confused Deputy involves a higher-privileged server forgetting to downgrade its privileges on behalf of a low-prvivilege client. The SP is the client in this case - it was created with high privileges in the first place.


Dry run as default is a good idea. I'll open a GitHub issue for that.

FWIW, if you run `endgame smash` with `--service all`, then it spits out a huge "WARNING" in ASCII art with an explanation and a confirmation prompt.

But I agree, we should have dry-run on by default.


Yes please, thanks!!


Author here :) Endgame exploits/abuses features. If it was a bug, I'd work with AWS to solve the problem, but with abusing features - that would result in years of unsatisfied feature requests. This should push the issue along.

>...and it's not even a hacking tool! It can be used to backdoor resources to rogue accounts, so I'd say it's a hacking tool and can/should be used on penetration tests. I'd certainly use it on a pentest :)


404. Did they pull the repo or make it private?

https://github.com/salesforce/endgame


Here is one of many forks: https://github.com/agnivesh/endgame/



I'm impressed you were able to get your employer (Salesforce) to actually let you publish this under their organization. Kudos to that.


Salesforce also runs Heroku, which is one of the biggest AWS wrappers around. I'm really glad they're active in security auditing here, it's a real value add to customers of Heroku / Salesforce services to see evidence of their work to analyze security.


Yes, surprised also, given past stories around Defcon.

I think it's great to have audit tools like this. It makes people realize how vulnerable their accounts are.

Does a similar tool exist for Salesforce and Heroku?


Not sure what the shock is with seeing security tools like this released, the vast majority of security tools are open source, how is this different to what we have been seeing the past 30 year?

Not to mention companies such as Google, Netflix and Mozilla all release security tools just like this.


I guess they didn't.


That’s what I was expecting to happen, unfortunately.


Well, you know the saying about eggs and omelettes. I wish you luck with getting AWS to listen to you!


Thanks :)


Can you share the code somewhere else? It's been taken down from github



Bugs get patched. Features are protected, and sometimes simultaneously abused. Thank you!


So did you just put this out there or did you give AWS Security peeps a week or two notice?


This isn't exploiting a vulnerability. This requires authentication and uses AWS features. Why would they need to alert AWS?


you're an evil genius


Did you open source it? If not, you definitely should.


Someone has actually been working on a project like this. While not 100% complete it's the best working one I know of. Can definitely relate to the problem being described here, especially when writing IAM policies for terraform deployments.

https://github.com/flosell/trailscraper


Probably can’t be open sourced given IP under contracts but I could try to re-write it. There’s some new services in IAM that could be leveraged to make it more accurate and cheaper to use, too.


Thank you for putting this idea in my head! I’ve been trying to get better at expressing infrastructure as code, and one of the big blockers has been how adding new services to e.g. Terraform is tough when you don’t know all their permissions they need (see also https://github.com/hashicorp/terraform/issues/2834 for example).

Using a test AWS environment to stage and then checking CloudTrail to see what was actually called would be a step forward. Having software to extract it would be even better.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: