How to get in contact with team that manages DeviceCheck

Hi,

I run a service that protects API calls from Apple ecosystem apps with several layers of security, one of them being DeviceCheck's server-to-server functionality. All requests arrive with a DeviceCheck token that I send to Apple to validate.

Essentially I'm using the functionality listed here:

The server-to-server APIs also let you verify that the token you receive comes from your app on an Apple device.

https://developer.apple.com/documentation/devicecheck

However, occasionally I see huge bursts of traffic that contain valid DeviceCheck tokens from a scripter. I want to understand how they are generating them. It seems like they have identified a way to forge tokens.

Here are traffic patterns for my site. The scale of the y-axis is somewhat arbitrary due to how I'm sampling the requests, but you get the gist. You can see the dark green bars at the bottom are general traffic, and the light green is what we rejected (we have other layers besides DeviceCheck that reject traffic). Interestingly, though, all those light green requests contained valid device check tokens!

I have thousands of the tokens stored in a file for analysis.

Are there known ways that Apple knows of tokens being forged? I wanted to open a TSI for this but the flow requires an Xcode project, and there is no Xcode project to demonstrate this issue. I would really like to get in contact with someone from Apple that either works on DeviceCheck or supports it.

Hundreds of apps in the store depend on my service, and DeviceCheck forms a layer of security that I want to rely on. Obviously we can't solely rely on it, and we don't, but it does form an important layer of our defense. So I ask:

  1. If you know of a way to forge tokens, please comment and I'll shoot you a DM

  2. If you work at Apple and know who I can talk to, please help me work through the process to get in touch with them.

Thanks, Lou

The traffic image didn't come through in the original post. Here it is.

Are the tokens all different?

Something I have wondered about is whether the DeviceCheck token is actually tied to your app or developer account. What happens if I get a pile of tokens from users of my app, and use them in fake requests to your server pretending to be from your app?

Have you also used AppAttest?

Based on my experience, I'd say you shouldn't expect to get any useful help from DTS (nor Feedback Assistant, nor anyone else at Apple) for problems like this. If they do have a weakness, they probably already know about it and they aren't going to discuss it with you.

(Post replies, not comments.)

I use public key pinning in my clients to make it hard to drop mitmproxy in front of the app to harvest tokens, but perhaps they have worked around this.

No, what I mean is, if I, an attacker, have my own trivial app, and I collect tokens that my users send to my server (no MITM needed). Then I send those tokens to your app's API.

Have you ever attempted to decipher the format of the tokens? I spent a few minutes trying to work out if they could be cbor or asn.1 or something, but reverse-engineering isn't really my thing.

(Post replies, not comments.)

Thanks for the tip.

No, what I mean is, if I, an attacker, have my own trivial app, and I collect tokens that my users send to my server (no MITM needed). Then I send those tokens to your app's API.

These would return non-200s from Apple's servers when the token was validated in the server-to-server call. It's actually quite tricky to get DeviceCheck to pass in the first place. A bunch of things need to be true:

  1. An App Identifier in your developer dashboard must match the bundle identifier of your app exactly
  2. The app must be signed using a certificate from the team account that has that App Identifier
  3. A DeviceCheck secret key (used for the backend-to-backend communication) must be created from the same account as 1 and 2.

The fact that it's hard to get right gave me some confidence that it was also hard to forge. Now, I'm not so sure

@lzell2 Open a TSI.

Reference this thread when the form asks if someone from Apple asked you to submit.

How to get in contact with team that manages DeviceCheck
 
 
Q