10.08.2015 Views

Chip & PIN is definitely broken Credit Card skimming ... - CanSecWest

Chip & PIN is definitely broken Credit Card skimming ... - CanSecWest

Chip & PIN is definitely broken Credit Card skimming ... - CanSecWest

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong><strong>Credit</strong> <strong>Card</strong> <strong>skimming</strong> and <strong>PIN</strong> harvestingin an EMV worldAndrea Bar<strong>is</strong>aniDaniele BiancoAdam LaurieZac FrankenCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


What <strong>is</strong> EMV?EMV stands for Europay, Master<strong>Card</strong> and VISA, the globalstandard for inter-operation of integrated circuit cards (IC cardsor "chip cards") and IC card capable point of sale (POS) terminalsand automated teller machines (ATMs), for authenticating creditand debit card transactions.IC card systems based on EMV are being phased in across theworld, under names such as "IC <strong>Credit</strong>" and "<strong>Chip</strong> and <strong>PIN</strong>".Source: WikipediaCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Why EMV?ICC / smartcardimproved security over ex<strong>is</strong>ting magnetic stripe technology“offline” card verification and transaction approvalmultiple applications on one cardCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Liability shiftliability shifts away from the merchant to the bank in mostcases (though if merchant does not roll EMV then liabilityexplicitly shifts to it)however the cardholder <strong>is</strong> assumed to be liable unless theycan unquestionably prove they were not present for thetransaction, did not authorize the transaction, and did notinadvertently ass<strong>is</strong>t the transaction through <strong>PIN</strong> d<strong>is</strong>closure<strong>PIN</strong> verification, with the help of EMV, increasingly becomes“proof” of cardholder presenceCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Liability shiftVISA Zero Liability fine print (US):Does not apply to ATM transactions, <strong>PIN</strong> transactions not processed by V<strong>is</strong>a, orcertain commercial card transactions. Individual prov<strong>is</strong>ional credit amounts areprovided on a prov<strong>is</strong>ional bas<strong>is</strong> and may be withheld, delayed, limited, orrescinded by your <strong>is</strong>suer based on factors such as gross negligence or fraud,delay in reporting unauthorized use, investigation and verification of claim andaccount standing and h<strong>is</strong>tory. You must notify your financial institutionimmediately of any unauthorized use. Transaction at <strong>is</strong>sue must be posted toyour account before prov<strong>is</strong>ional credit may be <strong>is</strong>sued. For specific restrictions,limitations and other details, please consult your <strong>is</strong>suer.Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV adoption03/2006 EPC <strong>Card</strong> Fraud Prevention Task Force presentation:“Ban of magstripe fallback foreseen (date to be decided)”as of 03/2011 magstripe fallback <strong>is</strong> still accepted pretty mucheverywhereCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV <strong>is</strong> <strong>broken</strong>S. J. Murdoch, S. Drimer, R. Anderson, M. Bond, “<strong>Chip</strong> and <strong>PIN</strong><strong>is</strong> Broken” - University of Cambridgethe excellent group of researchers from Cambridge provedthat stolen cards can be successfully used without knowing the<strong>PIN</strong>the industry claims difficult practicality of the attacks, at leastone bank rolled out detection/blocking proceduresCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Skimming, Cloning and <strong>PIN</strong> harvestingskimmer: hidden electronic device that intercepts card terminal communication and collects available datawe analyze the practicality of credit card information<strong>skimming</strong>, cloning and <strong>PIN</strong> harvesting on POS terminalswe intentionally ignore magstripe <strong>skimming</strong> (which <strong>is</strong> stilleffective and widely used) and focus on the chip interfaceCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


ATM skimmersCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV skimmerswe predict that <strong>skimming</strong> the chip will become an extremelyappealing target to fraudstersthe chip interface <strong>is</strong> inherently accessibleit becomes impossible for the user to verify if the terminal hasbeen tampered as the chip interface <strong>is</strong> not v<strong>is</strong>ible (unlike mostmagstripe one for POS terminals)an EMV skimmer could go undetected for a very long timeand requires little installation effortCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV skimmertrivial installation by “hooking” with a special cardpowered by the POS itselfdata can be downloaded with a special card recognized by theskimmerlittle development effort + cheapCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV smartcardsinformation <strong>is</strong> stored on a filesystem organized in applications,files and recordsthe terminal talks to the card via APDU messages for readingrecords and <strong>is</strong>suing commandsExamples:00A404000E315041592E5359532E4444463031


