334 字
2 分钟
Using HackRF to Spoof GPS Signals

Environment: Windows 10 Any Win10 works; Linux shouldn’t be a problem either Regarding all the links in this article, there’s a combined download at the end — if you don’t mind the slow speed, you can download from there.

The principle of spoofing GPS signals#

There’s not much to say here — you simply use a stronger signal to overwrite the weak GPS signal.

Download HackRF_Tools#

This one is hard to find; you can only download it from Github and compile it yourself. My combined package includes these files.

Download gps-sdr-sim#

Github link

It’s recommended to download the Release, so you don’t have to compile it yourself, and it works directly on Windows.

When generating the simulation signal, RINEX ephemeris data is needed. The Release version of gps-sdr-sim already ships with a very old ephemeris (from 2014), so update it. RINEX ephemeris data download The 2020 in the address can be changed to your current year Scroll to the very bottom, download brdc2780.20n.Z, then extract it. (Note: you need ephemeris files ending in n) RINEX

Generate GPS simulation data#

./gps-sdr-sim -e brdc2780.20n -l 0,0,100 -b 8· Specify the ephemeris file and set the latitude/longitude; you must specify the sampling precision as 8. By default, only 300 seconds of simulation data is generated, because the generated file is too large and I’m afraid your disk can’t hold it lol.

Transmit the simulation data#

hackrf_transfer -t gpssim.bin -f 1575420000 -s 2600000 -a 1 -x 0 -t Specify the GPS data -f Specify the frequency as 1575420000, i.e. the civil GPS L1 band frequency. -s Specify the sample rate as 2.6Msps -a Enable antenna gain: 1=Enable, 0=Disable -x Specify the TX VGA (IF) gain, range 0-47dB (To limit the impact range, the maximum is 47 — use with caution, watch out for visits from the authorities)

Please avoid testing with a phone; use other GPS receivers. Because phones use multiple methods for positioning, such as base stations, Wi-Fi, and GPS. This kind of multi-source positioning is hard to interfere with.

HackRF homepage HackRF on Github

Resource bundle mentioned in this article

Using HackRF to Spoof GPS Signals
https://tski.uk/blog/en/hackrf/
作者
Tokisaki Galaxy
发布于
2020-10-04
许可协议
CC BY