X-Ray Scans Expose Chip-And-Pin Card Hack
wired.com
wired.com
Wait, what? How is that the protocol? There's no two way validation at all? The chip just says "yes"?!
Can anyone with knowledge of details confirm? This seems isomorphic to my ears with "the PIN is just security theater".
> The chip just says "yes"?!
Yes.From https://www.cl.cam.ac.uk/research/security/banking/nopin/oak... page 446 (last page), T: Terminal, M: "Man in the Middle":
T → M 00 20 00 80
08 24 00 00
ff ff ff ff ff Verify PIN “0000”
M → T 90 00 PIN correctSo it is more an issue of the bank accepting partially verified transactions on large dollar amounts.
EDIT: Thanks kbenson for clarification.
The banks did lobby hard to be able to shift the liability to customer when PIN is used so do they do care less and do care more about approved xactions/second than anything else.
I imagine just like in the government security world, a lot of bank security is "paper" security (the way I call it). It is a set of formalities, certifications, rubber stamps, audits, other other red tape that in the end all check off and yet the system is still not secure.
This. Some behaviour i encountered by acquiring banks when working on backend software for interfacing with them:
- Authorising a transaction when they failed to contact the issuing bank, because the value of the transaction is lower than a certain threshold.
- Overloading fields in the APACS spec to get around 3D Secure / Verified By Visa, i.e. passing the cardholder straight through the process and then marking it as bypassed (a poorly implemented one factor auth becomes a "eh, this looks ok to me" zero factor auth by the issuing bank).
- Being sat in meetings where the max value of contactless transactions was explicitly stated as being that of a level that any contactless chargebacks were not defended because they're so low.
- Asking me to send PANs in clear text, split over two e-mails (no, i didn't).
Backend backing systems are horrible. Nobody really wants to work on them and they have so much legacy cruft that they're like concrete, so any change takes forever and carries massive amounts of dev/test/risk.
Even the seemingly sensible ones have major WTF's - One of the integrations i did at my previous job was interfacing to Amex's endpoint for online authorisations. HTTPS posts over the web, seems sensible enough right compared to APACS-70 over X.25? No, the ISO-8859-1 POST parameter values needed to be encoded as EBCDIC and then converted to hex (IIRC) before being sent.
Banks playing the chargeback cost balancing game is all well and good for them, but if you're living on the edge and experience fraud then this can lead to all sorts of financial problems.
At least you knew which encoding to use. For one of our payment integrations we've given up, and just pass it 7-bit ASCII.
Having had to re-implement a few legacy systems in newer code for nothing nearly as complex or with as much risk as what you're referring to, I can't imagine any dev not screaming and running for the hills if asked to do this. The chance it will work correctly without bugs early on is close to nil, and the downside for bugs when dealing with financial systems makes the risk analysis being as large as it is, it's pretty clear cut.
I keep telling myself one of these days I'll get to reimplement some system that has good test cases, but I know that will never happen. Any system that is designed well enough to have good tests doesn't really require rewrites in the vast majority of cases.
https://www.cl.cam.ac.uk/research/security/banking/nopin/oak...
The term "liability shift" was not invented by the paper's authors; it is the industry's own term. Here we can read MasterCard’s Carolyn Balfany openly using it:
http://blogs.wsj.com/corporate-intelligence/2014/02/06/octob...
In this case it may be part of the protocol to not confirm if there is a communication problem, and that risk may be acceptable. It seems to me a test of is "0000" valid and is "9999" valid and at least one of the two rejected before the user is allowed to enter their pin would be reasonable here.
There's a lot to be said for user in/convenience in decision making.
And this part apparently was unbroken, because the attackers left the initial chip in place and just proxied the PIN response.
So... if you have that, why on earth didn't the protocol specify a two-way kind of thing that allows the already-authenticated card device to sign and return a "I validated that PIN" message, which wouldn't be MitMable?
I'm just stunned that somehow they went through the trouble of putting a !@#!?! computer into every credit card capable of elaborate crypto and then blew this really obvious hole in the middle of it...
The best part? In the UK, the cardholder is liable for the transactions because the bank thinks that the PIN was used.
https://www.cl.cam.ac.uk/research/security/banking/nopin/oak...
(my comment edited for clarity)
You're talking about something different to makomk, but again, not true, you're repeating another urban myth. It's rare for banks to do that, save for a handful of cases. Occasionally they contest it, but generally when they really think the customer is trying to pull a fast one.
If you believe you have a case, talk to the citizens advice bureau, they will help you. Otherwise stop trying to alarm people with a bunch of nonsense.
It is quite simple - the link you provide states that customers are not responsible for fraud, but that does not help if the issuer claims either that the cardholder authorized the transaction or was careless in protecting the PIN (that they can do this is also covered in your link.) If you were to read the link I provided, you would find cases in which issuers denied restitution for fraud on these grounds, even though they could not possibly have evidence that this happened (and there is plenty of circumstantial evidence that it didn’t). The reason they don’t have the evidence is that they chose to open an exploitable hole in their own protocol.
At least at the time of the article, the law allowed the issuers to act as if the protocol was as secure as it was intended to be, instead of how it actually was. If things have changed since then, I would be grateful if you could present evidence that actually shows that to be so.
Instead of being annoyed that I dare mention these inconvenient issues, you should spare your ire for the idiots who created this completely avoidable problem and who tried to brush it under the rug.
Edit: It is telling that the issuers didn't take this seriously until a case involving unissued cards arose - a case that cannot be blamed on the customer.
https://www.lightbluetouchpaper.org/2009/08/25/defending-aga...
This explains this hack as well.
That's a fundamentally broken protocol. The hardware capability was there to do this securely, the software design messed up.
Unless what you're saying is that the PIN itself is an "application", in which case your point seems sorta specious. OK, so the application has a broken protocol which invalidates the whole idea of "Chip & PIN" authentication.
I've only ever seen one merchant (Target) that requires the chip. Every other store is still using the mag stripe. In fact, while travelling this weekend, I used my card in a dozen new stores. But none used the chip.
> According to their paper, at least some chip-and-PIN card readers now send a command to verify a PIN before the user even enters it to check if the card responds with a spoofed “verified” signal.
Trivial to detect and control, e.g. have a discrete button on the card that you press exactly when you enter your pin that enables the spoofed response. There are probably more sophisticated methods.
Hopefully they've done more than just that though. Hopefully.
Another thing, in context of USA, is that the authentication being done isn't much of a vulnerability as this only applies to offline chip transactions. In the USA (I believe) and here in Canada, all transactions are online, which means the pin will be rejected by your financial institute's back end systems in these scenarios.
These types of hacks have since been corrected using what is called CDA (Combined Data Authentication). Blurb on SDA/DDA/CDA here: http://www.cryptomathic.com/hubfs/docs/cryptomathic_white_pa...
Edit: Many Canadian financial institutes still use the weakest data authentication (SDA) because all transactions go online - spoofing a card PIN verification response doesn't fool the back-end system. Visa and Mastercard both have mandates to have newly issued cards be provisioned on chips with CDA (I believe, could be DDA which would still be susceptible to this attack).
Edit 2: When I say "offline", I mean at a point of sale machine - the POS does not reach out to the payment network to perform an "online" transaction where the PIN and card are validated by the back-end systems.
Edit 3: The article doesn't give EMVCo any credit for actually solving the issue before any real world hack was known to exist.
Edit: clarification, there are sort of three types of transactions--
offline - vulnerable to this (and a simpler attack)
online w/ offline pin - vulnerable
online w/ online pin - not vulnerableOffline transaction, meaning "authorized within the acquirer domain (at acceptance device, or at the acquirer host)". In other words, the transaction does not hit the issuer's system.
Edit: Even in an online transaction, offline pin is still performed, but the online would fail.
couple of countermeasures
In CDA, the responses are encrypted by the card, which means a they can no longer be spoofed.The only lingering possibility of this type of attack occurring is in regions where offline transactions are still permitted, and if you can find a terminal which still does not have CDA capabilities or if you have a card which doesn't have CDA. Totally possible, but the opportunities are diminishing rapidly as the issued has been RESOLVED.
Edit: Found a decent write up on the CDA differences over DDA: http://www.infonomics-society.org/IJICR/Fraud%20Reduction%20...
The CDA cards have this advantage over the DDA cards, in that the message signed by the ICC which includes an additional Application Cryptogram (AC), which is used to protect and validate the specific transaction messages (amount, time, etc) generated during the transaction. The ICC uses the AC Session Keys (derived from the ICC AC Master Key, shared only between the ICC and the card issuer) to place this MAC on the transaction details.
They say nearly 600k Euros were charged, but given the sophistication of the attack, I wouldn't be surprised if we hear later that it was in use at different locations as well, and we just aren't hearing about it because they haven't caught those people yet. They only caught these ones because they kept going back to the same locations.
As I say that, I guess this relies on having a network connection which cannot be assumed when you're developing a POS. Hmm.
Regardless, this whole "ask the card if the PIN was right" protocol is just dumb. Surely they could have e.g. had the card sign a challenge in a way it could only do if given the right PIN? That gets slightly more complicated when revoking old PINs or issuing new ones, but it would still be possible. For all we heard about the wonders of C'n'P, this seems to fall short. If you're going to the expense of chipping all those cards and replacing all those terminals, at least get the software right.
I know! It's the stupid details and extra people they bring in that seems to eventually get these rings caught.
> Surely they could have e.g. had the card sign a challenge in a way it could only do if given the right PIN?
Well, the article seemed to imply the chip put in the CC was from a different card, so maybe they know the pin for that chip, and the MITM is really about the authentication of the chip in the wrong card? Later they do seem to imply the fix was to authenticate the chip, but I'm not sure without reading the original paper if that's an over-simplification of what the fix was, and maybe it's better authentication of the chip.
The chips could be made to sign their response with a bank's private key and the terminal checks this against a known list of banks. But that would be cumbersome (lots of banks, lots of keys), the terminals would need to be constantly updated to keep the key list up to date, and it all falls apart when a key is extracted out of the chip.
Now if the protocol required a network connection to the bank, you could speak to the bank to validate a PIN instead of talking to the chip at all.
It doesn't require key management the way you describe it.
Banks use a derived key schemes for EMV transactions. In a way you can think of it as PKI. In any event, the actual verification doesn't happen on the terminal. The terminal is supposed to take the signed transaction and pass it up through the network where it will end up with the originating bank who will say "Yes, we accept it", or "No, we don't accept this charge". This is something that happens today but it is the CC# and the CVV that get passed. If they are revealed/stolen you're screwed.
One important point in this is that nothing from this PKI mechanism is involved when the card generates the final transaction signature (called "Transaction Certificate" by EMV). Standard does not specify mandatory algorithm for that and also such algorithm necessarily has to be some kind of truncated symmetric MAC, as the resulting value has to fit into 32 bits (and ideally contain only BCD nibbles). There are some recommendations about what algorithms can be used for that in the standard also with recommendations about key management for the symmetric part.
The MitM essentially has no idea about EMV whatsoever and only traps one command and returns fixed OK response. Due to way how the card holder verification process works this results in terminal thinking that the entered pin was correct, while card thinks that no PIN was required for transaction (the idea there is that terminal and card calculates what verification methods they deem sufficient depending on various parameters of transaction and their internal state). While these two states are obviously different, they are encoded by same binary pattern in transaction flags (there is bit that means "verification failed" and nothing that encodes whether the verification was attempted or even what method was selected) and thus the terminal's view of transaction matches the signature generated by card.
Interesting point in this is that the card usually allows the transaction even without the verification succeeding. Idea behind this is that the transaction can be downgraded to card+signature by the terminal for various reasons (standard specifies list of some reason codes that contains reasonable things like "hardware problem with keyboard" but also "cardholder does not know the PIN").
In it's entirety the protocol is designed not to be absolutely secure, but to be efficient, reliable and provide usable audit trail for later review that is usable to unequivocally assign blame for disputed transactions. Essentially only problems with EMV from security standpoint come from complexity that is motivated by the reliability and backward compatibility requirements.
By the way there are certainly better workarounds for this vulnerability that testing whether card with no selected application responds to pin verification command that can be implemented on the card side, but they reduce reliability (eg. disallowing offline PIN verification, disallowing transactions without cardholder verification...). On the other hand these workarounds really solve the issue, while testing from protocol peculiarities by the terminal can be worked around by the attacker by implementing better MitM chip that tracks state of the original chip.
Arm's race between phone companies and phreakers who emulated payphone EPROM chipcards that involved things like the phone measuring various impedances of the card pins and finally ended with deprecating the whole thing (either by migrating to true smartcards or by simply discontinuing the cards, or even payphones) should be enough to convince anyone that authenticating devices by means of implementation details only slows the attacker down.
Designing a protocol for the offline case sounds like a game of Whack-a-Mole and also like something we've all been advised against. However, ISTM that the attacks against a better offline protocol that included e.g. zero-knowledge proofs would be much more difficult than racing to say "yes".
I've left the back of my credit-card unsigned for 2+ years, and in that entire time, and north of 500+ transactions with a signature, I've been asked for identification less than 10 times.
I wonder if there has been a single person challenged on a signature in the last 5+ years with a credit card if they even made the slightest attempt to sign in a fashion similar to what's on the back of the card?
But outside of those? Almost never.
This is, by the way, the reason software development is hard - if you were to approach this problem the way typical software requirements are defined, you'd only piss the clerks off. In real life, people dynamically adjust their compliance with procedures to run the common case with minimum effort and improvise if something unexpected happens.
> In the US, some customers write “See ID” or “Ask for ID” in the signature panel, thinking that this is a deterrent against fraud or forgery; that is, if their signature is not on the card, a fraudster will not be able to forge it. In reality, criminals often don’t take the time to practice signatures. They use cards as quickly as possible after a theft and prior to the accounts being blocked. They are actually counting on you not to look at the back of the card and compare signatures; they may even have access to counterfeit identification with a signature in their own handwriting. In this situation, follow recommended steps listed above under Unsigned Cards.
It makes even more sense given this guideline, from the same handbook:
> When should you ask a cardholder for an official government ID? [M]erchants cannot make an ID a condition of acceptance. Therefore, merchants cannot as part of their regular card acceptance procedures refuse to complete a purchase transaction because a cardholder refuses to provide ID.
(Source, PDF: https://usa.visa.com/dam/VCOM/download/merchants/VBS-06-APR-...)
Regardless - any time I'm making a large purchase (even with a signed card), you can be certain they scrutinize my government ID - I've never seen a retailer who has ever paid attention to the rules that stipulate you cannot make an ID a condition of acceptance.
It's purely a branding rationale. For some people, being "grilled like a potential criminal" by a checker would be enough for them to stop using the card or not shop at that store. Either way, it's a negative association between that merchant and that card for that kind of customer. Card networks have fantastic anti-fraud algorithms that are way more reliable than a bored teen checker.
Whenever a checker takes care to examine my credit card I make a point of thanking them for their diligence, as long as its within reason they're doing everyone a favor but the criminals.
1: http://www.npr.org/sections/money/2014/09/08/345820789/why-d...
Whole point of PIN was to move responsibility over to VISA and banks. This is why they kept claiming every transaction with chip&pin card is 100% valid and there is no chance of fraud.
Reading this article gave me LOL. Their super fraud prevention is asking the card for multiple pin verification before client enters real PIN, so if the card validates random bad PINs reader can flag fraud. This will stop scammers for ... one week? until they start programming shims to only validate one particular PIN making the card act like the real one.
This "yes-card" attack relied on having physically stolen the original card (not skimmed) and only worked against offline transactions using SDA, which, as far as I know, aren't supposed to happen in the US.
As long as merchants continue to accept magstripes the security benefit isn't really there, but, in the ideal world where they accept only chip-and-sig, it's still much more secure than MSR even without the added protection of a PIN.
Your signature just means you accept the terms of the cardholder's agreement.
My biggest takeaway is that all systems are safe until the bad guys really try to break them.
http://www.infinityusb.com/default.asp?show=store&ProductGrp...
but I guess you could use cards you linked IF you drill them, cut real chip from real card, place it in drilled hole, cover hole so its not visible, print card over with authentic looking color scheme/logo, stamp number, sounds like a lot of work
Security by obscurity. That's always a good plan. I'm sure that folks who went through all this trouble to design this hack wouldn't ever be able to find that information. </sarcasm>
Away from being a proprietary tech, I'm not sure why fingerprinting the magnetic stripe never took off. It seems so much simpler, and if you cannot rearrange iron at the molecular level impossible to replicate.
http://www.magtek.com/V2/media/whitePapers/2012/MagTek-WP-An...
If you really can reliably get magnetic signatures, it would be really hard to clone cards.
Edit: the particles won't really change, but their magnetic states feasibly could
Besides you can just use the chipped card online without the chip or pin?