Terminal ICC exchange1 | initiate application processing2 | read application data3 | offline data authentication (if indicated in the AIP)4 | cardholder verification (if indicated in the AIP)5 | <strong>is</strong>suer script processingCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Read application datastored with BER-TLV templates and read by the terminal, someexamples:tag name----|----------------------------------------4f Application Identifier (VISA)5f2d Language Preference (itenfrde)9f1f Track 1 D<strong>is</strong>cretionary Data57 Track 2 Equivalent Data5f25 Application Effective Date5f24 Application Expiration Date5a Application PAN (credit card number)8e <strong>Card</strong>holder Verification Method (CVM) L<strong>is</strong>t5f20 <strong>Card</strong>holder Name9f36 Application Transaction Counter (ATC)9f17 <strong>PIN</strong> Try CounterCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV application data - magstripe cloneThe CVV (228) matches the magstripe one only for cards that donot use iCVV (a different stored value to protect against th<strong>is</strong>attack, introduced in January 2008 but not present on all cards)Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV application data - magstripe clonewhile the service code on the magstripe might indicate thatthe chip must be used, inserting a card without a readablechip will trigger magstripe fallback on all tested terminalsEMV skimmers cannot clone successfully to magstripe if iCVV<strong>is</strong> usedhowever it <strong>is</strong> fair to say that the possibility of massiveharvesting + being protected by a 3 digits code <strong>is</strong> not acomforting scenarioCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


EMV application data - online usageapplication data can be used to perform <strong>Card</strong> Not Presenttransactions (online, phone, ...) with parties that do not check<strong>Card</strong> Security Code (CVV, CVV2, ...) and do not employ 3-Dsecure (Verified by V<strong>is</strong>a, Master<strong>Card</strong> SecureCode also knownas ph<strong>is</strong>hing heaven)if you think that the amount of websites that do not check thesecurity code <strong>is</strong> negligible...think againironically one of the authors has been defrauded on such siteswhile th<strong>is</strong> presentation was being written...Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


optional security codeCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Offline data authenticationdepending on the chip technology three methods areavailable: Static Data Authentication (SDA), Dynamic DataAuthentication (DDA), Combined Data Authentication (CDA)used by the terminal to validate the authenticity of the cardenables offline transactions where supportednever used by ATM (always online)V<strong>is</strong>a and Master<strong>Card</strong> mandate all cards <strong>is</strong>sued after 2011 touse DDACopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Static Data Authentication (SDA) cardscheapest and most widely used technologyselected records (advert<strong>is</strong>ed by the card and customized bythe <strong>is</strong>suer) are signed with a static signaturesymmetric key <strong>is</strong> used for online transactionsoffline <strong>PIN</strong> verification <strong>is</strong> always cleartext8f: Certificate Authority Public Key Index (PKI)90: Issuer PK Certificate9f32: Issuer PK Exponent92: Issuer PK Remainder93: Signed Static Application DataCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Dynamic Data Authentication (DDA) cardschip <strong>is</strong> more expensive, rare usage as of 2011static data validation (against hash within certificate)dynamic data validation, terminal asks the card to sign data +random number with ICC PKICC PK embeds PAN (limiting private key usage to th<strong>is</strong> card)offline <strong>PIN</strong> verification can be cleartext or enciphered8f: Certificate Authority Public Key Index (PKI)90: Issuer PK Certificate 9f46: ICC PK Certificate9f32: Issuer PK Exponent 9f47: ICC PK Exponent92: Issuer PK Remainder 9f48: ICC PK Remainder9f49: Dynamic Data Authentication Data Object L<strong>is</strong>t (DDOL)Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


