News for hackers. Stuff that matters.
Re:Google Safe Browsing is blocking small Mastodon servers by olliej on Wednesday November 09, 2022 @01:41AM (#33528202)
Ok, so it sounds like you misunderstand how the Safe Browsing system works.

If you want to be a provider of url blocking you do the following:

    1. Compile a list of "unsafe" urls (malware, phishing, cookie clicker, etc)
    2. Generate a SHA256 hash of every url in (1)
    3. Truncate those hashes to 32 bits (Because there are a lot of them :( )
    4. Publish that list
If you're writing a client that wants to use these providers you do this:

    1. Download the list published above
    2. Before you load a url calculate a SHA256 hash of that url
    3. Truncate that hash to 32 bits
    4. Check your giant list of hashes to see if there's a collision.
    5. If there is no collision you're done, and carry on the load as usual; otherwise
    6. Ask the source of step 1 to give you the full set of hashes corresponding to the prefix from (3)
    7. See if the hash from (2) is in the full hashes you get in (6).
    8. If there is no collision then load the url, otherwise display scary warnings.

You can see that at no point does the url being checked go in either direction.
Re:Google Safe Browsing is blocking small Mastodon servers by amatecha on Wednesday November 09, 2022 @01:45AM (#33528227)
Oh, no, I didn't even look into it. I only just tonight read the docs about these features in Chrome & Firefox for the first time. I see "modern-day NetNanny" and turn it off. I quite literally assume the worst and disable it.
Re:Google Safe Browsing is blocking small Mastodon servers by piaste on Wednesday November 09, 2022 @03:24AM (#33528741)
> 3. Truncate those hashes to 32 bits (Because there are a lot of them :( )

Is it worth all this trouble just to get a Nx space saving?

Because if you just published the 256-bit hashes directly, you could skip the following steps entirely:

> 6. Ask the source of step 1 to give you the full set of hashes corresponding to the prefix from (3) > 7. See if the hash from (2) is in the full hashes you get in (6).

which are the parts that require an actual network call, infrastructure costs, and privacy issues. Speaking of which:

> You can see that at no point does the url being checked go in either direction.

You're not sending the whole URL, but in step (6) you're still telling the source that you're visiting a website belonging to a particular subset of hashes, hashes which the source knows the plaintext of.

I guess the question is exactly how large the set of 'unsafe' urls is. If it's merely in the billions, then (a) truncating the hashes will only get you a roughly ~4x space saving and (b) the 32-bit hashes you send will almost uniquely identify the website you tried to visit. If it's in the trillions, then it makes more sense.

Re:Google Safe Browsing is blocking small Mastodon servers by sneak on Wednesday November 09, 2022 @04:00AM (#33528926)
This list needs to be redownloaded multiple times daily by a billion or so devices.
Re:Google Safe Browsing is blocking small Mastodon servers by kccqzy on Wednesday November 09, 2022 @05:01PM (#33538577)
A billion is about half an order of magnitude off. The official homepage says five billion.

https://safebrowsing.google.com/

Re:Google Safe Browsing is blocking small Mastodon servers by sneak on Wednesday November 09, 2022 @07:12PM (#33540229)
It's terrifying that a small change at a single URL controlled by a single national government can censor content on five billion machines.

Is there anything else on the entire internet so centralized?

Re:Google Safe Browsing is blocking small Mastodon servers by kccqzy on Wednesday November 09, 2022 @07:50PM (#33540618)
The root DNS, or DNS for "com"
Re:Google Safe Browsing is blocking small Mastodon servers by im3w1l on Wednesday November 09, 2022 @04:04AM (#33528959)
> 6. Ask the source of step 1 to give you the full set of hashes corresponding to the prefix from (3)

This is quite similar to sending the url. Like there might only be a single site with that hash. Or there might be a handful of which one is far more likely than the others because it has 1000x their dau.

Re:Google Safe Browsing is blocking small Mastodon servers by olliej on Wednesday November 09, 2022 @05:49AM (#33529696)
The goal is to avoid leaking the url you actually loaded. In principle you could make a hash of every url and work back from there, but if you’re Google you already have much more effective ways of tracking what sites someone is visiting, that are “acceptable”, if Google or some other vendor were discovered to be attempting that I suspect there would be fairly substantial and immediate blowback.

There are obviously ways that you could improve the privacy aspects of this - you could have two versions of the database hashing urls with slightly different initial conditions. A client can keep one up to date and only fetch the other when the get a collision. Assuming SHA256 is pretty good then we can just multiply the false positive probabilities (I think?).

And alternative would be for the client to request multiple regions at a time.

Re:Google Safe Browsing is blocking small Mastodon servers by Tozen on Wednesday November 09, 2022 @09:01AM (#33531704)
If you login into a Google account (Gmail, YouTube, Blogger, Google drive, etc...) and have not adjusted your personal preferences (which even then may not mean much), they are tracking every place you go and more. The amount of information they are collecting on people is astounding. To include they will lock people out of their accounts, for whatever, and keep the information as long as they want or hand it over to whoever 3rd parties that they please.