News for hackers. Stuff that matters.
Re:The Web Began Dying in 2014 (2017) by pythux on Sunday November 24, 2019 @01:05PM (#21622109)
Great point! We wrote about how we're doing it on whotracks.me a while ago, if anyone is wondering how that could work: https://whotracks.me/blog/private_analytics.html
Re:The Web Began Dying in 2014 (2017) by marcus_holmes on Sunday November 24, 2019 @04:24PM (#21623526)
this is useful, thanks... couple questions:

1. Do you grab the country from the IP address before anonymising it? (I know VPN's are a thing, but we would like to know where our customers are coming from)

2. Why encrypt with a daily key instead of just hashing the IP address and storing the hash? Do you ever decrypt the IP address?

3. How have you found CloudWatch? I'm logging all requests to our own database, because it's so simple to do. What's the bonus for Cloudwatch?

Re:The Web Began Dying in 2014 (2017) by kkm on Sunday November 24, 2019 @05:14PM (#21623813)
Hi Marcus,

Thank you for your questions.

Disclaimer: I also work on WTM from time to time, so I hope can answer these questions to some degree :)

1. WhoTracksMe is served via CloudFront, it only get's the IP that CF reports. To get the country, there are two ways that can be used. IP => Country mapping via a Database or additionally, because CF has multiple edge locations, if needed the you could see which edge location served the request, that will help you narrow down the location at a country level. Ofcourse, in both cases if the user is using VPN, you would only records the VPN location.

2. The problem we want to avoid is same IP with same hashing algorithm will produce same value. Which can then be used to co-relate user activity across days. Second, depending on what hashing scheme one is using, rainbow tables can be used to get back the original value. Therefore, to avoid, we used the approach of daily key. Now that I write, we could also use some hash + daily_salt. This should give the same guarantees. - Needs to be checked.

3. In this setup we are not using Cloudwatch but Cloudfront, which is the CDN provider from AWS.

Re:The Web Began Dying in 2014 (2017) by marcus_holmes on Sunday November 24, 2019 @05:27PM (#21623897)
1. Ah, OK, that's useful. I was thinking that dropping the last byte of the IP address would still be able to give us the country via database lookup, but anonymise enough. But getting it via CF (or similar) would be a good alternative.

2. Chances of a hash collision on IP address is pretty small (i.e. statistically insignificant). But adding a daily salt would decrease the odds, for sure.

3. Sorry, my bad, I meant Cloudfront, but it's Sunday night here and there has been wine ;) Same question: how has Cloud{{thing}} worked out for you? Is it worth the extra complexity?

Re:The Web Began Dying in 2014 (2017) by FabHK on Sunday November 24, 2019 @06:35PM (#21624280)
> 2. Chances of a hash collision on IP address is pretty small (i.e. statistically insignificant)

The problem, as I understand GP, is not so much the fear that two different IPs might collide. The problem is that seeing the same hash, you know that it refers to the same IP, and as such you can correlate users/sites over time (a privacy invasion).

Re:The Web Began Dying in 2014 (2017) by marcus_holmes on Monday November 25, 2019 @05:41AM (#21626921)
That makes sense, kinda. Though I'm a little unsure why correlating http requests over an hour is not invading privacy, but doing the same over a week is?