News for hackers. Stuff that matters.
Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by freedomben on Saturday August 08, 2020 @11:10AM (#24092207)
I've seen this a ton. I have been an on/off security professional so academically I am committed to the principle of least privilege, but holy hell it can be painful or impossible in real life.

Where possible I've started adopting the "run it and see" or audit2allow approach (there are awesome tools that can do this for AWS IAM perms too), but then before applying the policy, somebody needs to put a quick line beside each permission that explains why. If the answer is "I don't know" and the permission is simple/low-risk then maybe let it go. If it's a high-risk permission then don't do it without answers.

That formula is the only pragmatic one I've seen. Not perfect but sometimes perfect is the enemy of good.

Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by tgsovlerkhgsel on Saturday August 08, 2020 @08:03PM (#24096246)
> Not perfect but sometimes perfect is the enemy of good.

This. Add enough hurdles, and people will

a) spend all the energy they're willing to spend on your process, hate it, and as a result never do anything except what you force them to, and in particular, never voluntarily reduce permissions unless forced (because they might need them later and then it'll be a pain). They'll also see you as an enemy, not a partner, which is not the place a security team should be in.

b) optimize for not what is best, but what is least affected by your wall of process, even if it's less secure (e.g. because it's a legacy system that you didn't get around to locking down yet).

c) outsource to less secure vendors, and get it approved because management knows that getting it deployed internally would take forever due to the process

d) in the most extreme case, set up uncontrolled shadow IT with zero security controls and hide it from you - and because they already spent all their energy dealing with "perfect", they don't want to hear the word "security" ever again, and the security posture of their shadow IT shows this.

Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by partyboat1586 on Sunday August 09, 2020 @04:41AM (#24098258)
Thank you for acknowledging this. I worked at a place like that and it put me off security to the point where I didn't want to ever deny any person or app or service permission to anything and was just happy with securing the edge nodes of our network. I got over it and now I'm in a position where my neck is on the line if there is a security breach I feel differently but I can still relate to myself back then and understand the need to be pragmatic and massage people into following the process rather than forcing them.
Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by devonkim on Saturday August 08, 2020 @12:46PM (#24093034)
Years ago I wrote a program to let various services run their course, query Cloudtrail for successful calls madero different AWS services, and attempt to find a minimal set of IAM permissions (not applicable for S3 at the time). The idea was to run an exhaustive test suite with expected allowed actions only and deny anything else. I believe AWS has a similar tool now for IAM but it’s not a problem that’ll be resolved satisfactorily for everyone given the combinatorics of IAM possible. Lateral movement in IAM roles and credentials is tough and even today not every action that IMO should be flagged is reported (IAM role assumption failures across accounts is silent when I checked early last year).
Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by kmcquade on Saturday August 08, 2020 @01:15PM (#24093268)
Did you open source it? If not, you definitely should.
Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by paulz_ on Saturday August 08, 2020 @03:39PM (#24094509)
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

Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by devonkim on Saturday August 08, 2020 @02:44PM (#24094052)
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.
Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by jsperx on Saturday August 08, 2020 @03:04PM (#24094178)
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.

Re:IAM is hard – Thoughts on $80M fine from the Capital One ... by mobjack on Saturday August 08, 2020 @12:58PM (#24093119)
The "I don't know" case is the most painful to ask for since it feels like I am always second guessed.

If I have the permission, I can tell its value in a few minutes but instead I have spend hours doing due diligence to try to justify my answer and still am not confident asking.

I usually end up getting what I need in the end so the admins don't see it as a big issue, but it is a subtle thing that can kills productivity for anything related to AWS for everyone else.