SlideShare une entreprise Scribd logo
1  sur  100
Télécharger pour lire hors ligne
Modern payments security:
    EMV, NFC, etc.?
        Nikita Abdullin
     nabdullin@gmail.com
         19.11.2012
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
About me
   Not a black khat :)
Intro: Payment cards
• What will we cover today:
  – Payment technologies from the real world
     • EMV (Europay, MasterCard and Visa)
        – EMV-enabled integrated circuit cards & terminals
     • NFC (Near Field Communication)
        – Payment applications of NFC
  – Attacks and countermeasures
     • Classification
     • Known vectors
     • New vectors
Intro: Payment cards
• Why talk about it?
  – Real-world means:
     •   Financial institutes – obscure and weird
     •   Ubiquity
     •   Hardware
     •   Attacks in space and time
  – Strict standardization
  – Purely virtual payment technologies are all different
    and rapidly changing
     • Anyone can implement his own
  – And we are talking about serious business
Intro: Payment cards
• Nilson Report, 2011
  – The total number of purchases on all major
    worldwide card issuers (American Express, Diners
    Club, JCB, MasterCard, UnionPay and Visa)
    increased to a total of 135.33 billion, up 12.1
    percent from 2010 on an additional 14.56 billion
    transactions, the report said.
Intro: Payment cards
• Cards International:
   – Predict 30% annual
     growth of Russian
     payment cards market
   – $ 100 Billion by 2012
Intro: Payment cards
• As of early 2011, 1.2 billion EMV cards were
  deployed across the globe along with 18.7
  million EMV terminals (via IBID)
• Over a billion smartphones sold by 2012
• By 2014, 44% of smartphones will be NFC-
  compatible (via)
• Payment card users in Russia: Spring 2011 to
  Spring 2012: from 49% to 56% (via GfK Rus).
Intro: Payment cards
• History
  –   Origins: 1890s
  –   Appearance: 1920s
  –   Popularity: Mid XX century
  –   1950: Diners Club
  –   1958: American Express
  –   1958: Bank of America BankAmericards (now Visa)
  –   1966: InterBank Card Association (now MasterCard)
  –   1967: Cash dispencer
  –   1969: First ATM and magnetic stripe
Meet the Card

Gentlemen, do
you know what
 this thing is?
Card standards
• Standards family ISO/IEC 781X
• 7810: Physical characteristics of credit card size
  document
• 7811-1: Embossing
• 7811-2: Magnetic stripe–low coercitivity
• 7811-3: Location of embossed characters
• 7811-4: Location of tracks 1 & 2
• 7811-5: Location of track 3
• 7811-6: Magnetic stripe-high coercitivity
• 7813: Financial transaction cards
Card exterior
Front: PAN(4), expiry date(6),   Back: Magnetic stripe (1),
Cardholder name(7)               cardholder signature(2), CVV2 (2)
PAN
• PAN Personal Account Number
  – From 13 to 19 digits
  – First 4 to 6 digits = BIN
     • Bank identification number
  – Last digit is a checksum digit (Luhn digit)
     • Checksum is calculated with Luhn algorithm
Magnetic Stripe
• LoCo (Low coercitivity)
• HiCo (High coercitivity)
• Tracks
  – Track 1:
  – Track 2:
  – (Track 3) – mostly unused
Magnetic Stripe
Data entity                    Track 1   Track2
PAN                              +         +
Cardholder name                  +
Expiry date                      +         +
Service code                     +         +
Discretionary data:

      PVKI                       +         +
      PVV                        +         +
      CVC-1 (CVV-1)              +         +
Meet the Terminal
• Terminal types:
  – ATM (Automated Teller Machine)
  – POS (Point Of Sale)
  – Imprinter
  – Others
     • SSD
Terminal Hardware
• All devices:
  – Card Reader
  – PED (PIN Entry Device)
  – Receipt printer
  – Screen
• ATM:
  – Note cassettes inside a safe box
  – Note dispencer
  – (Note acceptor)
Payment Systems
• Why?
  – If N banks around the world want to accept each
    other’s cards, how many connections they would
    need? (Hint: N ( N2 1) )
• IPS bring standards & interoperability
  – Each IPS defines its own protocols and procedures
• Direct connections are also used
  – Member bank connects directly to the IPS
  – Affiliates connect to the Member
  – IPS can act as an acquirer for the largest retailers
Payment Systems
Payment Systems
Payment Systems
Payment Systems
• Notable IPS (International Payment Systems)
  – Visa
  – MasterCard (MC)
  – Japan Credit Bureau (JCB)
  – Diners Club (DC)
  – American Express (AMEX)
  – China Union Pay (CUP)
Cryptography & Security
• Plastic
  – Holograms
  – Watermarks
• Cryptography
  – DES (Replaced by DES)
  – 3DES
     • 3DES, mode: EDE, 2 keys: ABA
Cryptography & Security
• Cardholder Authentication (Verification)
   –   PIN
   –   PVK (PIN Verification Key)
   –   PVV (PIN Verification Value)
   –   PVV = ENC(PVK)[f(PAN, PIN)] by issuer
• Card Authentication (Verification)
   –   CVV/CVC and CVV2/CVC2
   –   CVK (Card Verification Key)
   –   CVV = ENC(CVK)[f(PAN || ExpDate || SvcCode)] by issuer
   –   CVV2 = ENC(CVK)[f(PAN || ExpDate || ‘000’)] by issuer
Cryptography & Security
• Encryption
  –   PEK (PIN Encryption Key)
  –   TPK (Terminal PIN Key)
  –   TMK (Terminal Master Key)
  –   Domain encryption
       • ZMK/ZCMK (Zone (Control) Master Key)
       • AWK (Acquirer Working Key)
       • IWK (Issuer Working Key)
  – Proprietary measures
       • MAC by terminal
       • Transport-level encryption
Cryptography & Security
• HSM (Host Security Module)
  – Host command interface
  – Console admin interface
     • Smart cards for security officer authetication and master
       key storage
  – PKCS#11 API
  – LMK (Local Master Key)
  – Standards compliance
     • FIPS 140-1, FIPS 140-2/140-3
• PIN Printer
  – A secure printer directly connected to HSM
Processing cycle
• Cardholder
   – Receive a card and sign it manually
   – Open PIN Envelope, read it and burn it
• Issuer
   –   Personalization
   –   Embossing
   –   Encoding
   –   Issuer’s Host software
        • Authorization processing
        • Presentment processing
• Card
   – Card is just a static read-only piece of plastic
Processing cycle
• Acquirer
  – Manages terminals and provides services to
    merchants
  – Acquirer’s host software
     • Authorization processing
     • Presentment processing
• Terminal
  – Reads card
  – Talks to acquirer’s host
Processing cycle
• Transaction phases
  – Authorization
  – Clearing
  – Settlement
  – Dispute resolution
Authorization
• Terminal reads card
• If cardholder enters PIN:
    – Terminal calculates a PIN Block inside PED
    – PIN Block is encrypted under corresponding TPK
•   Auth message is sent to Acquirer’s host
•   Acquirer processes it and sends to IPS
•   IPS processes it and sends to Issuer
•   Issuer approves or rejects it and sends the
    answer back
Clearing
• Terminal reconciliation
• Acquirer demands satisfaction from the issuer
  and sends the clearing presentments through
  the IPS
• IPS processes them and sends them to the
  Issuer
• Issuer may not respond, money transfer is
  automatically performed at the next stage
Settlement
• All parties settle their financial positions
  through the IPS
   – Consolidated funds transfer
