Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sorry, we're cash only. (hacksoc)

Sorry, we're cash only. (hacksoc)

We are surrounded by card payments as a part of buying groceries or paying our monthly bills. As much as we hope these payment methods are safe, their inherent complexity as a result of decades of backwards compatibility leads to insecurity instead.

Harley Watson

December 02, 2015
Tweet

More Decks by Harley Watson

Other Decks in Technology

Transcript

  1. $ whoami • First year student • Lived in the

    Dominican Republic for 13 years • Lived in California for 5 years. • I dig • Payments technologies (obviously) • Security UX • Public transportation • Embedded devices
  2. Every single one of us in here has a card

    with one of these logos on it.
  3. Imagine you’re at McDonald’s, hungry, and need to quickly pay

    for your 20pc Chicken McNuggets, Big Mac, Chicken Mayo, McFlurry, and Ranch BLT.
  4. %B6011898748579348^DOE/ JOHN ^37829821000123456789? Track 1 Track 2 stores the same

    but lacks cardholder name. Track 3 usually isn’t present in EU cards.
  5. The service code helps define transaction rules. First digit 1:

    International interchange OK 2: International interchange, use IC (chip) where feasible 5: National interchange only except under bilateral agreement 6: National interchange only except under bilateral agreement, use IC (chip) where feasible 7: No interchange except under bilateral agreement (closed loop) 9: Test Second digit 0: Normal 2: Contact issuer via online means 4: Contact issuer via online means except under bilateral agreement Third digit 0: No restrictions, PIN required 1: No restrictions 2: Goods and services only (no cash) 3: ATM only, PIN required 4: Cash only 5: Goods and services only (no cash), PIN required 6: No restrictions, use PIN where feasible 7: Goods and services only (no cash), use PIN where feasible https://en.wikipedia.org/wiki/Magnetic_stripe_card
  6. Card terminal (terminal) Acquiring institution (WorldPay, iZettle) Issuing institution (Barclays,

    HSBC, RBS) Sometime later (usually 9PM next day) #1234? #1234?
  7. Sometime later (usually 9PM next day) OK #1234 OK #1234

    Disbursement to merchant (Bacs, FasterPayments) Acquiring institution (WorldPay, iZettle) Issuing institution (Barclays, HSBC, RBS)
  8. These may show up as Processing in Online Banking (Bank

    of America Online Banking. Authorised using Stripe)
  9. The authorisation flow is identical but data is read from

    the card over the smartcard interface instead.
  10. Multiple applications per card are used in the United States

    to allow debit cards to be run in stores over the credit network or the debit network. * Supporting this is legally required as a result of the Durbin Amendment
  11. (Bank of America US Debit Card issued in 2014. Inspected

    using Cardpeek.) EMV-wide payment card application selector MasterCard Debit application used for most transactions. US Debit application, used for ATMs and Durbin.
  12. (Barclays UK Debit Card issued in 2015. Inspected using Cardpeek.)

    EMV-wide payment card application selector Visa Debit application, used for most transactions. Link application, used by UK-only ATMs. CAP application, used by online banking login.
  13. (Banesco DO Debit Card issued in 2014. Inspected using Cardpeek.)

    EMV-wide payment card application selector Visa Debit application, used for most transactions.
  14. The card returns a Processing Options Data Objects List, instructing

    the terminal to supply information about the transaction.
  15. The terminal responds to the PDOL and issues a GET

    PROCESSING OPTIONS command to ask the card how to set up the transaction.
  16. An Application Interchange Profile is provided to signal pre-authorisation requirements.

    An Application File Locator is used to indicate card data files.
  17. Dynamic Data Authentication asks the card to sign a nonce

    in order to verify the card has not been tampered with or cloned.
  18. DDA does not prevent MITMing transaction parameters to force offline

    transactions. https://eprint.iacr.org/2015/963.pdf
  19. Card terminal (terminal) Acquiring institution (WorldPay, iZettle) Issuing institution (Barclays,

    HSBC, RBS) Sometime later (usually 9PM next day) #5678? #5678?
  20. Sometime later (usually 9PM next day) FAIL Bad card FAIL

    Bad card Merchant notified Acquiring institution (WorldPay, iZettle) Issuing institution (Barclays, HSBC, RBS)
  21. (Bank of America US Debit Card issued in 2014. Inspected

    using Cardpeek.) A signature preferring card places strict conditions on where a PIN can be used.
  22. (Barclays UK Debit Card issued in 2015. Inspected using Cardpeek.)

    A PIN preferring card will place no restrictions on using a PIN.
  23. Offline PIN verification can be MITMed by a bad terminal

    as the PIN is sent in plaintext. https://www.cl.cam.ac.uk/~osc22/docs/mphil_acs_osc22.pdf
  24. EVM provides no way to check whether the PIN was

    actually verified. https://www.cl.cam.ac.uk/research/security/banking/nopin/oakland10chipbroken.pdf
  25. At the point of purchase PIN OK Used signature Card

    terminal (terminal) Intercepting device Bank card
  26. Using the Terminal Verification Results, the terminal decides whether an

    offline approval or decline should occur or whether it should go online.
  27. The terminal passes the TVR to the card along with

    a Card Data Object List reply, which specifies transaction parameters the card wishes to evaluate.
  28. The card returns one of three cryptograms to confirm the

    transaction. Transaction Certificate Offline approval Application Authentication Cryptogram Offline decline Authorization Request Cryptogram Online approval
  29. After receiving a reply, the terminal sends CDOL2 data to

    the card which allows it to reset offline spending limits and update the transaction counter.