News for hackers. Stuff that matters.
Re:Show HN: Anonymous messaging with a 1km radius by A1kmm on Thursday October 27, 2016 @07:54AM (#12804329)
If it is exactly 1 km you could triangulate to find someone's location.

A program to do that would do a bisection search along a line (faking coordinates for the location of the device) to find the point on the line where you transition to seeing the person's messages. Then, repeat along other two lines in different directions. Each transition point gives a circle of 1 km radius on which the person is present, and the one point shared by all three circles is their location.

This could be mitigated by rounding off coordinates to be coarse enough that it doesn't give their precise location before calculating the distance.

Re:Show HN: Anonymous messaging with a 1km radius by jamesfisher on Thursday October 27, 2016 @08:11AM (#12804398)
Tinder once had this exact problem. You could find users' exact locations via triangulation, since the API reported an exact distance from your location: http://blog.includesecurity.com/2014/02/how-i-was-able-to-tr...
Re:Show HN: Anonymous messaging with a 1km radius by badwolf on Thursday October 27, 2016 @10:15AM (#12805252)
Grindr as well, which due to the nature of that app could have had bad effects should someone with ill-intent take advantage. There were even a few apps in the Google Play store that would pinpoint other grindr users.
Re:Show HN: Anonymous messaging with a 1km radius by secfirstmd on Thursday October 27, 2016 @04:35PM (#12809758)
Yep, this is a big problem in the human rights space these days. When we train on apps with LGBT communities in the Middle East and Africa, we have to spend a lot of time on this issue.

More info: https://grindrmap.neocities.org/

Comparison amongst gay dating apps (from 2014) https://grindrmap.neocities.org/overview.html

Re:Show HN: Anonymous messaging with a 1km radius by fucking_tragedy on Thursday October 27, 2016 @10:43AM (#12805451)
This is trilateration, not triangulation. Triangulation works if you know the angles, trilateration works if you know the distances and uses circles.

Source: I've done this before and it is very accurate and creepy.

> This could be mitigated by rounding off coordinates to be coarse enough that it doesn't give their precise location before calculating the distance.

Reporting a slightly different location to users or varying the search radius per user search could help.

Re:Show HN: Anonymous messaging with a 1km radius by bradbeattie on Thursday October 27, 2016 @10:55AM (#12805574)
Could this be defeated by a "snap to grid" technique? The installed client takes the actual location of the user and locates the nearest grid point (the resolution of which is up for debate) and reports as at that location?
Re:Show HN: Anonymous messaging with a 1km radius by 7952 on Thursday October 27, 2016 @11:38AM (#12805986)
Or increase the radius randomly after a pair of users have communicated for the first time.
Re:Show HN: Anonymous messaging with a 1km radius by qq66 on Thursday October 27, 2016 @06:10PM (#12810752)
That's not sufficient because a hostile actor could have three phones with three accounts.
Re:Show HN: Anonymous messaging with a 1km radius by theveloped on Thursday October 27, 2016 @09:40AM (#12805013)
Due to the fact that distance matching is done server side the application doesn't have any knowledge with regard to distance. The only knowledge one has is whether or not one receives messages from an other user.

Using triangulation to pinpoint an other users location would therefore require to move in and out of range (while the targeted user is continuously sending messages). Thus significantly more difficult than if the actual distance measure was depicted in the UI or leaked elsewhere.

Finally closing the API to outside requests limits the ease with which the above could be automated. Any idea's for further improving these security measures are most welcome!

Re:Show HN: Anonymous messaging with a 1km radius by pavel_lishin on Thursday October 27, 2016 @10:21AM (#12805291)
> Using triangulation to pinpoint an other users location would therefore require to move in and out of range (while the targeted user is continuously sending messages).

Or spoofing their actual location.

Re:Show HN: Anonymous messaging with a 1km radius by mseebach on Thursday October 27, 2016 @09:51AM (#12805075)
> would therefore require to move in and out of range (while the targeted user is continuously sending messages).

That, or a number of co-operating clients located at various locations in and out of the range.

A simple fix would be to have every sender generate a random vector of random length 0-100 meters (and re-generate every time you've moved at least 100 meters, you don't want to regenerate if the sender doesn't move as you'd be able to zero-in on a prolific sender), and have the message "originate" from the end of that vector.

Re:Show HN: Anonymous messaging with a 1km radius by tghw on Thursday October 27, 2016 @10:53AM (#12805541)
How exactly do you close the API to outside requests? It's not hard to reverse engineer most APIs, either by decompiling the app or just watching the wire.
Re:Show HN: Anonymous messaging with a 1km radius by tokenizerrr on Thursday October 27, 2016 @02:11PM (#12807691)
You don't. That is impossible.
Re:Show HN: Anonymous messaging with a 1km radius by bo1024 on Thursday October 27, 2016 @04:04PM (#12809344)
I can't tell how it works from the site, but a good approach is to randomize the distance threshold a bit each time. For example: if users are within 1km, always connect; if more than 2km apart, never connect; 1.xkm apart, connect with probability x.

That kind of thing combined with some rate limits (how often one can attempt to connect to a user) should be effective.

(edit) Actually, I think I like mseebach's suggestion even more: For each user, pick a random location about 100m away from them, then pretend they're there until they've moved far enough away, then repeat.

Re:Show HN: Anonymous messaging with a 1km radius by rawnlq on Friday October 28, 2016 @02:04AM (#12813489)
I am not sure if your original solution will actually work.

For example an attacker can just spoof enough accounts to sample from your distribution to figure out the true center. Imagine spoofing a grid of users with let's say K fake accounts per dot, then if you plot the histogram of who managed to connect you will see a very clear bump in the 2d histogram in the shape of circle.

The solution in your edit is much better.

Re:Show HN: Anonymous messaging with a 1km radius by civilian on Thursday October 27, 2016 @04:52PM (#12809978)
Heh, it's like salting their location.
Re:Show HN: Anonymous messaging with a 1km radius by yarou on Thursday October 27, 2016 @06:37PM (#12810967)
Believe it or not, but this is exactly what the Chinese government mandates. It's known as China shifting[0], and can cause quite a lot of headaches.

[0] https://en.m.wikipedia.org/wiki/Restrictions_on_geographic_d...

Re:Show HN: Anonymous messaging with a 1km radius by bo1024 on Friday October 28, 2016 @12:38AM (#12813134)
I'm thinking of ideas like [differential privacy](https://en.wikipedia.org/wiki/Differential_privacy).
Re:Show HN: Anonymous messaging with a 1km radius by Too on Thursday October 27, 2016 @01:11PM (#12806993)
There are many solutions to this, some already listed. For best effect apply all of them together: Rate limiting api requests and movement, hysteresis on distance, randomness on distance, snap to grid, increasing randomness the more you seem to be trilaterating, etc.

Some of thrm will also solve the problem of just discovering a user, starting a chat and then instantly loosing them, even though you were both siting still, as you were on the border.

Re:Show HN: Anonymous messaging with a 1km radius by debt on Thursday October 27, 2016 @03:16PM (#12808687)
I don't understand the anonymous angle. Why does everything have to be anonymous now? Like, you know if it uses the internet or touches a switch/router/server etc outside of your own home at any point that it's certainly, most definitely NOT anonymous at this point.

Anonymous has become a pointless buzzword in this NSA-era we be living in. Just say it's a hyper-local instant messaging app, because any half woke individual will know that nothing on the internet is anonymous really anymore. A percentage of all our internet activity is sitting on a rack somewhere in the Utah desert.

Get over it.

Re:Show HN: Anonymous messaging with a 1km radius by ItsDeathball on Thursday October 27, 2016 @04:04PM (#12809357)
There is a difference between the NSA being able to trace your identity vs. a profit-driven corporation being able to connect your identity to your online speech, location, and contacts. The first is governed by due process and need-to-know, the second is essentially public knowledge if the ad-tech revenue is sufficiently tempting.

Even in a pseudonymous environment where the venue operator presumably knows who you are (like HN), the assumption that other users cannot easily trace your words to your IRL identity reduces friction in communication. Environments where everyone publicly posts under their real identity, with those posts retained forever, tend towards low-information social signaling.

Re:Show HN: Anonymous messaging with a 1km radius by brokenmachine on Thursday October 27, 2016 @07:03PM (#12811214)
> NSA -- due process and need-to-know

Lol. Have you read the news in the last 30 years?

I do agree somewhat with your point though.

Re:Show HN: Anonymous messaging with a 1km radius by grenoire on Thursday October 27, 2016 @09:15AM (#12804815)
Doesn't look like the application shows the distance in the UI. As long as they don't leak it in the packets (hopefully they don't given how they claim anonymity) triangulation would require the target to be sending messages continuously on a consistent interval for you to detect whether or not they are at the 1 kilometre 'border.'
Re:Show HN: Anonymous messaging with a 1km radius by trolor on Thursday October 27, 2016 @09:33AM (#12804966)
... why not just fake your phone's GPS coordinates and perform a binary search?
Re:Show HN: Anonymous messaging with a 1km radius by Faaak on Thursday October 27, 2016 @11:35AM (#12805972)
Well, they could make it harder by relaying messages to people 1km+rand() around you