News for hackers. Stuff that matters.
Re:Teenager facing prison for downloading unsecured files fr... by Someone1234 on Monday April 16, 2018 @06:35PM (#16853492)
Many UUIDs aren't secure either and can be trivially enumerated. A better approach might be a long number generated using a secure random number generator and converted to a BASE-64 string.
Re:Teenager facing prison for downloading unsecured files fr... by goshx on Monday April 16, 2018 @06:53PM (#16853652)
If things should be secure, they should be behind authentication and authorization for that content. To argue about what is the best ID to be used is just trying to fix what is not broken, IMHO.
Re:Teenager facing prison for downloading unsecured files fr... by quickthrower2 on Monday April 16, 2018 @07:40PM (#16854016)
Security is multi layered.
Re:Teenager facing prison for downloading unsecured files fr... by scrumption on Monday April 16, 2018 @08:19PM (#16854268)
Obscurity is not a security layer.
Re:Teenager facing prison for downloading unsecured files fr... by rurounijones on Monday April 16, 2018 @09:58PM (#16854786)
Obscurity is a perfectly fine security layer as you said yourself (i.e. it is one of many layers).

Relying ONLY on obscurity is a failure.

Re:Teenager facing prison for downloading unsecured files fr... by Someone1234 on Monday April 16, 2018 @08:50PM (#16854435)
So a password or private encryption key isn't security?
Re:Teenager facing prison for downloading unsecured files fr... by pluma on Tuesday April 17, 2018 @04:13AM (#16856453)
What is a UUID if not a fairly predictable object-based shared authorization token?

EDIT: I'm mostly kidding.

Re:Teenager facing prison for downloading unsecured files fr... by quickthrower2 on Tuesday April 17, 2018 @05:17AM (#16856702)
Just call it an object-specific API key, that forms part of the URI instead of being a header value. Since we are using https it's all good.
Re:Teenager facing prison for downloading unsecured files fr... by thisacctforreal on Monday April 16, 2018 @06:48PM (#16853598)
I think a cryptographic hash is fine.

If you know the hash, you likely already know the file.

Re:Teenager facing prison for downloading unsecured files fr... by Someone1234 on Monday April 16, 2018 @08:51PM (#16854439)
A cryptographic hash of what?

Cryptographic hashes aren't random by nature.

Re:Teenager facing prison for downloading unsecured files fr... by thisacctforreal on Monday April 16, 2018 @08:54PM (#16854457)
The document, from what I could glean they were PDFs.

Edit: even if they aren't PDFs, you can feed the content to the hash function.

Re:Teenager facing prison for downloading unsecured files fr... by Someone1234 on Monday April 16, 2018 @08:58PM (#16854481)
I suppose that might work but seems needlessly complex compared to just a long securely generated random number.
Re:Teenager facing prison for downloading unsecured files fr... by evincarofautumn on Tuesday April 17, 2018 @06:28AM (#16857036)
Yeah, randomly generated IDs are fine for most use cases IMO, and perhaps more importantly they’re easy to implement well enough—grabbing 256 bits from /dev/urandom isn’t bad.

With a hash it’s more expensive to compute the ID, but you get advantages such as content-addressability, data integrity without trust, and easily mergeable databases. It’s a good amount of bang for not much more buck.

At the cost of leaking more metadata in the ID, by including a checksum/namespace, you can recognise a valid ID or determine the type of object it refers to without fetching anything from storage, mitigating some DOS attacks.

IDs are a subtle thing, and in my experience, often overlooked as a design issue. A lot of times it ends up as something like “id integer primary key autoincrement” without any thought.

Re:Teenager facing prison for downloading unsecured files fr... by larkeith on Monday April 16, 2018 @06:45PM (#16853583)
A better approach would be to not put private data in the public domain.
Re:Teenager facing prison for downloading unsecured files fr... by Wald76 on Monday April 16, 2018 @06:41PM (#16853533)
Generally you generate a random UUID which is quite difficult to enumerate.
Re:Teenager facing prison for downloading unsecured files fr... by gruez on Monday April 16, 2018 @07:31PM (#16853949)
>Many UUIDs aren't secure either and can be trivially enumerated.

uuidv4

Re:Teenager facing prison for downloading unsecured files fr... by kbar13 on Monday April 16, 2018 @06:42PM (#16853549)
uuidv4 is random assuming your rng source is random
Re:Teenager facing prison for downloading unsecured files fr... by Someone1234 on Monday April 16, 2018 @08:57PM (#16854475)
And assuming you're legitimately getting a UUIDv4 instead of a UUIDv1 or UUIDv2 now and forever...