skip to content

How should a banking app's server check platform attestation before adding a new payee, and what does a pass not prove?

level: middleimportance: should knowfreq 45%

answer

  1. the app cannot vouch for itself
  2. a one-time challenge from the server
  3. bind it to this request
  4. genuine app, genuine device, nothing more
  5. a signal, not an identity

basics

~20 s

The server issues a one-time challenge; the platform signs a statement about app and device that embeds it; the server verifies it and decides. A pass shows a genuine app on a genuine device, not an honest human or their intent.

solid answer

~50 s

The app cannot judge its own integrity: a modified app can skip the check or report success, so the verdict is evaluated where the attacker has no control, on the server. The app asks the bank for a fresh, single-use challenge, then asks the platform's attestation service for a signed statement embedding it, ideally bound to a hash of the payee details. The server verifies the platform's signature, that the app identity is the bank's release build, that the challenge is its own and unused, and, on one platform, that a per-key counter has increased; then it allows, steps up or refuses. A pass means the bank's unmodified app ran on a device that passed the platform's checks at that moment. It does not prove a human is driving, that the customer intends this payee, or that the phone is malware-free, so it is a risk signal, never an identity.

code

http · 23 lines
http
POST /v1/attestation/challenges HTTP/1.1
Host: api.bank.example
Authorization: Bearer <access token>

HTTP/1.1 201 Created
Content-Type: application/json

{"challenge": "r7Vb0qX2mN9pL4sT1wYz8A", "expiresInSeconds": 120}

POST /v1/payees HTTP/1.1
Host: api.bank.example
Authorization: Bearer <access token>
Content-Type: application/json

{"payee": {"name": "J. Okafor", "account": "12345678"},
 "attestation": {"challenge": "r7Vb0qX2mN9pL4sT1wYz8A",
                 "requestHash": "<hash of the payee fields>",
                 "statement": "<platform-signed blob>"}}

HTTP/1.1 202 Accepted
Content-Type: application/json

{"status": "step_up_required", "method": "confirm_on_trusted_device"}

go deeper

for a junior

Recall that attestation is a statement signed by the platform about the app and the device, and that the bank's server, not the app, must check it.

for a middle

Walk through the challenge, the signed statement and the server's checks, and say what each check stops, especially replay.

for a senior

Treat the verdict as a risk signal: plan for devices that cannot attest, old builds, quotas and key resets, and choose step-up over refusal where it fits.

for a principal

Decide which actions require attestation, what the server does when it is unavailable, and how it combines with other fraud signals without excluding genuine customers.

## Why the app cannot vouch for itself A banking app that checks "am I genuine?" and reports the answer has built a lie detector the suspect controls. A modified or hooked app can skip the check or return success. One platform's documentation says it directly: an app's own logic cannot be relied on for security checks on itself, because a compromised app can falsify the results. **Platform attestation** solves this by having the operating system's attestation service, not the app, sign a statement about the app and the device, and having the **server**, not the app, verify it. An attestation that is checked only on the phone is just another `if` statement an attacker can patch. ## The flow for adding a payee 1. The app asks the bank's API for a **challenge**: a random, single-use value the server remembers. One platform's guidance asks for at least 16 bytes so it cannot be guessed. 2. The app asks the platform's attestation service for a signed statement embedding that challenge. Where the platform supports it, the statement is also bound to a **hash of the request**, here the payee details, so it cannot be moved onto a different request. 3. The app sends the add-payee request with the statement attached. 4. The server **verifies** and **decides**. ## What the server checks | Check | What it stops | |---|---| | The statement is signed by the platform's attestation service | a statement the attacker wrote themselves | | The app identity matches the bank's release build | a repackaged or modified app | | The challenge is one the server issued, unexpired and unused | replay of a captured statement | | The request hash matches the payee in this request | moving a good statement onto a different payee | | On one platform, a per-key counter is higher than last time | replay of an older signed assertion | | On one platform, the device-integrity part of the verdict | a compromised OS, API hooking, and emulators that fail the platform's checks | On one platform the app first attests a key it generated, the server stores that key per user and per device, and later requests carry assertions signed with it. On the other, each request returns a verdict that the server must decrypt and verify, and the vendor advises against caching verdicts, because a good verdict from one device can be reused for abuse elsewhere. ## What a pass proves, and what it does not A pass shows: - the request came from the bank's **unmodified app**; - running on a device that **passed the platform's integrity checks** at that moment; - for **this** challenge and, if bound, **this** request. It does not show: - that a **human** is driving: a genuine app on a genuine phone can be scripted, and a room of genuine phones passes every check; - that the **customer intends** this payee: social engineering happens on genuine devices; - that the phone is free of **malware** that does not trip the platform's checks; - **who** the user is: attestation is about software and hardware, not identity. So the verdict is a **risk signal**. One platform's guidance says to use it alongside other signals, not as the sole anti-abuse mechanism, and to enforce in tiers. ## Fleet realities - **Not every device can attest.** One platform tells apps to check support and degrade gracefully, which means the server can no longer require attestation from that device. The bank needs a policy for this case: a step-up check, not a silent pass and not a blanket refusal. - **Old builds send nothing.** Builds released before attestation was added cannot attach it; requiring it from them needs a minimum-version gate, which is a separate decision. - **Quotas.** One platform allows 10,000 requests per day across all installs by default. Attest at sensitive moments such as adding a payee, not on every balance refresh. - **Keys reset.** On one platform the attested key does not survive reinstallation, device migration or a restore from backup, so the app re-attests; many new keys on one device is itself a fraud signal. - **Measure first.** Run the checks without enforcement, learn what the real customer base returns, then set the tiers. ## Deciding | Verdict | Add payee | |---|---| | Pass, familiar device | allow | | Pass, new device or unusual pattern | step-up: confirm on a trusted device, cooling-off delay | | Unavailable on this device | step-up | | Fail | refuse with a support route |

  • Why does the bank attest when a payee is added rather than on every request the app makes?
    Attestation costs time, battery and, on one platform, a daily request quota of 10,000 across all installs by default. The value is highest where fraud pays: adding a payee, raising a limit, changing contact details. Balance reads can rely on the session and ordinary server checks.
  • A fraud ring uses a rack of genuine, unmodified phones running the genuine app. What still catches them?
    Not attestation alone, since every phone passes. Server-side signals do: many accounts per device, many attested keys per device (one platform offers a fraud metric for this), payee patterns across accounts, velocity limits, and step-up checks a script cannot complete.

A notary's stamp proves the document was signed in front of a notary on that date, not that what it says is true; the bank still has to decide whether to believe the request.

  • The app checks the attestation result and calls the API only if it passed.
  • A passed attestation proves the account holder made the request.
  • Cache a good verdict for the day to save attestation calls.
  • Every phone can attest, so refuse any request that arrives without a statement.
  • A fixed challenge compiled into the app is enough to stop replay.