While I wouldn't publicly hand out my account IDs as a general practice, I think you have to expect that some of them will be disclosed at some point. As more third party vendors and SaaS platforms move away from IAM users and access keys to using role assumption as the preferred method of integration (as they should!), the account ID of at least the account you use as their integration point is now known by another…
This is what I’m curious to learn. What can an attacker do with an AWS account ID? How is that any different from knowing someone’s email address?
How to find the AWS account ID of any S3 bucket
181–190 of 227 posts
Re: How to find the AWS account ID of any S3 bucket
#182Earlier quoted context omitted.
That's the part that surprised me as well; it doesn't seem like a field that should be eligible for anything other than an exact match. I am unable to conceive of a use case for pattern matching account IDs.
If for some reason you’re dealing with thousands of accounts that are architecturally indistinguishable, bucketing them by ID prefix isn’t a particularly wild thing to want to do.
Either you bucket by an internal ID and give the user a hash, or you give the user an ID and bucket by your internal hash.
Users have no business knowing your sharding scheme.
Re: How to find the AWS account ID of any S3 bucket
#183Earlier quoted context omitted.
> the AWS policy execution has a number of “operators” and “operands” That is correct. The IAM condition language is flexible and does not prevent you from doing strange things.
It’s a consequence of weak typing choices - not an inevitable result of allowing flexibility. Doing glob matching on account IDs is like doing concatenation with guids, applying a bitshift to a UTF8 string, or running a regex on an integer. It is a nonsensical operation, and - as shown here - results in surprising security properties of the resulting system. Surprising security properties are an undesirable result in…
Re: How to find the AWS account ID of any S3 bucket
#184AWS account ID is not sensitive data in any way. Just because you can screw up a config doesnt make a user name or account id “sensitive”.
Its not more sensitive than an email address. What is wrong with you people? Where did you come from, and why are you so dumb?
Re: How to find the AWS account ID of any S3 bucket
#185How might this matter? A obvious one: Given a production bucket, it’s now possible to find development buckets for that same org, which is not expected behavior IMO.
You only need the bucket name to do that. You should include a randomly generated prefix/suffix in bucket names to prevent against such enumeration attempts. Another good idea (as well as, not instead of) is to expose objects in buckets publicly with a non-default host name, such that the bucket name isn’t leaked at all.
Re: How to find the AWS account ID of any S3 bucket
#186Earlier quoted context omitted.
If an organization considers it sensitive, that implies they’re putting some level of reliance on it being so. Otherwise there would be no point in considering it sensitive. There’s a difference between “making it easier for an attacker” and using it as a security control, even if it’s not the only security control. The point is that even if you don’t go around wearing a shirt with your address on it, that should nev…
It's hubris to think any security measures are completely safe. Painting a target is a bad idea.
Re: How to find the AWS account ID of any S3 bucket
#187Earlier quoted context omitted.
How is it possible for a user of AWS to keep the account ID secret if Amazon doesn't even consider it secret? If Amazon leaked your account ID they could point to their docs and say the account ID was never meant to be a secret, sensitive, or confidential.
You can walk over to the user's desk and ask them not to share it. Whether or not Amazon leaks it is unrelated to my employees' ability to follow instructions. There is a lot of data that exists in a space somewhere between "100% secret" and "100% public". This is one of those situations, for many organizations.
> This is one of those situations, for many organizations.
And those organizations are wrong.
Re: How to find the AWS account ID of any S3 bucket
#188Re: How to find the AWS account ID of any S3 bucket
#189Earlier quoted context omitted.
I think the GP is talking about granting access to a particular bucket to an unbounded number of customer AWS accounts — probably in requester-pays config. (Think: static data used by an Amazon Marketplace virtual appliance.)
Those wouldn't follow any particular partial pattern though would they?