Dispute resolution
• Presentment: Original Sale
• First Chargeback: A customer disputes a charge to his
  or her credit card company or bank and the bank
  responds with a retrieval request to dispute the
  transaction.
• Second Presentation or Re-presentment: This is when
  the merchant has an opportunity to respond to the
  first chargeback.
• Second Chargeback: If the second presentment is
  rejected by the cardholder, the issuing bank files a
  second chargeback.
• IPS Arbitration: IPS staff handle the case manually
Data transfer
• ISO 8583 Standard
  – Binary protocol
  – Presence of a fields is determined by bitmap
     • N x 64-bit bitmaps
  – Fields may be fixed or variable
  – Data may be encoded in raw binary, ASCII, BCD,
    etc.
     • The same for variable fields length
Terminal protocols
• Terminals usually talk to acquirer’s host in
  their special protocols
  – ATM
  – POS
  – SSD
• But some are built over ISO8583
Transaction types
•   ATM
•   Retail
•   CNP Retail
•   Note Acceptance
•   Special
    – Balance request
    – PIN Set/PIN Change
    – Address Verification
Fraud
• PAN + Exp Date + CVV2 = enough for CNP fraud
  – CNP Fraud
• Skimming
  – Cloning of magstripe with and w/o stealing the PIN
  – Clone is identical to the original card
  – http://www.google.com/trends/explore?#q=skimming
• Other methods
http://www.google.com/trends/explore?#q=skimming
http://www.google.com/trends/explore?#q=skimming
Advances & countermeasures
• DUKPT
   – Derived Unique Key Per Transaction
• Anti-skimming
   – Terminal-only
   – Card and terminal
      • Magstipe is analog, not digital
• e-commerce
   – (SET)
   – 3-D Secure
• Finally, smart cards (ICC)
3-D Secure
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
The EMV standard
• What?
   – A protected microcontroller inside a card
   – Since 1993
• Why?
   – New interactive products
   – Liability Shift
• The Four Books
   –   ICC to Terminal Interface
   –   Security and Key Management
   –   Application Specification
   –   Other Interfaces
• ISO 7816
The EMV standard
• What does the card use:
  – DES/3DES
  – RSA
  – SHA-1
• What does the card have:
  – Several kilobytes of EEPROM
  – Firmware
     • Java Card
     • MultOS
     • …
  – 1 Serial I/O port and a system of commands
The EMV standard
• EMV Lifecycle
  – EMV Personalization
     • Pre-personalization
  – Interactivity
     • Card makes the decision
     • New cardholder authentication methods
        – Biometrics
     • Issuer scripts and data storage
        – Counters
        – Card-level risk management
EMV basics
•   Physical specs
•   I/O
•   Files
•   Commands
•   Applications
Physical specs
Physical specs
Physical specs
                 • Voltage: 3
                   classes of
                   operation
                    –A
                    –B
                    –C
I/O
• Insertion of the ICC into the IFD
  – connection and activation of the contacts.
• Reset of the ICC
  – establishment of communication between the
    terminal and the ICC.
• Execution of the transaction(s).
• Deactivation of the contacts and removal of
  the ICC
I/O
• Contact activation
  – Vcc level validation for 200 cycles
• ICC Reset
  – Cold
     • > 200 cycles and pull up RST
  – Warm
     • > 200 cycles, pull down RST, > 200 cycles, pull up RST
I/O
Rx (Card to Terminal)     Tx (Terminal to Card)
Files
• All data on card is stored as records listed in files
• Mandatory
   –   Application Expiry Date
   –   Application Primary Account Number (PAN)
   –   Card Risk Management Data Object List 1 (CDOL1)
   –   Card Risk Management Data Object List 2 (CDOL2)
• Application Elementary Files
   – Referenced by SFI
   – Contain only BERTLV data objects
Commands
    • Command APDU
      – CLA = Class Byte of the
        Command Message
      – INS = Instruction Byte of
        Command Message
      – P1 = Parameter 1
      – P2 = Parameter 2
Response
    • Response APDU
      – Status bytes
         • SW1
         • SW2
Commands
•   APPLICATION BLOCK (post-issuance command)
•   APPLICATION UNBLOCK (post-issuance command)
•   CARD BLOCK (post-issuance command)
•   EXTERNAL AUTHENTICATE – verify a cryptogram
•   GENERATE APPLICATION CRYPTOGRAM
•   GET CHALLENGE
•   GET DATA
•   GET PROCESSING OPTIONS
•   INTERNAL AUTHENTICATE – calculation of SDA
•   PIN CHANGE/UNBLOCK (post-issuance command)
•   READ RECORD
•   VERIFY – verify PIN data
EMV crypto primitives
• MKAC that it shares with the issuer, derived
  from the issuer’s master key MKI .
• Session key SKAC can be computed, based on
  the transaction counter.
• The issuer has a public-private key pair (PI , SI),
  and the terminal knows this public key PI
• Cards that support asymmetric crypto also
  have a public-private key pair (PIC , SIC ).
EMV Transaction Flow
•   Initialization
•   Card/Data authentication – optional
•   Cardholder verififcation – optional
•   Actual transaction step
Initialization
• Command flow
  – T → C: SELECT APPLICATION
  – C → T: [PDOL]
  – T → C: GET PROCESSING OPTIONS [(data specified by
    the PDOL)]
  – C → T: (AIP, AFL)
  – Repeat for all records in the AFL:
  – T → C: READ RECORD (i)
  – C → T: (Contents of record i)
• Return AFL and AIP
Card/Data authentication
• SDA (Static Data Authentication)
  – Card provides Signed Static Application Data
    (SSAD)
• DDA (Dynamic Data Authentication)
  – SDA + Sign(SIC)[ICC Dynamic Data, Hash(ICC
    Dynamic Data, data specified by DDOL)]
