feat: filter-out known spoofed data #34
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Detect data from RemoteIDSpoofer using analysis of single message container.
Spoofer description.
Check if messages contain spoofed data by checking known traits of spoofed data, like mac address, timestamps, message contents. Save resulting
MessageContainerAuthenticityStatus
toMessageContainer
.Basic block is the abstract
SpooferDetector
class that has methodcalculateSpoofedProbability
. Each subclass ofSpooferDetector
check one part of theMessageContainer
, e.g. mac address, timestamp or message of certain type. Method returns probability of data being spoofed between 0 and 1:Detectors can return various values of probability. E.g spoofed data always have 0 as first char of mac addr, but real data also can have 0 at start, so if it is zero I used probability of 0.75 that data are spoofed.
The
MessageContainerAuthenticator
class contains array of these detectors. When container is updated, the authenticator checks it by running all the detectors and counting the score. ThenMessageContainerAuthenticityStatus
is worked out from the score:If detector cannot decide, it returs 0.5 so half of score means nothing could be decided. If score is bigger than half, at least one detector detected suspicious data so i used this as threshold for suspicious status. For counterfeit status I used threshold of more than 3/4 of score.
Used in dronetag/drone-scanner#78.
DT-3038