How to Analyze EMV Payment Cards with the Flipper Zero: NFC, APDU Commands, and Security Architecture
Introduction
Every contactless payment card contains an NFC chip running the EMV (Europay, MasterCard, Visa) protocol. When you tap your card on a terminal, a complex cryptographic handshake occurs in under 400 milliseconds. The Flipper Zero can read the non-sensitive data from these cards — card number, expiry date, transaction history, and cardholder name — but cannot extract the cryptographic keys or CVV2. This guide covers the EMV protocol, what data is accessible, how to read it with the Flipper, and the security architecture that protects contactless payments.
Legal and Ethical Notice
- Reading your own cards is legal. The data accessed is the same data visible on the physical card and receipts.
- Reading someone else's card without consent is illegal. This is unauthorized access to financial data.
- The Flipper cannot extract CVV/CVC, PIN, or cryptographic keys. The data read is not sufficient to make fraudulent transactions.
- Online transactions require CVV2 (printed on the back, not stored on the chip).
- Contactless transactions require the card's private key which is stored in a secure element and never transmitted.
How EMV Contactless Works
When a contactless card approaches a payment terminal, this sequence occurs:
- RF field activation: The terminal generates a 13.56 MHz RF field that powers the card's chip (passive operation, no battery).
- Anti-collision and selection: The terminal selects the card using its UID.
- Application selection: The terminal requests a list of supported payment applications (Visa, MasterCard, Amex).
- Read data: The terminal reads static card data (PAN, expiry, cardholder name).
- Cryptographic authentication: The terminal sends a random challenge to the card. The card signs it with its private key. This proves the card is genuine without revealing the key.
- Transaction authorization: The terminal sends transaction details (amount, currency, date) to the card. The card generates a dynamic cryptogram (ARQC) using its key.
- Issuer authentication: The terminal sends the cryptogram to the bank, which verifies it and approves or declines.
Key security point: The card's private key never leaves the secure element. The Flipper can read steps 1-4 but cannot perform steps 5-7 without the bank's authorization infrastructure.
Step 1: Read an EMV Payment Card with the Flipper
- Navigate to NFC > Read.
- Hold the payment card against the back of the Flipper (centered over the logo).
- The Flipper detects the card and reads available data.
- The saved card displays:
- UID: The NFC unique identifier
- Card type: MIFARE DESFire (most common for payment cards)
- Application IDs (AID): The payment network identifiers
Step 2: Analyze EMV Data with the NFC App
Install the EMV Reader or NFC Pay app from the Flipper App Catalog for detailed EMV parsing.
Data accessible via NFC (PPSE and SELECT commands):
- PAN (Primary Account Number): The 16-digit card number (may be truncated or tokenized)
- Expiry date: MM/YY format
- Cardholder name: Embossed name (may be absent on some cards)
- Card type: Debit, credit, prepaid
- Issuer country: Country code
- Application label: "Visa Credit", "MasterCard", etc.
- Transaction counter: Number of contactless transactions made
- Last transaction details: Date, amount, currency (stored on card for offline data authentication)
Data NOT accessible:
- CVV/CVC: Printed on the back, not stored on chip
- PIN: Never stored in any retrievable form
- Cryptographic keys: Stored in secure element, hardware-protected
- Dynamic CVV (dCVV): Generated per transaction, never transmitted in the clear
Step 3: APDU Commands for EMV Exploration
APDU (Application Protocol Data Unit) is the command language for smart cards. The Flipper can send custom APDUs to explore card data.
Basic APDU structure:
- CLA: Class byte (00 for standard commands)
- INS: Instruction (A4 = SELECT, B2 = READ RECORD, etc.)
- P1, P2: Parameters
- Lc: Length of command data
- Data: Command payload
- Le: Expected response length
Common EMV APDU commands:
SELECT PPSE: 00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00 SELECT AID: 00 A4 04 00 [Lc] [AID bytes] 00 READ RECORD: 00 B2 [record] [SFI] 00 GET DATA: 80 CA [tag] 00 00 GET PROCESSING: 80 A8 00 00 [Lc] [PDOL data] 00Sending APDUs on the Flipper:
- NFC > Extra Actions > Send APDU
- Enter the APDU hex bytes
- Send and view the response
Step 4: Tokenized vs. Real Card Numbers
Modern cards increasingly use tokenization for contactless payments:
- The NFC chip stores a Device Account Number (DAN) — a token, not the real PAN
- The DAN is mapped to the real PAN by the card issuer's token vault
- Even if the token is intercepted, it cannot be used outside the specific device/card context
- Tokenized cards show a different number via NFC than printed on the physical card
If your Flipper reads a card number that differs from your physical card, tokenization is active. This is a security feature, not a bug.
Step 5: Contactless Card Cloning Reality Check
Can you clone a payment card with a Flipper?
No. Here is why:
- Static data cloning: You can read the PAN and expiry, but these are not enough for contactless transactions. The terminal requires a dynamic cryptogram.
- Dynamic authentication: Each transaction generates a unique cryptogram using the card's private key. Without the key, you cannot generate valid cryptograms.
- Secure element: The private key is stored in hardware that is physically tamper-resistant. Extraction requires electron microscopes and weeks of work — far beyond the Flipper's capability.
- Issuer verification: Every transaction is verified online or offline using the card's key. A clone without the key is rejected.
What about MagStripe emulation?
Some legacy systems use MSD (MagStripe Data) mode where the card sends track-equivalent data. This data is static and could theoretically be used for magnetic stripe fraud. However:
- MSD mode is being phased out globally
- Many countries no longer accept magstripe transactions
- Chip-and-PIN and CDCVM (Consumer Device Cardholder Verification Method) have replaced MSD
Step 6: EMV Security Architecture Deep Dive
SDA (Static Data Authentication):
- Card provides a signed certificate of its static data
- Terminal verifies the signature using the issuer's public key
- Vulnerable to cloning (static data can be copied)
- Rarely used today
DDA (Dynamic Data Authentication):
- Card signs dynamic data (including terminal-generated random number)
- Prevents cloning because the response changes per transaction
- Still used on many cards
CDA (Combined DDA/Application Cryptogram Generation):
- Combines DDA with transaction cryptogram generation
- Most secure, most common on modern cards
CDCVM (Consumer Device Cardholder Verification Method):
- For mobile payments (Apple Pay, Google Pay)
- The phone authenticates the user (Face ID, fingerprint, PIN)
- No PIN needed at the terminal for high-value transactions
Step 7: Transit Card EMV Analysis
Transit cards (subway, bus, train) often use EMV or compatible protocols:
- Visa payWave Transit: Uses standard EMV with transit-specific AIDs
- MasterCard Transit: Similar with M/Chip Transit profile
- MIFARE DESFire EV2/EV3: Many transit agencies use DESFire with custom applications
Transit-specific data:
- Balance (stored value)
- Pass/ticket type
- Recent tap records (station, time, fare)
- Card status (active, expired, blocked)
Some transit systems store this data unencrypted for fast gate processing. The Flipper can read it with the right APDU commands.
Step 8: Protecting Your Own Cards
- RFID-blocking wallet: A Faraday cage wallet blocks all NFC signals. The most effective protection.
- Disable contactless: Some banks let you disable contactless via their app. You then use chip-and-PIN only.
- Virtual cards: Use virtual card numbers for online transactions. The physical card is never exposed.
- Transaction alerts: Enable push notifications for all transactions. Report unauthorized charges immediately.
- Tokenized mobile payments: Use Apple Pay or Google Pay instead of the physical card. These use tokenization and biometric authentication.
Conclusion
The Flipper Zero provides fascinating insight into the EMV protocol and contactless payment technology. It can read the static data that EMV cards broadcast — card number, expiry, transaction history — but cannot extract the cryptographic keys that secure transactions. The EMV security architecture, with its secure elements, dynamic authentication, and online verification, is specifically designed to resist exactly the kind of attacks the Flipper could perform. Understanding what the Flipper can and cannot do is essential for both security researchers and everyday users who want to understand the technology in their wallets.
Related Guides
- How to Hack RFID and NFC with the Flipper Zero: LF, HF, MIFARE, and iButton
- Flipper Zero: Getting Started with BadUSB, Sub-GHz, and NFC
- How to Read Bad Blocks on a Flipper Zero — NFC Deep Dive
- Setting Up Marauder on the ESP32 Wi-Fi Dev Board for Flipper
- How to Use Flipper Zero to Test Smart Lock Vulnerabilities
- Scanning and Logging NFC Tags on the Go with Flipper Zero
- Flipper Zero NFC Tools — Reading and Analyzing NFC Tags
- Cloning and Emulating RFID/NFC Cards with Flipper Zero