• CDA (Combined Data Authentication)
  – SDAD = Sign(SIC)[nonce_IC , CID, AC, TDHC,
    H(nonce_IC , CID, AC, TDHC, nonce_Terminal].
Cardholder verification
• CVM (Cardholder Verification Methods)
  – CVM List
• Online PIN
  – the bank checks the PIN
• Offline plaintext PIN
  – the chip checks the PIN
  – PIN is transmitted to the chip in the clear form
• Offline encrypted PIN
  – chip checks the PIN
  – PIN is encrypted before it is sent to the card
Offline plaintext PIN
• T → C: VERIFY(pin)
• C → T: Success/ (PIN failed, tries left) / Failed
Offline encrypted PIN
• T → C: GET CHALLENGE
• C → T: nonce_IC
• T → C: VERIFY(Encrypt (PIC)[PIN, nonce_IC ,
  random padding])
• C → T: Success/ (PIN failed, tries left) / Failed
Transaction step
• Offline
   – card sends a Transaction Certificate (TC)
• Online
   – card sends an Authorisation Request Cryptogram
     (ARQC)
   – If issuer approves, card sends a TC
• If card itself refuses
   – Card provides Application Authentication
     Cryptogram (AAC)
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
Attacks on EMV
• Classification
  – Hardware vs. Software
  – Active vs. Passive
  – Intrusive vs. Non-intrusive
  – By localization:
  – By methods used
Attacks on EMV
• Classification
  – By localization:
     • Malicious card
     • Malicious terminal
     • MITM
Attacks on EMV
• Classification
   – By methods used
      •   Communication lines eavesdropping & tampering
      •   Purely cryptoanalytical methods
      •   Fault attacks
      •   Side-channel attacks
           – Power analysis
               » SPA (Single Power Analysis)
               » DPA (Differential Power Analysis)
               » DFA (Differential Fault Analysis)
           – TAA (Timing Analysis Attack)
      • Social Engineering
Known vectors
•   Fallback to magstripe
•   Relay attacks
•   Replay attacks (“YES”-cards = clones of SDA card)
•   MITM (Wedge) with CVM list downgrade
•   Pre-play attack
•   Joint encryption and signature
•   Fault analysis
•   Power analysis
•   Attacking HSM's
MITM (Wedge) with CVM list
       downgrade
             • Terminal might not check if
               authentication method is
               the same that the card
               approved
                – Only auth result is signed
             • Make the card think it was a
               signature-based transaction
             • Make the terminal think it
               was a PIN-based transaction
             • Easily prevented
                – by correct terminal software
             • Detected at host
Pre-play attack
• Bond et al., Cambridge, 2012
• Random nonce sent by terminal?
• In reality it is not so random
  – Older implementations
• So a MITM device can gather a lot of
  cryptograms for known nonces
• Then just predict when this cryptogram will be
  correct and use it with fake transaction data
Joint encryption and signature attack
•   Degabriele et al., CT-RSA 2012
•   CDA cards
•   Offline transaction, card verifies PIN
•   Utilize known padding of encrypted EMV data
     – Bleichenbacher attack on RSA
• Same RSA keypair used for signature and
  encryption
Joint encryption and signature
Fault analysis
• Coron et al., CT-RSA 2010
• Currently CRT (Chinese Remainder Theorem) is used to
  reduce computational load on signer in RSA
  implementations
   – From mod N to mod p and mod q
   – Fault induced on one computation of two
   – “CJKNP” attack on RSA, 2009
       • Partially unknown plaintexts
• Consider EMV DDA:
   – Signed data includes partially known ASN.1 header
   – Attack uses orthogonal lattice techniques
   – Attack requires 10 faulty signatures to factor N under 1 second
Attacking HSM’s
• EMV introduced new crypto primitives to be implemented
  on existing, non-flexible systems with decades of backward
  compatibility
   – The new crypto functions may have been implemented
     improperly
• An attack by Ben Adida et al. and Ron Rivest (2005) on 3DES
  CBC MAC
   – Inject chosen plaintext in the MAC’ed message
   – Disclose encryption key
   – Two implementations
      • IBM 4758
      • Thales RG7000
• Modern systems are not vulnerable
Countermeasures
• Technical
   – Improve terminal software (!)
   – Improve host software
   – Improve personalization restrictions
       • Obey payment systems’ regulations
   – Distance Bounding
       • Saar Drimer and Steven J. Murdoch, Cambridge
   – Cardholder self-defence
       • Steven J. Murdoch, Cambridge
       • Invent an "Electronic attorney“ – legitimate cardholder’s shim (!?)
• Organizational
   – Verify from the business level
   – Improve standards coverage
Future
• Elliptic curves
   – ECIES (ISO/IEC 18033-2) for PIN
   – EC-DSA / EC-Schnorr (ISO/IEC 14888-3:2006) for
     signatures
• More complex chip applets
   – More authentication schemes
      • Interactive cards with keyboard and display
   – More bugs?
• Fast and more expensive ICC chips
   – Stronger crypto
   – Difficult and less practical hardware attacks
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
Intro: NFC
• RFID – Radio Frequency Identification
  technologies
  – LF (Low frequency)
     • 125 KHz
     • 134 KHz
  – HF (High frequency)
     • 13.56 MHz
        – NFC
            » ISO/IEC 18092 (ECMA-340)
            » ISO/IEC 14443
            » ISO/IEC 15693
  – Others
NFC
• NFC Devices
  –   Tags
  –   Smart cards
  –   Readers
  –   Mobile devices
• NFC Security
  –   NFC Ready and NFC Secure
  –   Secure Element
  –   Authentication
  –   Encryption
NFC Data Transfer
• NFC Roles by RF field source:
  Device A    Device B                      Description
   Active      Active    RF field is generated by the device that
                         sends data at the moment
   Active      Passive   RF field is generated by Device A only

   Passive     Active    RF field is generated by Device B only


• NFC Roles by protocol:
                                Initiator                 Target
               Active           Possible                  Possible
               Passive        Not Possible                Possible
NFC Device Modes of Operation
• Data exchange (P2P – NFC peer-to-peer)
   – Duplex data exchange
   – WiFi, Bluetooth, P2P Payment, Contacts, vCards, …
• Reader/Writer mode (PCD – Proximity Coupling Device)
   – Mobile device reads tags/smartcards
   – WiFi Config, media linking
• Tag emulation (PICC – Proximity Card)
   – Reader cannot distinguish between smartcard & tag
     emulation
   – Handset may contain/emulate multiple smartcards
     (smartcard chips)
NFC Security
•   Eavesdropping is easy (up to 10 meters in active mode)
•   DoS is easy
•   Datastream modification is possible
•   MITM is possible using full relay (when Alice and Bob can
    not talk to each other at all)
    – No NFC shims, unless some RF-shielding nano-materials appear
      :)
    – A fast relay is a practical attack both for eavesdropping and data
      tampering
• Secure element
• Additional levels of security are out of scope of NFC
  standards
    – Proprietary implementations
Secure element
• Smart Card Alliance: “The secure element (SE) is
  a secure microprocessor (a smart card chip) that
  includes a cryptographic processor to facilitate
  transaction authentication and security, and
  provide secure memory for storing payment
  applications (e.g., American Express, Discover,
  MasterCard, Visa and other payment
  applications). SEs can also support other types of
  secure transactions, such as transit payment and
  ticketing, building access, or secure
  identification.”
Secure element
• Secure elements in consumer devices
  – Contactless smart card
  – NFC SIM card + Handheld device
     • RF interface on handheld
     • Integrated RF interface
     • Flexible antenna
  – NFC SD Card + Handheld device
     • RF interface on handheld
     • Integrated RF interface
  – SE Embedded in a chip in a handheld device
     • RF interface on handheld
NFC Security
• Secure Element is as secure as a regular
  (contactless) smartcard
  – Same security features
  – Same weaknesses
     • Side channels
  – Main weakness: Relay attack
     • Cannot be prevented by application-layer cryptographic
       protocols
     • Timing requirements by ISO 14443 are too loose to prevent
       relay over longer channel
        – Real devices may be even more relaxed to produce less timeouts
          in real life for the customers
NFC Reality
• Mifare
  – Proprietary near-ISO compliant cards by Philips
    (NXP)
  – Worldwide deployment
     •   European transport: subways, intercity trains...
     •   Asia, South America, ...
     •   Ski passes at modern ski resorts
     •   ... finally, Moscow & Saint-Petersburg subway tickets
NFC Reality
• Mifare security
  – MIFARE Ultralight – no encryption
  – Mifare Classic
     • Uses a weak crypto algorithm “Crypto-1”, 48-bit key
     • First attacks in 2000’s
     • Algorithm fully reverse-engineered from chip by 2008
        – Insecure, minutes to retrieve secret key and fully clone card
  – Mifare DESFire
     • 3DES / AES
     • Successful DPA attack on 3DES Mifare DESFire in 2011
NFC Reality
• Vulnerable smartphones
  – Various
     • Attacks on NFC P2P
     • JSR-177
  – Android
     • Currently deployed custom stacks and drivers
     • Linux standard NFC stack
     • Userland vulnerabilites on handling NFC data
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
EMV & NFC = ?
• EMV & NFC = ?
  – EMV-compliant chip is a secure element
  – So we have contactless payment cards:
     • Visa PayWave
     • MasterCard PayPass
     • etc.
  – Mostly: dual interface (contacts + coil) for backward
    compatibility (some even have magstripe)
  – Personalized by contact and contactless interfaces
    alike
  – New threats
