Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to detect new Airtags from a stationary scanner #47

Closed
createcandle opened this issue Feb 28, 2022 · 5 comments
Closed

Trying to detect new Airtags from a stationary scanner #47

createcandle opened this issue Feb 28, 2022 · 5 comments

Comments

@createcandle
Copy link

createcandle commented Feb 28, 2022

I'm trying to inform users of my open source smart home project when an actually new Airtag appears, but it's quite hard to do, since stationary Airtags rotate the mac every 15 minutes.

What I'd be interested in (thinking of implementing it in my project) is a way to detect when Airtags change their mac addresses, so that I can ignore the Airtags that the user was already alerted to.

They seem to change their mac address at regular interval (15 minutes), so if the Airtag count isn't too high it should be possible to do this. And if there is a way to extract other more stable values (such as battery level) it would become even easier?

I'd be curious if you think this approach is useful and possible. Perhaps it could be a feature of Airguard too?

P.S. How does Apple do this? I suspect they can only inform you if a devices is travelling with you because they can check the location of the Airtag and the phone and see if they move together for a while? That would imply Apple's protection app would also have a harder time informing people about malicious trackers if they are stationary too? After all, it migh just be your upstairs neighbour's Airtag.

@createcandle
Copy link
Author

I've been looking at the status byte values of an Airtag.. and it doesn't seem to be a predictable value.

@Trup3s
Copy link
Collaborator

Trup3s commented Mar 19, 2022

I wouldn't rely on this to work properly.
The status byte shouldn't change that much. The only values that might change is the one bit that shows if the owner was connect withing the current key rotation and the 2 bits that represent the battery state.

Apple can differ between AirTags owned by the device owner and others, because AirTags get associated to the Apple ID of the owner device in the setup process.

We already thought about this but came to the conclusion that it will probably not reliable enough, because the battery level is relatively stable and solely relying on the status byte can start to cause problems when more than one AirTag is present.

@createcandle
Copy link
Author

one bit that shows if the owner was connect withing the current key rotation and the 2 bits that represent the battery state

Could you share which bits represent what?

And the battery state is just two bits? Hmm, then indeed it probably won't have a lot to work with for recognising a device based on its battery level. Which is good I guess, because otherwise Apple would have dropped the ball here :-D

can start to cause problems when more than one AirTag is present

How so?

probably not reliable enough

Don't let perfect be the enemy of good? For my use case it would already be useful even if it's not perfect.

Currently my system reports if a new airtag is detected based on the number of airtags it found during a scan. If the number increases, that's relevant already (provided the user doesn't live on top of a busy footpath).

Screenshot 2022-03-20 at 14 24 30

As you can tell, this currently creates a lot of instances there the system notifies that it detected a new tag. I'd like to make it a little more accurate. For example by trying to guess if an airtag is truly new based on the mac address and any other data that might be useful. increasing scan duration and doing some time-based averaging would probably also help.

@createcandle
Copy link
Author

createcandle commented Mar 20, 2022

From the research paper:

(1) Unpaired
(2) Connected
(3) Nearby
(4) Separated

If my system could filter out airtags that are happily paired or connected, that might already help with finding potential stalker devices.

@createcandle
Copy link
Author

The document you linked to mentions that once nearby the airtags will emit "the first part of a public key". And once they enter the separated state, they emit the full public key.

That public key is only changed once per day?

That seems to imply that an Airtag in the nearby/separated state could easily be tracked since key public key remains stable for an entire day?

If that is correct, then might I be able to use that (first part of the) public key to keep track of which Airtags presence the user has already been alerted to recently?

@seemoo-lab seemoo-lab locked and limited conversation to collaborators Mar 23, 2023
@Sn0wfreezeDev Sn0wfreezeDev converted this issue into discussion #112 Mar 23, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant