barbeau / gpstest

The #1 open-source Android GNSS/GPS test program
Apache License 2.0
1.63k stars 355 forks source link

Add GNSS spoofing & jamming detection feature #231

Open barbeau opened 5 years ago

barbeau commented 5 years ago

Summary:

As spoofing GNSS signals becomes an increasing area of concern, I’d like to add a new features to GPSTest that includes various metrics that may give some indication that a GNSS signal is being spoofed. This will be implemented by comparing GNSS data attributes against other source of data that provide similar attributes.

Possible names for new feature/fragment in navigation drawer (other proposals welcome):

I’m leaning towards “Health” "Integrity" because given my past experience with sensor data quality on Android, I’m expecting that there will be a reasonable number of devices that have questionable sensor data, and as a result we don’t want to definitively say that a GNSS signal is spoofed (unless we have very high confidence that this is the case).

Ceccato et al has a good description of some of the possible mitigations against spoofing that can be implemented at the application level in this 2018 ION GNSS+ paper, which also shows how existing Android and iOS devices are currently vulnerable to spoofing time and position without giving any warning to the user.

EDIT 2024 - more references to detecting spoofing, from #667

"Detecting GNSS Jamming and Spoofing on Android Devices" DOI: https://doi.org/10.33012/navi.537 https://navi.ion.org/content/69/3/navi.537

"Improving GNSS Spoofing Awareness in Smartphones via Statistical Processing of Raw Measurements" DOI: 10.1109/OJCOMS.2023.3260905 https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=10081330

Here are the various features we could implement and show in a new fragment. Most of them involve comparing the computed GNSS location or received GNSS data against other sources to see if they align within a reasonable degree.

We could compare...

[Location.getTime()](https://developer.android.com/reference/android/location/Location.html#getTime()) to:

Cc’ing @caparrag, one of the co-authors on the paper, to see if he has any more comments or wants to contribute :)

Steps to reproduce:

Look for method to determine health of GNSS signal, compared to data from other sources (e.g., device sensors)

Expected behavior:

Give me such a feature

Observed behavior:

No such feature exists

goldfndr commented 5 years ago

If the scope of this feature/fragment is limited/confined to spoofing then I suggest a name of "Spoof check" or "Spoofing diagnosis" or "Spoofed?" or similar. I think it'd be preferable to encourage use of the conventional terminology.

ndoggac commented 5 years ago

Would recommend against using the term "health", as it may be misconstrued as GNSS broadcast satellite health (ie. almanac/ephemeris health bits).

This a fairly lofty goal. It's pretty cool, but it's going to be pretty difficult with uncertain returns. I think section 3 in the paper lays out the options nearly in order of difficulty from least to most.

3-A would be relatively easy to implement, log position every 'n' seconds and sanity check the diff from previous position.

3-B you could utilize cellular time, or ntp time via internet compared to time calculated from your GNSS solution. For position you could perform an independent position estimate using OTDOA and make sure your GNSS position is within a certain vicinity of the independent position calculation. Not sure if OTDOA is available in the Android API though, and it has errors on the order of several hundred meters.

3-C I'm uncertain how much this would buy you as there are already validity checks built into the GPS broadcast frames, which the chipset implements. However, ICDs can be found here.

You may want to consider implementing a RAIM algorithm as well, and have a fault detection (FD) flag.

barbeau commented 3 years ago

A recent publication using raw measurements: https://www.ion.org/publications/abstract.cfm?articleID=15883

Same paper - https://www.researchgate.net/publication/329575474_Android_Raw_GNSS_Measurements_as_the_New_Anti-Spoofing_and_Anti-Jamming_Solution

barbeau commented 3 years ago

It would be great to include Galileo OS-NMA info for spoofing detection too - https://gssc.esa.int/navipedia/index.php/Galileo_Open_Service_Navigation_Message_Authentication.

One challenge, though, is navigation message access directly from the Android APIs is not widely deployed at the moment. See column "Navigation Messages" (O) in the GPSTest Database: https://bit.ly/gpstest-device-database

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] commented 2 years ago

Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] commented 6 months ago

Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.

barbeau commented 6 months ago

Not stale