EMV & NFC = ?
• Low-amount payments with little to no
  cardholder verification
  –   Local transport tickets
  –   Small retail purchases
  –   Even cash withdrawal
  –   …
• An EMV card embedded inside a smartphone
  – Total payment convergence
  – Smartphone’s screentouch screen
  – Multi-application EMV
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
Attacks on EMV & NFC
• Known vectors
  – PAN Gathering for subsequent CNP online fraud
     • Fake point-of-sale device
  – Relay attacks
     • Two NFC-enabled smartphones
• New vectors
  – Power analysis
  – Smartphones
Known vectors
• PAN Gathering for subsequent CNP e-
  commerce fraud
  – Fake point-of-sale device, e.g. selling candies
  – Customers pays with his card
  – Card details are used in CNP e-commerce fraud
• Relay attacks
  – Two NFC-enabled smartphones
  – Implements known EMV attacks using the relay
New vectors
• Power analysis
  – Card draws power from the same RF field that is
    used for data transfer
• Smartphones
  – Direct access to secure element
  – Consider all those rooted Androids…
Modern payments security:
             EMV, NFC, etc.?
Intro: Payment Cards

The EMV standard

Attacks on EMV

Intro: NFC

EMV & NFC = ?

Attacks on EMV & NFC

Future
Future
• Industry strengths
  – Security by obscurity
• Industry weaknesses
  – Security by obscurity
• New technology
  – Stronger cryptography
• Perspectives
  – EMV
  – NFC
  – etc.?
Abdullin   modern payments security. emv, nfc, etc

Contenu connexe

Tendances

How an online payment gateway works
How an online payment gateway worksHow an online payment gateway works
How an online payment gateway worksIkajo International
 
EMV Card Migration: How the EMV Transaction Flow Works
EMV Card Migration: How the EMV Transaction Flow WorksEMV Card Migration: How the EMV Transaction Flow Works
EMV Card Migration: How the EMV Transaction Flow WorksAnnMargaret Tutu (AMT)
 
Epayments system in India and globally iit project
Epayments system in India and globally iit project Epayments system in India and globally iit project
Epayments system in India and globally iit project abhiROCKS1103
 
Online payment gateway provider
Online payment gateway providerOnline payment gateway provider
Online payment gateway providerPayment Gateways
 
Moneypad- The future wallet
Moneypad- The future walletMoneypad- The future wallet
Moneypad- The future walletMokshada Birari
 
Payment gateway/payment service providers and future trends in mobile payment...
Payment gateway/payment service providers and future trends in mobile payment...Payment gateway/payment service providers and future trends in mobile payment...
Payment gateway/payment service providers and future trends in mobile payment...Danail Yotov
 
AN ATM WITH AN EYE BY SAIKIRAN PANJALA
AN  ATM WITH  AN  EYE BY SAIKIRAN PANJALAAN  ATM WITH  AN  EYE BY SAIKIRAN PANJALA
AN ATM WITH AN EYE BY SAIKIRAN PANJALASaikiran Panjala
 
Payment gateway
Payment gatewayPayment gateway
Payment gatewayHananBahy
 

Tendances (20)

How an online payment gateway works
How an online payment gateway worksHow an online payment gateway works
How an online payment gateway works
 
Digital wallet
Digital walletDigital wallet
Digital wallet
 
EMV Card Migration: How the EMV Transaction Flow Works
EMV Card Migration: How the EMV Transaction Flow WorksEMV Card Migration: How the EMV Transaction Flow Works
EMV Card Migration: How the EMV Transaction Flow Works
 
Digital wallet
Digital walletDigital wallet
Digital wallet
 
Mobile wallets
Mobile walletsMobile wallets
Mobile wallets
 
Mobile payment
Mobile paymentMobile payment
Mobile payment
 
Epayments system in India and globally iit project
Epayments system in India and globally iit project Epayments system in India and globally iit project
Epayments system in India and globally iit project
 
Payment Gateway
Payment GatewayPayment Gateway
Payment Gateway
 
Online payment gateway provider
Online payment gateway providerOnline payment gateway provider
Online payment gateway provider
 
Moneypad
MoneypadMoneypad
Moneypad
 
Peer to-peer mobile payments
Peer to-peer mobile paymentsPeer to-peer mobile payments
Peer to-peer mobile payments
 
Digital wallet
Digital walletDigital wallet
Digital wallet
 
Digital payment
Digital paymentDigital payment
Digital payment
 
Mobile Payment fraud & risk assessment
Mobile Payment fraud & risk assessmentMobile Payment fraud & risk assessment
Mobile Payment fraud & risk assessment
 
E wallet- final
E wallet- finalE wallet- final
E wallet- final
 
Moneypad- The future wallet
Moneypad- The future walletMoneypad- The future wallet
Moneypad- The future wallet
 
Payment gateway/payment service providers and future trends in mobile payment...
Payment gateway/payment service providers and future trends in mobile payment...Payment gateway/payment service providers and future trends in mobile payment...
Payment gateway/payment service providers and future trends in mobile payment...
 
AN ATM WITH AN EYE BY SAIKIRAN PANJALA
AN  ATM WITH  AN  EYE BY SAIKIRAN PANJALAAN  ATM WITH  AN  EYE BY SAIKIRAN PANJALA
AN ATM WITH AN EYE BY SAIKIRAN PANJALA
 
Digital payment merchants
Digital payment merchantsDigital payment merchants
Digital payment merchants
 
Payment gateway
Payment gatewayPayment gateway
Payment gateway
 

En vedette

“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...
“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...
“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...Andrey Belenko
 
Understanding the Role of Hardware Data Encryption in EMV and P2PE
Understanding the Role of Hardware Data Encryption in EMV and P2PEUnderstanding the Role of Hardware Data Encryption in EMV and P2PE
Understanding the Role of Hardware Data Encryption in EMV and P2PEGreg Stone
 
NFC documation
NFC documationNFC documation
NFC documationSaiprasad
 
End-to-End Encryption for Credit Card Processing
End-to-End Encryption for Credit Card ProcessingEnd-to-End Encryption for Credit Card Processing
End-to-End Encryption for Credit Card ProcessingLennon808
 
Near Field Communications (NFC) Technology & Measurements
Near Field Communications (NFC) Technology & MeasurementsNear Field Communications (NFC) Technology & Measurements
Near Field Communications (NFC) Technology & MeasurementsRohde & Schwarz North America
 

En vedette (8)

“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...
“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...
“Secure Password Managers” and “Military-Grade Encryption” on Smartphones: Oh...
 
Understanding the Role of Hardware Data Encryption in EMV and P2PE
Understanding the Role of Hardware Data Encryption in EMV and P2PEUnderstanding the Role of Hardware Data Encryption in EMV and P2PE
Understanding the Role of Hardware Data Encryption in EMV and P2PE
 
Cryptography
CryptographyCryptography
Cryptography
 
NFC documation
NFC documationNFC documation
NFC documation
 
End-to-End Encryption for Credit Card Processing
End-to-End Encryption for Credit Card ProcessingEnd-to-End Encryption for Credit Card Processing
End-to-End Encryption for Credit Card Processing
 
HSM Basic Training
HSM Basic TrainingHSM Basic Training
HSM Basic Training
 
Payment Hsm Payshield9000
Payment Hsm Payshield9000Payment Hsm Payshield9000
Payment Hsm Payshield9000
 
Near Field Communications (NFC) Technology & Measurements
Near Field Communications (NFC) Technology & MeasurementsNear Field Communications (NFC) Technology & Measurements
Near Field Communications (NFC) Technology & Measurements
 