<strong>Chip</strong> cloningSDA cards can be cloned and used without <strong>PIN</strong> for offlinetransactions only (“Yes” card)DDA cards clone ineffective for offline and online transactions,however a valid DDA card can be used to pass offlineauthentication and perform fake offline transaction (not tiedto the authentication)offline transactions are rare in EUCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Threatsdata stealing: we d<strong>is</strong>cussed EMV <strong>skimming</strong> usage formagstripe cloning and online usagecard stealing: Cambridge research shows that stolen cards canbe used without <strong>PIN</strong>, hopefully th<strong>is</strong> attack will be fixeddoes state of the art EMV usage really protect against <strong>PIN</strong>harvesting and therefore the use of stolen cards?Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


<strong>Card</strong>holder verificationthe card advert<strong>is</strong>es to the terminal the cardholder verificationmethod preference via the CVM L<strong>is</strong>t (tag 8E)<strong>Card</strong>holder Verification Method (CVM) Condition Codes-----------------------------------------------------------------------------------------------------------------------------Bits Meaning Value8 7 6 5 4 3 2 10 RFU N/A0 Fail cardholder verification if th<strong>is</strong> CVM <strong>is</strong> unsuccessful N/A1 Apply succeeding CV rule if th<strong>is</strong> CVM <strong>is</strong> unsuccessful N/A0 0 0 0 0 0 Fail CVM processing 00 or 400 0 0 0 0 1 Plaintext <strong>PIN</strong> verification performed by ICC 01 or 410 0 0 0 1 0 Enciphered <strong>PIN</strong> verified online 02 or 420 0 0 0 1 1 Plaintext <strong>PIN</strong> verification by ICC and signature (paper) 03 or 430 0 0 1 0 0 Enciphered <strong>PIN</strong> verification by ICC 04 or 440 0 0 1 0 1 Enciphered <strong>PIN</strong> verification by ICC and signature (paper) 05 or 450 0 0 1 0 1 Enciphered <strong>PIN</strong> verification by ICC and signature (paper) 05 or 450 x x x x x Values in range 000110 – 011101 reserved for future use 06-1D/16-5D0 1 1 1 1 0 Signature (paper) 1E or 5E0 1 1 1 1 1 No CVM required 1F or 5F1 0 x x x x Values in range 100000 – 101111 reserved for future use 20-2F/60-6F1 1 x x x x Values in range 110000 – 111110 reserved for future use 30-3E/70-7E1 1 1 1 1 1 Not available 3F or 7FCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


CVM L<strong>is</strong>tthe CVM L<strong>is</strong>t <strong>is</strong> nowadays signed on all cards, therefore it <strong>is</strong>believed to be tamper proofif the preferred authentication method <strong>is</strong> Signature (paper),Enciphered <strong>PIN</strong> verified online or Enciphered <strong>PIN</strong>verification by ICC then the <strong>PIN</strong> <strong>is</strong> not sent by the terminalto the cardit <strong>is</strong> believed that only when Plaintext <strong>PIN</strong> verificationperformed by ICC <strong>is</strong> present and selected from the CVM L<strong>is</strong>tthe <strong>PIN</strong> can be harvested by the EMV skimmerCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Action Codesassuming a scenario with DDA only cards and a “secure” CVML<strong>is</strong>t can we still harvest the <strong>PIN</strong> ?Issuer Action Codes (card) and Terminal Action Codes(terminal) specify policies for accepting or rejectingtransactions (using TVR specifications)Issuer Action Codes and Terminal Action Codes are OR'edthree kinds: Denial, Online, Default; the Online Action Codesspecify which failure conditions trigger online transactionsCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Action Codes Example9f0e Issuer Action Code - Denial (5 bytes): 00 00 00 00 009f0f Issuer Action Code - Online (5 bytes): f0 78 fc f8 009f0d Issuer Action Code – Default (5 bytes): f0 78 fc a0 00translation: “do not deny a transaction without attempting togo online, if offline SDA fails transmit the transaction online”in all tested terminals / cards we were able to manipulate theaction codes (when necessary) so that tampering with theCVM L<strong>is</strong>t would not result in offline rejectionCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


