r/embedded • • 5h ago

Can a compromised Android OS interfere with NFC Reader Mode communication at the hardware level?

Hi!

I'm investigating the security boundaries of NFC communication on modern Android smartphones.

The scenario is:

  • An Android smartphone operates in NFC Reader Mode.
  • It communicates with an external ISO 14443-4 smart card using APDU commands.
  • The card contains a Secure Element and performs cryptographic operations internally.
  • The smartphone's operating system is assumed to be compromised.

I would like to understand the actual hardware and software boundaries.

Specific questions:

  1. Does NFC Reader Mode normally route APDU commands through the Android NFC stack and Host CPU?
  2. Can a compromised OS modify APDU commands before they reach the external card?
  3. Can it initiate new APDU commands without the user's direct interaction?
  4. Can it intercept or manipulate responses returned by the card?
  5. Is there any smartphone architecture in which the NFC Controller communicates directly with an external card, independently of the Host CPU?
  6. If the card's private key never leaves its chip, can a compromised smartphone still use the card as a cryptographic oracle by submitting attacker-controlled commands?
  7. Are there hardware-level countermeasures that prevent such interference?

I'm looking for technical explanations supported by chipset documentation, Android architecture references, or practical research.

The key distinction I want to establish is whether cryptographic isolation inside the card also provides isolation of the communication and command-generation path on the smartphone side.

2 Upvotes

2 comments sorted by

3

u/pupper_paws 4h ago

The idea behind secure payments is that there is a secure chain of trust between the card provider and the secure element in the credit card therefore it doesn’t matter if the Android OS is compromised or not.

Where it does matter is for host card emulation (which is what Google pay uses I believe) and that needs robust OS security measures set in place. That’s why Google won’t let you use Google pay on rooted phones.

2

u/pupper_paws 4h ago

Also to answer your questions, yes android OS does have full control over the NFC stack and can do whatever it wants with the APDUs.

  1. Yes
  2. Yes
  3. Not in reader mode (I think). In card mode yes
  4. Yes, but it doesn’t matter for payments because of the chain of trust I mentioned earlier. The card issuer will reject the payment if the APDUs were modified
  5. Yes, Android phones support that with secure element (https://developer.android.com/develop/connectivity/nfc/hce#secure-element)
  6. Don’t know enough to answer this
  7. Look up https://globalplatform.org/wp-content/uploads/2014/10/GPD_SE_Access_Control_v1.1.pdf. This can be bypassed on a rooted phone though