Similaire à Abdullin modern payments security. emv, nfc, etc

Atm technology and operations
Atm technology and operationsAtm technology and operations
Atm technology and operationsAnil Chaurasiya
 
Magnetic stripe on the back of credit card
Magnetic stripe on the back of credit cardMagnetic stripe on the back of credit card
Magnetic stripe on the back of credit cardVaishnavi
 
Hack in Cash out OWASP London
Hack in Cash out OWASP LondonHack in Cash out OWASP London
Hack in Cash out OWASP LondonPayment Village
 
Credit Cards & Smart Cards - Darkside
Credit Cards & Smart Cards - DarksideCredit Cards & Smart Cards - Darkside
Credit Cards & Smart Cards - DarksideFilipe Mello
 
ELECTRONIC PAYMENT SYSTEM
ELECTRONIC PAYMENT SYSTEMELECTRONIC PAYMENT SYSTEM
ELECTRONIC PAYMENT SYSTEM60ml
 
Electronic payment system
Electronic payment systemElectronic payment system
Electronic payment system60ml
 
Embedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryEmbedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryNarudom Roongsiriwong, CISSP
 
Know Your Credit Cards
Know Your Credit CardsKnow Your Credit Cards
Know Your Credit CardsJian Kang
 
EMV Payments: Changes at the Point of Sale
EMV Payments: Changes at the Point of SaleEMV Payments: Changes at the Point of Sale
EMV Payments: Changes at the Point of Sale- Mark - Fullbright
 
How do at ms work.ppt
How do at ms work.pptHow do at ms work.ppt
How do at ms work.pptNaveen Sihag
 
Card payment evolution v1.0
Card payment evolution v1.0Card payment evolution v1.0
Card payment evolution v1.0Nugroho Gito
 
The Target Breach – Follow The Money
The Target Breach – Follow The MoneyThe Target Breach – Follow The Money
The Target Breach – Follow The MoneyResilient Systems
 
Iiw13 identifying with_your_bank
Iiw13 identifying with_your_bankIiw13 identifying with_your_bank
Iiw13 identifying with_your_bankSteve Sidner
 
Pay your payments safely merchant account services by jay wigdore
Pay your payments safely  merchant account services by jay wigdorePay your payments safely  merchant account services by jay wigdore
Pay your payments safely merchant account services by jay wigdoreJayWigdore
 
The electronic payment systems
The electronic payment systemsThe electronic payment systems
The electronic payment systemsVishal Singh
 

Similaire à Abdullin modern payments security. emv, nfc, etc (20)

Sploitego
SploitegoSploitego
Sploitego
 
Atm technology and operations
Atm technology and operationsAtm technology and operations
Atm technology and operations
 
What is A Smart Card
What is A Smart CardWhat is A Smart Card
What is A Smart Card
 
EMV Credit Card Technology in Parking
EMV Credit Card Technology in ParkingEMV Credit Card Technology in Parking
EMV Credit Card Technology in Parking
 
Magnetic stripe on the back of credit card
Magnetic stripe on the back of credit cardMagnetic stripe on the back of credit card
Magnetic stripe on the back of credit card
 
Hack in Cash out OWASP London
Hack in Cash out OWASP LondonHack in Cash out OWASP London
Hack in Cash out OWASP London
 
Credit Cards & Smart Cards - Darkside
Credit Cards & Smart Cards - DarksideCredit Cards & Smart Cards - Darkside
Credit Cards & Smart Cards - Darkside
 
ELECTRONIC PAYMENT SYSTEM
ELECTRONIC PAYMENT SYSTEMELECTRONIC PAYMENT SYSTEM
ELECTRONIC PAYMENT SYSTEM
 
Electronic payment system
Electronic payment systemElectronic payment system
Electronic payment system
 
Embedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryEmbedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment Industry
 
Know Your Credit Cards
Know Your Credit CardsKnow Your Credit Cards
Know Your Credit Cards
 
Atm’s
Atm’sAtm’s
Atm’s
 
EMV Payments: Changes at the Point of Sale
EMV Payments: Changes at the Point of SaleEMV Payments: Changes at the Point of Sale
EMV Payments: Changes at the Point of Sale
 
How do at ms work.ppt
How do at ms work.pptHow do at ms work.ppt
How do at ms work.ppt
 
Card payment evolution v1.0
Card payment evolution v1.0Card payment evolution v1.0
Card payment evolution v1.0
 
The Target Breach – Follow The Money
The Target Breach – Follow The MoneyThe Target Breach – Follow The Money
The Target Breach – Follow The Money
 
EMV 201 EMF June 2016
EMV 201 EMF June 2016EMV 201 EMF June 2016
EMV 201 EMF June 2016
 
Iiw13 identifying with_your_bank
Iiw13 identifying with_your_bankIiw13 identifying with_your_bank
Iiw13 identifying with_your_bank
 
Pay your payments safely merchant account services by jay wigdore
Pay your payments safely  merchant account services by jay wigdorePay your payments safely  merchant account services by jay wigdore
Pay your payments safely merchant account services by jay wigdore
 
The electronic payment systems
The electronic payment systemsThe electronic payment systems
The electronic payment systems
 

Plus de DefconRussia