CVM L<strong>is</strong>t downgradethe modified CVM L<strong>is</strong>t <strong>is</strong> honoured by the terminal whichmeans that Plaintext <strong>PIN</strong> verification performed by ICC canbe presented enabling <strong>PIN</strong> harvesting for SDA/DDA cardsCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


transaction log: card with online <strong>PIN</strong> verification00a4040007a0000000031010 Select AID (VISA)00c0000027Get additional data80a80000028300Get processing options00c0000010Get additional data00b2010c00Read data files...00b2010c4000b201140000b20114c300b202140000b20214b200b2011c0000b2011c5200b2021c0000b2021c4580ae80001d...Generate AC (online transaction)...Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


transaction log: same card with tampered CVM00a4040007a0000000031010 Select AID (VISA)00c0000027Get additional data80a80000028300Get processing options00c0000010Get additional data00b2010c00Read data files...00b2010c4000b201140000b20114c300b202140000b20214b200b2011c0000b2011c5200b2021c0000b2021c4580ca9f1700Get <strong>PIN</strong> try counter (unknown length)80ca9f1704Get <strong>PIN</strong> try counter (corrected length)0020008008241234ffffffffff Verify <strong>PIN</strong> (1234)80ae80001d...Generate AC (online transaction)...Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Backend detection8 7 6 5 4 3 2 1 Bits---------------------------------------------------------------------Terminal Verification Results (5 bytes, byte 1 shown)1 0 0 0 0 0 0 0 Offline data processing was not performed0 1 0 0 0 0 0 0 SDA failed0 0 1 0 0 0 0 0 ICC data m<strong>is</strong>sing0 0 0 1 0 0 0 0 <strong>Card</strong> number appears on hotl<strong>is</strong>t0 0 0 0 1 0 0 0 DDA failed0 0 0 0 0 1 0 0 CDA failed---------------------------------------------------------------------CVM Results (3 bytes, byte 3 shown)0 0 0 0 0 0 0 0 unknown0 0 0 0 0 0 0 1 Failed0 0 0 0 0 0 1 0 SuccessfulCopyright 2011 Inverse Path S.r.l.CVM Results byte 1: code of CVM PerformedCVM Results byte 2: code of CVM Condition<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Backend detectionthe attack execution might be detected by the backend (via the TVRand CVM Results advert<strong>is</strong>ing failed data authentication andcleartext CVM) but blocking a card solely on th<strong>is</strong> information doesnot feel like a real<strong>is</strong>tic solutiona downgraded CVM L<strong>is</strong>t with offline <strong>PIN</strong> + fallback to online <strong>PIN</strong>might be used to “hide” cleartext CVMR by relaying the wrong <strong>PIN</strong>for the first CVM (however the customer would be prompted twice)(untested) it would be also possible for the skimmer to advert<strong>is</strong>e astored valid SDA card with convenient CVM L<strong>is</strong>t for theauthentication phase, and using the real card for the transactiononly, th<strong>is</strong> would result in “clean” TVR (for DDA too) and CVM ResultsCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Summaryan EMV skimmer poses a serious threat due to ease of installationand difficult detectionEMV data allows fraudulent usage on websites that performinsufficient validation (as well as magstripe clone for cards that donot use iCVV)the <strong>PIN</strong> can be always intercepted despite card type and CVM /Issuer Action Codes configurationstealing an EMV chip & pin card that was previously skimmedenables full usage and ra<strong>is</strong>es serious liability considerationsCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


Recommendationsdespite industry claims about reduced fraud levels in ouropinion EMV <strong>is</strong> inadequate and overly complex, it should bereplaced with a simpler and cleaner solutioncorrectly implemented crypto should be performed betweencard backend (online) or card terminal (offline) fordouble authentication and preventing interception/man-inthe-middleattacks for every single step of the transactionterminals cannot be trusted, <strong>PIN</strong> input and verification shouldbe confined on the card itself (e-ink scrambled touchpad)Copyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>


http://www.inversepath.comhttp://www.aperturelabs.comsponsored by:http://www.integra-group.itCopyright 2011 Inverse Path S.r.l.<strong>Chip</strong> & <strong>PIN</strong> <strong>is</strong> <strong>definitely</strong> <strong>broken</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!