Lurker News
Hi everyone!

Shortly after publishing my iOS 4 jailbreak last October[1], I got to work on my next hobby project: a from-scratch homebrew GPS receiver, which can solve the user’s location solely from billions of radio antenna samples.
I took a commodity SDR (alongside the Python standard library and numpy) and built a signal processing pipeline that can detect and track GPS satellites over many minutes, drop and pick up satellites as they come in and out of view, and precisely determine the user’s position and clock inaccuracy.
All told, gypsum can go from a cold start to a fix on the user’s position, and the precise time, in less than a minute of listening to the antenna. I went on a journey of learning how to detect and track satellite signals that are literally too quiet to hear, and I hope that some of the magic comes through in the posts!
After implementing this myself and walking the long road of getting it working, I’m left completely stunned by the brilliance of GPS, across so many axes. I hope you enjoy the read!
On a more personal note, I’ll be starting a new job next week which isn’t as amenable to publishing side projects, and therefore this will be my last publicly-published project for some time. I’ve had great experiences making and sharing projects on here, and I’m really grateful for the positive feedback that’s been shared!
[1]: https://news.ycombinator.com/item?id=37736318

Comments (128) 33 threads

Earlier comments
darkhorn5 replies#
Is it possible to trick phones with a jammer in a large area to make it look like all phones are in a specific point on Earth. Only with a jammer?
codyd512 replies#
GPS jamming or spoofing on a wide scale is definitely a viable attack! As another commenter noted well, making everyone appear at exactly the same location would be nigh-impossible, though.

GPS receivers will look for the 'strongest' PRN signal in the noise, so broadcasting louder than the (incredibly weak!) C/A signal is a valid way to jam or spoof GPS. It is, however, generally illegal for civilians.
GPS receivers operating with good practice do tend to try to mitigate this sort of attack, by (for example) ignoring signals with a too-high power level. It's a bit of a cat and mouse game, and there are academic papers exploring each side.
Lastly, GPS receivers also need to deal with interference from GPS itself! If GPS signals bounce off surfaces before reaching the receiver, the receiver might see two sets of GPS signals: one that arrived directly, and one that was scattered off a surface and arrives a bit later. This is called ‘multipath interference’, and part of what goes into making GPS receivers work well is mitigating multipath interference.

pictureofabear#
Just to be a little clearer, jamming and spoofing are the not the same thing. Jamming obfuscates a signal, usually through noise. Spoofing impersonates the signal.
error503#
> making everyone appear at exactly the same location would be nigh-impossible, though.

I don't think this is actually the case. In a spoofing scenario, all of the rogue signals would typically be generated by a single terrestrial station. The time of flight of all of the generated signals will be the same, so all that matters is the position solution reflected in the transmitted signals, as the fundamental principle of GPS based on TOF is no longer in play. So I'd think that in a typical spoofing scenario, all receivers thinking they're in more or less an identical location is what you'd expect.
It might be possible in a borderline case for the receiver to receive some spoofed signals and some real signals simultaneously, in which case you'd expect weird results, but I think you'd definitely see a correlation around the position being broadcast by the spoofer.

Rebelgecko1 reply#
Regular jamming just degrades the signal quality.

You can blast out fake data, but depending on what you mean by "large area" and a "point", I don't think what youre suggesting is possible. To trick GPS receivers you end up broadcasting fake signals from multiple GPS satellites, so receivers in different areas will be processing it differently and come up with different coordinates.

Rebelgecko1 reply#
I'm having a hard time telling from the article - are the ships' GPSes actually reporting that they're at the airport? Or is the disconnect happening somewhere between GPS and AIS (eg they're intentionally transmitting bad location data- it's been common-ish in the past for ships to do this when doing something naughty (blockade running or illegal fishing) and given what's going on in the region I can see the value of keeping your location obscure for safety

Continue this thread — 1 reply

error503#
No, the fact that all of these ships show the same false location strongly suggests that they are being spoofed from a single terrestrial source; this effect is not practical to achieve by modifying the signals transmitted by the satellites, even if the US wanted to for some reason.

There's a report on very similar jamming happening during the Syria conflict that will hopefully be enlightening as the methods and actors are presumably similar https://c4ads.org/wp-content/uploads/2022/05/AboveUsOnlyStar...

pictureofabear#
You are talking about spoofing, not jamming.[1]

This may be theoretically possible but is, in reality, practically impossible.
Embedded within the GPS signal is the ephemeris data which, among other things, includes each satellite's location in space.
Receivers calculate position by calculating the difference between the time a signal was received and the time stamp encoded in the signal itself.
By analyzing the signals from a minimum of four satellites (one for each dimension in time and space), a receiver calculates where it is.
To spoof all phones on Earth, you would need to trick each receiver individually. Since receivers are passive, they don't identify themselves, and there would be no way to target each individual receiver, making them think they're somewhere they're not.
1. Jamming is obfuscating a signal, usually by creating a lot of noise that makes the real signal hard to find. Spoofing is impersonating a signal.

kube-system1 reply#
It’s not really that simple. Most phones these days do not rely solely on GPS for location data. Many use a combination of WiFi, Bluetooth, dead reckoning, GPS, Galileo, GLONASS, QZSS, and BeiDou.

Even if a couple of these signals are degraded, wrong, or missing, most phones will come up with a relatively accurate location using the remaining data.

seba_dos1#
Also cellular towers.
emehrkay1 reply#
Does anyone know how the data a stored, where at, what tech etc? I can only assume that the retention policies are in decades
martinky24#
What data do you mean...?
kaitocross1 reply#
Does it only support the US-made GPS (NAVSTAR GPS) or other GNSS systems like Galileo as well?
codyd51#
This project only supports the 'legacy' C/A variant of the NAVSTAR constellation's signals.
noman-land#
Really amazing piece of work. I look forward to digging into it. Thanks for sharing.

Load more comments