[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...DefconRussia
 
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...DefconRussia
 
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobindingDefconRussia
 
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/LinuxDefconRussia
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangDefconRussia
 
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC [DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC DefconRussia
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...DefconRussia
 
HTTP HOST header attacks
HTTP HOST header attacksHTTP HOST header attacks
HTTP HOST header attacksDefconRussia
 
Attacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринAttacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринDefconRussia
 
Weakpass - defcon russia 23
Weakpass - defcon russia 23Weakpass - defcon russia 23
Weakpass - defcon russia 23DefconRussia
 
nosymbols - defcon russia 20
nosymbols - defcon russia 20nosymbols - defcon russia 20
nosymbols - defcon russia 20DefconRussia
 
static - defcon russia 20
static  - defcon russia 20static  - defcon russia 20
static - defcon russia 20DefconRussia
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20DefconRussia
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20DefconRussia
 
Nedospasov defcon russia 23
Nedospasov defcon russia 23Nedospasov defcon russia 23
Nedospasov defcon russia 23DefconRussia
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23DefconRussia
 
Miasm defcon russia 23
Miasm defcon russia 23Miasm defcon russia 23
Miasm defcon russia 23DefconRussia
 
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...DefconRussia
 
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхSergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхDefconRussia
 

Plus de DefconRussia (20)

[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...[Defcon Russia #29] Борис Савков -  Bare-metal programming на примере Raspber...
[Defcon Russia #29] Борис Савков - Bare-metal programming на примере Raspber...
 
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
[Defcon Russia #29] Александр Ермолов - Safeguarding rootkits: Intel Boot Gua...
 
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding[Defcon Russia #29] Алексей Тюрин - Spring autobinding
[Defcon Russia #29] Алексей Тюрин - Spring autobinding
 
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
[Defcon Russia #29] Михаил Клементьев - Обнаружение руткитов в GNU/Linux
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golang
 
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC [DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
[DCG 25] Александр Большев - Never Trust Your Inputs or How To Fool an ADC
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
Олег Купреев - Обзор и демонстрация нюансов и трюков из области беспроводных ...
 
HTTP HOST header attacks
HTTP HOST header attacksHTTP HOST header attacks
HTTP HOST header attacks
 
Attacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей ТюринAttacks on tacacs - Алексей Тюрин
Attacks on tacacs - Алексей Тюрин
 
Weakpass - defcon russia 23
Weakpass - defcon russia 23Weakpass - defcon russia 23
Weakpass - defcon russia 23
 
nosymbols - defcon russia 20
nosymbols - defcon russia 20nosymbols - defcon russia 20
nosymbols - defcon russia 20
 
static - defcon russia 20
static  - defcon russia 20static  - defcon russia 20
static - defcon russia 20
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
Nedospasov defcon russia 23
Nedospasov defcon russia 23Nedospasov defcon russia 23
Nedospasov defcon russia 23
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
 
Miasm defcon russia 23
Miasm defcon russia 23Miasm defcon russia 23
Miasm defcon russia 23
 
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
Andrey Belenko, Alexey Troshichev - Внутреннее устройство и безопасность iClo...
 
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условияхSergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
Sergey Belov - Покажите нам Impact! Доказываем угрозу в сложных условиях
 

Abdullin modern payments security. emv, nfc, etc

  • 1. Modern payments security: EMV, NFC, etc.? Nikita Abdullin nabdullin@gmail.com 19.11.2012
  • 2. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 3. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 4. About me Not a black khat :)
  • 5. Intro: Payment cards • What will we cover today: – Payment technologies from the real world • EMV (Europay, MasterCard and Visa) – EMV-enabled integrated circuit cards & terminals • NFC (Near Field Communication) – Payment applications of NFC – Attacks and countermeasures • Classification • Known vectors • New vectors
  • 6. Intro: Payment cards • Why talk about it? – Real-world means: • Financial institutes – obscure and weird • Ubiquity • Hardware • Attacks in space and time – Strict standardization – Purely virtual payment technologies are all different and rapidly changing • Anyone can implement his own – And we are talking about serious business
  • 7. Intro: Payment cards • Nilson Report, 2011 – The total number of purchases on all major worldwide card issuers (American Express, Diners Club, JCB, MasterCard, UnionPay and Visa) increased to a total of 135.33 billion, up 12.1 percent from 2010 on an additional 14.56 billion transactions, the report said.
  • 8. Intro: Payment cards • Cards International: – Predict 30% annual growth of Russian payment cards market – $ 100 Billion by 2012
  • 9. Intro: Payment cards • As of early 2011, 1.2 billion EMV cards were deployed across the globe along with 18.7 million EMV terminals (via IBID) • Over a billion smartphones sold by 2012 • By 2014, 44% of smartphones will be NFC- compatible (via) • Payment card users in Russia: Spring 2011 to Spring 2012: from 49% to 56% (via GfK Rus).
  • 10. Intro: Payment cards • History – Origins: 1890s – Appearance: 1920s – Popularity: Mid XX century – 1950: Diners Club – 1958: American Express – 1958: Bank of America BankAmericards (now Visa) – 1966: InterBank Card Association (now MasterCard) – 1967: Cash dispencer – 1969: First ATM and magnetic stripe
  • 11. Meet the Card Gentlemen, do you know what this thing is?
  • 12. Card standards • Standards family ISO/IEC 781X • 7810: Physical characteristics of credit card size document • 7811-1: Embossing • 7811-2: Magnetic stripe–low coercitivity • 7811-3: Location of embossed characters • 7811-4: Location of tracks 1 & 2 • 7811-5: Location of track 3 • 7811-6: Magnetic stripe-high coercitivity • 7813: Financial transaction cards
  • 13. Card exterior Front: PAN(4), expiry date(6), Back: Magnetic stripe (1), Cardholder name(7) cardholder signature(2), CVV2 (2)
  • 14. PAN • PAN Personal Account Number – From 13 to 19 digits – First 4 to 6 digits = BIN • Bank identification number – Last digit is a checksum digit (Luhn digit) • Checksum is calculated with Luhn algorithm
  • 15. Magnetic Stripe • LoCo (Low coercitivity) • HiCo (High coercitivity) • Tracks – Track 1: – Track 2: – (Track 3) – mostly unused
  • 16. Magnetic Stripe Data entity Track 1 Track2 PAN + + Cardholder name + Expiry date + + Service code + + Discretionary data: PVKI + + PVV + + CVC-1 (CVV-1) + +
  • 17. Meet the Terminal • Terminal types: – ATM (Automated Teller Machine) – POS (Point Of Sale) – Imprinter – Others • SSD
  • 18. Terminal Hardware • All devices: – Card Reader – PED (PIN Entry Device) – Receipt printer – Screen • ATM: – Note cassettes inside a safe box – Note dispencer – (Note acceptor)
  • 19. Payment Systems • Why? – If N banks around the world want to accept each other’s cards, how many connections they would need? (Hint: N ( N2 1) ) • IPS bring standards & interoperability – Each IPS defines its own protocols and procedures • Direct connections are also used – Member bank connects directly to the IPS – Affiliates connect to the Member – IPS can act as an acquirer for the largest retailers
  • 23. Payment Systems • Notable IPS (International Payment Systems) – Visa – MasterCard (MC) – Japan Credit Bureau (JCB) – Diners Club (DC) – American Express (AMEX) – China Union Pay (CUP)
  • 24. Cryptography & Security • Plastic – Holograms – Watermarks • Cryptography – DES (Replaced by DES) – 3DES • 3DES, mode: EDE, 2 keys: ABA
  • 25. Cryptography & Security • Cardholder Authentication (Verification) – PIN – PVK (PIN Verification Key) – PVV (PIN Verification Value) – PVV = ENC(PVK)[f(PAN, PIN)] by issuer • Card Authentication (Verification) – CVV/CVC and CVV2/CVC2 – CVK (Card Verification Key) – CVV = ENC(CVK)[f(PAN || ExpDate || SvcCode)] by issuer – CVV2 = ENC(CVK)[f(PAN || ExpDate || ‘000’)] by issuer
  • 26. Cryptography & Security • Encryption – PEK (PIN Encryption Key) – TPK (Terminal PIN Key) – TMK (Terminal Master Key) – Domain encryption • ZMK/ZCMK (Zone (Control) Master Key) • AWK (Acquirer Working Key) • IWK (Issuer Working Key) – Proprietary measures • MAC by terminal • Transport-level encryption
  • 27. Cryptography & Security • HSM (Host Security Module) – Host command interface – Console admin interface • Smart cards for security officer authetication and master key storage – PKCS#11 API – LMK (Local Master Key) – Standards compliance • FIPS 140-1, FIPS 140-2/140-3 • PIN Printer – A secure printer directly connected to HSM
  • 28. Processing cycle • Cardholder – Receive a card and sign it manually – Open PIN Envelope, read it and burn it • Issuer – Personalization – Embossing – Encoding – Issuer’s Host software • Authorization processing • Presentment processing • Card – Card is just a static read-only piece of plastic
  • 29. Processing cycle • Acquirer – Manages terminals and provides services to merchants – Acquirer’s host software • Authorization processing • Presentment processing • Terminal – Reads card – Talks to acquirer’s host
  • 30. Processing cycle • Transaction phases – Authorization – Clearing – Settlement – Dispute resolution
  • 31. Authorization • Terminal reads card • If cardholder enters PIN: – Terminal calculates a PIN Block inside PED – PIN Block is encrypted under corresponding TPK • Auth message is sent to Acquirer’s host • Acquirer processes it and sends to IPS • IPS processes it and sends to Issuer • Issuer approves or rejects it and sends the answer back
  • 32. Clearing • Terminal reconciliation • Acquirer demands satisfaction from the issuer and sends the clearing presentments through the IPS • IPS processes them and sends them to the Issuer • Issuer may not respond, money transfer is automatically performed at the next stage
  • 33. Settlement • All parties settle their financial positions through the IPS – Consolidated funds transfer
  • 34. Dispute resolution • Presentment: Original Sale • First Chargeback: A customer disputes a charge to his or her credit card company or bank and the bank responds with a retrieval request to dispute the transaction. • Second Presentation or Re-presentment: This is when the merchant has an opportunity to respond to the first chargeback. • Second Chargeback: If the second presentment is rejected by the cardholder, the issuing bank files a second chargeback. • IPS Arbitration: IPS staff handle the case manually
  • 35. Data transfer • ISO 8583 Standard – Binary protocol – Presence of a fields is determined by bitmap • N x 64-bit bitmaps – Fields may be fixed or variable – Data may be encoded in raw binary, ASCII, BCD, etc. • The same for variable fields length
  • 36. Terminal protocols • Terminals usually talk to acquirer’s host in their special protocols – ATM – POS – SSD • But some are built over ISO8583
  • 37. Transaction types • ATM • Retail • CNP Retail • Note Acceptance • Special – Balance request – PIN Set/PIN Change – Address Verification
  • 38. Fraud • PAN + Exp Date + CVV2 = enough for CNP fraud – CNP Fraud • Skimming – Cloning of magstripe with and w/o stealing the PIN – Clone is identical to the original card – http://www.google.com/trends/explore?#q=skimming • Other methods
  • 41. Advances & countermeasures • DUKPT – Derived Unique Key Per Transaction • Anti-skimming – Terminal-only – Card and terminal • Magstipe is analog, not digital • e-commerce – (SET) – 3-D Secure • Finally, smart cards (ICC)
  • 43. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 44. The EMV standard • What? – A protected microcontroller inside a card – Since 1993 • Why? – New interactive products – Liability Shift • The Four Books – ICC to Terminal Interface – Security and Key Management – Application Specification – Other Interfaces • ISO 7816
  • 45. The EMV standard • What does the card use: – DES/3DES – RSA – SHA-1 • What does the card have: – Several kilobytes of EEPROM – Firmware • Java Card • MultOS • … – 1 Serial I/O port and a system of commands
  • 46. The EMV standard • EMV Lifecycle – EMV Personalization • Pre-personalization – Interactivity • Card makes the decision • New cardholder authentication methods – Biometrics • Issuer scripts and data storage – Counters – Card-level risk management
  • 47. EMV basics • Physical specs • I/O • Files • Commands • Applications
  • 50. Physical specs • Voltage: 3 classes of operation –A –B –C
  • 51. I/O • Insertion of the ICC into the IFD – connection and activation of the contacts. • Reset of the ICC – establishment of communication between the terminal and the ICC. • Execution of the transaction(s). • Deactivation of the contacts and removal of the ICC
  • 52. I/O • Contact activation – Vcc level validation for 200 cycles • ICC Reset – Cold • > 200 cycles and pull up RST – Warm • > 200 cycles, pull down RST, > 200 cycles, pull up RST
  • 53. I/O Rx (Card to Terminal) Tx (Terminal to Card)
  • 54. Files • All data on card is stored as records listed in files • Mandatory – Application Expiry Date – Application Primary Account Number (PAN) – Card Risk Management Data Object List 1 (CDOL1) – Card Risk Management Data Object List 2 (CDOL2) • Application Elementary Files – Referenced by SFI – Contain only BERTLV data objects
  • 55. Commands • Command APDU – CLA = Class Byte of the Command Message – INS = Instruction Byte of Command Message – P1 = Parameter 1 – P2 = Parameter 2
  • 56. Response • Response APDU – Status bytes • SW1 • SW2
  • 57. Commands • APPLICATION BLOCK (post-issuance command) • APPLICATION UNBLOCK (post-issuance command) • CARD BLOCK (post-issuance command) • EXTERNAL AUTHENTICATE – verify a cryptogram • GENERATE APPLICATION CRYPTOGRAM • GET CHALLENGE • GET DATA • GET PROCESSING OPTIONS • INTERNAL AUTHENTICATE – calculation of SDA • PIN CHANGE/UNBLOCK (post-issuance command) • READ RECORD • VERIFY – verify PIN data
  • 58. EMV crypto primitives • MKAC that it shares with the issuer, derived from the issuer’s master key MKI . • Session key SKAC can be computed, based on the transaction counter. • The issuer has a public-private key pair (PI , SI), and the terminal knows this public key PI • Cards that support asymmetric crypto also have a public-private key pair (PIC , SIC ).
  • 59. EMV Transaction Flow • Initialization • Card/Data authentication – optional • Cardholder verififcation – optional • Actual transaction step
  • 60. Initialization • Command flow – T → C: SELECT APPLICATION – C → T: [PDOL] – T → C: GET PROCESSING OPTIONS [(data specified by the PDOL)] – C → T: (AIP, AFL) – Repeat for all records in the AFL: – T → C: READ RECORD (i) – C → T: (Contents of record i) • Return AFL and AIP
  • 61. Card/Data authentication • SDA (Static Data Authentication) – Card provides Signed Static Application Data (SSAD) • DDA (Dynamic Data Authentication) – SDA + Sign(SIC)[ICC Dynamic Data, Hash(ICC Dynamic Data, data specified by DDOL)] • CDA (Combined Data Authentication) – SDAD = Sign(SIC)[nonce_IC , CID, AC, TDHC, H(nonce_IC , CID, AC, TDHC, nonce_Terminal].
  • 62. Cardholder verification • CVM (Cardholder Verification Methods) – CVM List • Online PIN – the bank checks the PIN • Offline plaintext PIN – the chip checks the PIN – PIN is transmitted to the chip in the clear form • Offline encrypted PIN – chip checks the PIN – PIN is encrypted before it is sent to the card
  • 63. Offline plaintext PIN • T → C: VERIFY(pin) • C → T: Success/ (PIN failed, tries left) / Failed
  • 64. Offline encrypted PIN • T → C: GET CHALLENGE • C → T: nonce_IC • T → C: VERIFY(Encrypt (PIC)[PIN, nonce_IC , random padding]) • C → T: Success/ (PIN failed, tries left) / Failed
  • 65. Transaction step • Offline – card sends a Transaction Certificate (TC) • Online – card sends an Authorisation Request Cryptogram (ARQC) – If issuer approves, card sends a TC • If card itself refuses – Card provides Application Authentication Cryptogram (AAC)
  • 66. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 67. Attacks on EMV • Classification – Hardware vs. Software – Active vs. Passive – Intrusive vs. Non-intrusive – By localization: – By methods used
  • 68. Attacks on EMV • Classification – By localization: • Malicious card • Malicious terminal • MITM
  • 69. Attacks on EMV • Classification – By methods used • Communication lines eavesdropping & tampering • Purely cryptoanalytical methods • Fault attacks • Side-channel attacks – Power analysis » SPA (Single Power Analysis) » DPA (Differential Power Analysis) » DFA (Differential Fault Analysis) – TAA (Timing Analysis Attack) • Social Engineering
  • 70. Known vectors • Fallback to magstripe • Relay attacks • Replay attacks (“YES”-cards = clones of SDA card) • MITM (Wedge) with CVM list downgrade • Pre-play attack • Joint encryption and signature • Fault analysis • Power analysis • Attacking HSM's
  • 71. MITM (Wedge) with CVM list downgrade • Terminal might not check if authentication method is the same that the card approved – Only auth result is signed • Make the card think it was a signature-based transaction • Make the terminal think it was a PIN-based transaction • Easily prevented – by correct terminal software • Detected at host
  • 72. Pre-play attack • Bond et al., Cambridge, 2012 • Random nonce sent by terminal? • In reality it is not so random – Older implementations • So a MITM device can gather a lot of cryptograms for known nonces • Then just predict when this cryptogram will be correct and use it with fake transaction data
  • 73. Joint encryption and signature attack • Degabriele et al., CT-RSA 2012 • CDA cards • Offline transaction, card verifies PIN • Utilize known padding of encrypted EMV data – Bleichenbacher attack on RSA • Same RSA keypair used for signature and encryption
  • 74. Joint encryption and signature
  • 75. Fault analysis • Coron et al., CT-RSA 2010 • Currently CRT (Chinese Remainder Theorem) is used to reduce computational load on signer in RSA implementations – From mod N to mod p and mod q – Fault induced on one computation of two – “CJKNP” attack on RSA, 2009 • Partially unknown plaintexts • Consider EMV DDA: – Signed data includes partially known ASN.1 header – Attack uses orthogonal lattice techniques – Attack requires 10 faulty signatures to factor N under 1 second
  • 76. Attacking HSM’s • EMV introduced new crypto primitives to be implemented on existing, non-flexible systems with decades of backward compatibility – The new crypto functions may have been implemented improperly • An attack by Ben Adida et al. and Ron Rivest (2005) on 3DES CBC MAC – Inject chosen plaintext in the MAC’ed message – Disclose encryption key – Two implementations • IBM 4758 • Thales RG7000 • Modern systems are not vulnerable
  • 77. Countermeasures • Technical – Improve terminal software (!) – Improve host software – Improve personalization restrictions • Obey payment systems’ regulations – Distance Bounding • Saar Drimer and Steven J. Murdoch, Cambridge – Cardholder self-defence • Steven J. Murdoch, Cambridge • Invent an "Electronic attorney“ – legitimate cardholder’s shim (!?) • Organizational – Verify from the business level – Improve standards coverage
  • 78. Future • Elliptic curves – ECIES (ISO/IEC 18033-2) for PIN – EC-DSA / EC-Schnorr (ISO/IEC 14888-3:2006) for signatures • More complex chip applets – More authentication schemes • Interactive cards with keyboard and display – More bugs? • Fast and more expensive ICC chips – Stronger crypto – Difficult and less practical hardware attacks
  • 79. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 80. Intro: NFC • RFID – Radio Frequency Identification technologies – LF (Low frequency) • 125 KHz • 134 KHz – HF (High frequency) • 13.56 MHz – NFC » ISO/IEC 18092 (ECMA-340) » ISO/IEC 14443 » ISO/IEC 15693 – Others
  • 81. NFC • NFC Devices – Tags – Smart cards – Readers – Mobile devices • NFC Security – NFC Ready and NFC Secure – Secure Element – Authentication – Encryption
  • 82. NFC Data Transfer • NFC Roles by RF field source: Device A Device B Description Active Active RF field is generated by the device that sends data at the moment Active Passive RF field is generated by Device A only Passive Active RF field is generated by Device B only • NFC Roles by protocol: Initiator Target Active Possible Possible Passive Not Possible Possible
  • 83. NFC Device Modes of Operation • Data exchange (P2P – NFC peer-to-peer) – Duplex data exchange – WiFi, Bluetooth, P2P Payment, Contacts, vCards, … • Reader/Writer mode (PCD – Proximity Coupling Device) – Mobile device reads tags/smartcards – WiFi Config, media linking • Tag emulation (PICC – Proximity Card) – Reader cannot distinguish between smartcard & tag emulation – Handset may contain/emulate multiple smartcards (smartcard chips)
  • 84. NFC Security • Eavesdropping is easy (up to 10 meters in active mode) • DoS is easy • Datastream modification is possible • MITM is possible using full relay (when Alice and Bob can not talk to each other at all) – No NFC shims, unless some RF-shielding nano-materials appear :) – A fast relay is a practical attack both for eavesdropping and data tampering • Secure element • Additional levels of security are out of scope of NFC standards – Proprietary implementations
  • 85. Secure element • Smart Card Alliance: “The secure element (SE) is a secure microprocessor (a smart card chip) that includes a cryptographic processor to facilitate transaction authentication and security, and provide secure memory for storing payment applications (e.g., American Express, Discover, MasterCard, Visa and other payment applications). SEs can also support other types of secure transactions, such as transit payment and ticketing, building access, or secure identification.”
  • 86. Secure element • Secure elements in consumer devices – Contactless smart card – NFC SIM card + Handheld device • RF interface on handheld • Integrated RF interface • Flexible antenna – NFC SD Card + Handheld device • RF interface on handheld • Integrated RF interface – SE Embedded in a chip in a handheld device • RF interface on handheld
  • 87. NFC Security • Secure Element is as secure as a regular (contactless) smartcard – Same security features – Same weaknesses • Side channels – Main weakness: Relay attack • Cannot be prevented by application-layer cryptographic protocols • Timing requirements by ISO 14443 are too loose to prevent relay over longer channel – Real devices may be even more relaxed to produce less timeouts in real life for the customers
  • 88. NFC Reality • Mifare – Proprietary near-ISO compliant cards by Philips (NXP) – Worldwide deployment • European transport: subways, intercity trains... • Asia, South America, ... • Ski passes at modern ski resorts • ... finally, Moscow & Saint-Petersburg subway tickets
  • 89. NFC Reality • Mifare security – MIFARE Ultralight – no encryption – Mifare Classic • Uses a weak crypto algorithm “Crypto-1”, 48-bit key • First attacks in 2000’s • Algorithm fully reverse-engineered from chip by 2008 – Insecure, minutes to retrieve secret key and fully clone card – Mifare DESFire • 3DES / AES • Successful DPA attack on 3DES Mifare DESFire in 2011
  • 90. NFC Reality • Vulnerable smartphones – Various • Attacks on NFC P2P • JSR-177 – Android • Currently deployed custom stacks and drivers • Linux standard NFC stack • Userland vulnerabilites on handling NFC data
  • 91. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 92. EMV & NFC = ? • EMV & NFC = ? – EMV-compliant chip is a secure element – So we have contactless payment cards: • Visa PayWave • MasterCard PayPass • etc. – Mostly: dual interface (contacts + coil) for backward compatibility (some even have magstripe) – Personalized by contact and contactless interfaces alike – New threats
  • 93. EMV & NFC = ? • Low-amount payments with little to no cardholder verification – Local transport tickets – Small retail purchases – Even cash withdrawal – … • An EMV card embedded inside a smartphone – Total payment convergence – Smartphone’s screentouch screen – Multi-application EMV
  • 94. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 95. Attacks on EMV & NFC • Known vectors – PAN Gathering for subsequent CNP online fraud • Fake point-of-sale device – Relay attacks • Two NFC-enabled smartphones • New vectors – Power analysis – Smartphones
  • 96. Known vectors • PAN Gathering for subsequent CNP e- commerce fraud – Fake point-of-sale device, e.g. selling candies – Customers pays with his card – Card details are used in CNP e-commerce fraud • Relay attacks – Two NFC-enabled smartphones – Implements known EMV attacks using the relay
  • 97. New vectors • Power analysis – Card draws power from the same RF field that is used for data transfer • Smartphones – Direct access to secure element – Consider all those rooted Androids…
  • 98. Modern payments security: EMV, NFC, etc.? Intro: Payment Cards The EMV standard Attacks on EMV Intro: NFC EMV & NFC = ? Attacks on EMV & NFC Future
  • 99. Future • Industry strengths – Security by obscurity • Industry weaknesses – Security by obscurity • New technology – Stronger cryptography • Perspectives – EMV – NFC – etc.?