 So thank you very much everybody. I'm Andrea Barisani. I'm from Italy, which is why I have a girly name for every country other than Italy So but this is me This is my first Congress by the way, even if I live so closely here I'm feel very privileged to be here and so far I've been very overwhelmed by the quality and the people of this event So I'm really happy to be here and thank you for coming to my lecture So I did this talk with Daniela Bianco my colleague at the inverse path So just to give you a brief introduction what we do we did worse consulting company We did a lot of exotic talks in the past years We're one of the first ones to do talks about car hacking We sniff keystrokes from the power line and with lasers in 2011 We did a chip and pin talk and this is an updated version of that we knew findings last year We were one of the first ones to do packet-in-packet in inference on and tomorrow just a little add I will have another talk at 5 30 here about the USB armory, which is our latest hardware project. So So EMV I'm gonna talk about The credit cards with a chip that you have which is called chip and pin in UK EMV is the name of the standard and we address this topic a few times in the past and the reason why I'm doing this talk is because working in the security industry I really dislike Where a technology which is supposed to be secure, but it's really not it use against The users of that technology because it should be the other way around right? I mean if you use a secure technology, whatever that might mean it should protect you It should be something that works for you not against you And the problem that we found in the past with EMV Along with the fine folks at Cambridge as well They also published research about this is that the way in these been marketed and used on a legal standpoint is In some cases not all cases against the users and we're strongly against that, which is why we're making these talks So EMV is a name of a standard that regulates every time you see a credit card with a chip That's EMV. That's what we're gonna talk about So you have a smart card, which of course this is undeniable It improves the security over the existing max stripe, which you still have by the way I mean every credit card nowadays as the chip the mag stripe and the embossing as well So you still can fall back to very old technology there So EMV was invented to replace the magnetic stripe It was invented also to promote offline car verification and transaction approval So to give you the ability of validate a transaction without taking the cost and the time of going online to the actual back end And you can have multiple applications on one card You can have credit and debit if you want so these were the main reasons for moving to MV Which are a good reasons in a way One of the other reasons is that with EMV you promote a liability shift So the liability shifts away from the merchant to the bank in theory But the card holder which is you which are you know the user of the car is assumed to be liable in most cases And unless you can unquestionably prove that you were not at fault into protecting The pin or whatever credentials have been used for the fraudulent transaction So this is the core issue here with EMV the pin verification becomes proof of your presence Now if the technology cannot ultimately Protect the pin then of course this liability shift should not happen at all And this is what we're going to address in this talk. This is a very nice example Canadian Perry Bank of Commerce A guy was fraud for 81 thousand twenty seventy six dollars Our records show that this was a cheap and pin transaction This means the customer personal car and personal pin number were using carrying out this transaction as a result The customer is liable for the transaction. So this is the problem by the way The the thief bought a race car That's the sum 81,000 which is what I would do if I would have to fraud one of your credit cards That's what I would do. I would buy a race car. I think it's a very good thing to do But sadly with cheap and pin you might be liable and I don't want to do that I mean if I can get my race car and you can get your money back I think it's a win-win scenario. So if anybody wants to do that we can talk about it So EMV is broken. So there's been this is The best Presentations that they've been done about EMV one is mine, but I'm not biased by any means So the guys from Cambridge did an excellent job with the cheap and pin is broken Research we did one called cheap and pin is definitely broken with our friends at the Perture labs Adam Laurie and Zach Franken And then it was the next one about pre-play attacks. I'm gonna address All of the issues that have been presented here and then one more which is a combination Interaction between two of these stocks here, which is something you that has never been presented before So you're all familiar with ATM schemers I guess if not, you should like when you go to an ATM keeping mind that I can always be a fake pimped and a fake Credit card reader. So EMV and the chip was designed to prevent this to find ways where the mag stripe You know can go away so that would not be so easy to intercept everything that is read while you put the card inside But our point was that we can do EMV skimmers So this is a very tiny very thin EMV skimmer that we did for research with our friends at a Perture labs That can be covertly inserted into a point of sale device so this device as a Reader as marker reader and it's two faces So it acts as a shim as a man in the middle device and it can get be placed inside a point of sale device So when you insert your card the card has been Intercepted by this device and once it's plugged inside you cannot even take it out easily. It's so covert that you will not See it nobody can see it And this is a key factor because the fact that nobody can see this device or detect its presence Means that you're not Negligent in not knowing that it's there because there's nothing that you can do to prevent or to detect this kind of device inside And this is a key point from a legal standpoint so we built this device as a proof of Concept because we wanted to say that EMV skimmers are the likely next step after mag stripe skimmer We move away from the mag stripe. What do we have? We have the chip So criminal activity will focus on the chip because it is possible to do so So we predicted that skimming chip would become extremely appealing and because the interface is accessible You have to be able to put your car into the point of sale slot So we this means that other things can go inside there It becomes impossible as I said for the user to verify that and you could go undetected for a very long time So these were our predictions and after we made the first presentation about this, of course, it came out that actually they were Real cheap skimmers installation in the while that have been reported after our talk But they were dated before our talk Which is great because we take the credit in exposing the issue But not the blame for triggering it because they were dated before so that was that was perfect for us Thank you And this is so this is much more professional looking than ours. Okay, so this was made This is a real unit made by criminals. He has a serial number on it. We should worry you very much. I Don't put serial numbers on the PCB as I make okay And also who can tell me what that little wire that goes up and down is can you tell what that is? Yes, it is an antenna So it's even much more professional than ours in ours You would require a special car to plug it in and to download the data here. You can just sit in the nearby Balsa coffee whatever you have here and then just get the data Uploaded to you via Bluetooth. So this is scary and if you can see the plastic piece on the bottom. So that's actually The plastic the gray piece there. Okay, it's the same model So what they figure out is that they could unplug the plastic piece and they could put it inside with this skimmer Hidden inside so very professional So this is a real fret It can be hooked easily with just a few seconds with the device. It is powered by the point of cell device itself Data can be downloaded wirelessly with a special car. It takes little development effort. We did it in two weeks And it's cheap. It doesn't cost too much So this is a real problem. It will happen. It is happening now cheap skimmers. They're there. They can be there So what can you do with a cheap skimmer the question becomes that we accept that these devices can exist What can you do with such a skimmer? So smart cards? It's a very simple protocol. You can read You can send commands to them. You send a request and you get a response through a PDU Messages the MV skimmer can intercept these messages so you can log them And you can also many in the middle then so you can decide to prevent certain messages to reach the card and it can say in Fake responses to the terminal. Okay, like a network TCP AP many in the middle or whatever now This is basically a summary of what the EMV is EMV is divided into these main four phases First of all, we have initiate application processing where the terminal gets to know the card You know ask the car. Hello. What are you? What kind of features that you support? Are you a visa? Are you a master card? What's the application that I'm going to select? So application might be the visa application the master car application or the debit application Then you have the card authentication So we authenticate the card and this can happen in in several different ways, which I'm going to talk about Um, then you have the card holder verification. So you verify the person you authenticated the car Now you verify the person and this is done with the pin The pin is the car holder verification or the signature it depends and then you have the actual transactions So there are many problems with the way this protocol has been designed The first problem is that they're all of these steps are separate and they're not strongly tied together And this is one of the main issues the second problem is that Most of the data that is exchanged here. It's completely unencrypted. So like your credit card number your name It's all exchanged and it's unencrypted and The first problem is that the back end so the bank relies on the correct operation of Determinal so the terminal is not just a dumb middleman It is something that is essential to maintain the security of the protocol So this is not an end-to-end protocol by any means. So these are the three main issues within EMV and You will also see that in the way that EMV is being designed It has a lot of backwards compatibility issues and some problems were patched with newer version and so on and so on So it's something that is definitely over engineered and not secure at all So the first thing that you can do which was surprising to us, but it's trivial It used to be that you can do a max drive clone from the chip Now you can still do that. You can get an exact copy of the max drive except for free digits So free digits that you need which are on the max drive are not on the chip other than that you can do it And this is the CVV so This means that You cannot clone to max drive right away Unless you brute force all the 999 CVVs and we know that in IT nowadays 999 is such a large number isn't it it is staggering 999 Wow, so yeah, so that's the whole security from cloning from chip to max drive is right there on these free digits so And also there are a lot of websites that surprisingly nowadays they don't ask for the CVV like I don't know Amazon So if you buy to Amazon, you don't get asked for a CVV. So I got fraud at multiple times With data that was skimmed from my card and that was used without the CVV So of course you get your money back Okay, so it is a little hassle for you, but it's not a big deal So you waste time, but you will get your money back and only goods and services can be You know acquired by the frauds there in theory because in practice there are companies Which they only exist to convert goods and services into cash, but anyway, you will get your money back So there's no liability shift here, okay But this still gives you an idea of how things could have been a little better from from the beginning now If they guess the CVV, that's a different matter on its entirely. Okay, but you know, I don't want to dwell into that right now So that's the first thing that can happen which shows the fact that also data is not encrypted The next part is offline data authentication So EMV introduces a way to authenticate the card so that you know that the car is exactly yours and in principle This should work. You have a smart card very powerful. There's no reason why they shouldn't work now There are three ways to authenticate a card. There's the basic way, which is called SDA static data authentication There's a better way called the dynamic data authentication and there's an even better way Which is called the combined data authentication CDA each of these methods patches the flaws of the previous one And this offline data authentication methods were introduced to support offline transactions So to give you the ability of doing transaction completely offline So they're never used by ATMs which they only go online and nowadays in fear You should only see DDA cards not SDA anymore So one of the first issues so what what's SDA SDA means that you have a static signature Which means that if you can read a car you can copy the data and you can copy the signature So the signature is basically worthless So to speak because there's no challenge response mechanism involved there at all So if you're a flying you can just present a valid signature that you skimmed somewhere And then you can just fake the transaction because the transaction does not go online Nobody will verify that the only thing that it's verified is the static data Authentication which you're cloning so well done EMV In introducing secure offline authentications So DDA was invented where a random number is being exchanged and we're gonna talk about that So that you have a challenge of response But it was also a problem with that so they invented CDA where they finally do the authentication and the transaction at the same time So this is to explain how EMV is basically patched and CDA is to me Not useful because you can always fall back to previous authentication methods You can always fall back to SDA if you want so offline transactions are insecure If you support the MV standard as it should be And now when I mentioned the Random number, there's a very extremely nice and brilliant Paper for people much more clever than me which are defined people at Cambridge Where they highlight the pre-play attack which this paper really highlights the poor design choices which were made with EMV So the unpredictable number which is used to secure the Dynamic data authentication. So the dynamic component is the random number which is being exchanged It is generated by the terminal not by the back end So if you have terminals where I have a flawed random number generator where you can predict or manipulate Random numbers you can effectively clone a transaction and you have What they show in the paper that there are certain terminals where their definition of random number is that you need to Give back 10 different numbers and even if they repeat themselves Well, they're random because the PCI compliance said that the test mandates that you gonna give me 10 numbers And they all got to be different. So that was definition of random, which is awesome so What you can do you can collect Transaction data from a genuine transaction and when you see that random number popping up again, you replay that transaction Luckily, there's one limitation here. You got to be in the same country You're gonna spend the same amount and you got to be in the same currency and on the same day Not on the same merchant because the merchant information. It does not take place In the transaction between the car at the terminal. It is something that only the terminal knows But if you fit within these conditions, then you can replay a transaction You don't even need a valid pin and your transaction is clone 100 percent. So let's think of this in terms of liability We're not talking about mass fraud here I'm not gonna say that they can clone millions of car right away Let's think about the single fraud that you might receive and the liability that they shifted to you all of these little attacks they Practically destroy every argument that would shift the liability to you And this is the key of this talk and why it is important to talk about these things so if there's a fraud Always check if the same random number was used in the same country by a different terminal or If the run-known number of the terminals come predicted or not if the bank cannot Conclusively prove this to you then there's a chance that this attack might have happened Of course, even if it might not have happened just the chance that it could and the fact that they cannot prove It means that they cannot shift the liability to you and this is very important. Now. I'm not a lawyer Okay, so I'm not giving you legal advice, but this is how it is So and of course there's also one other thing which is called the ATC the application transaction counter Which gets increased every time use the car which can also be used to detect this kind of frauds and All of this detection by the way, none of this is done nowadays by backends whatsoever So what they could do they don't do and this is why it is important to know about these things Second attack Still done by a Cambridge pin verification wedge attack So this is the way the pin is verified by the terminal The terminal ask the car is this a valid pin and then the car. Yes. It says. Yeah, sure or no It's not that's it. There's no authentication There's no encryption whatsoever in the basic form of this mechanism. The response is not encrypted. It's just a yes or no So of course a man in the middle of eyes can just spoof the response and say yes to any pin and create a so-called Yes, sorry now This specific attack was anticipated by a substandard of EMV, which is called a common payment application specification but Guess who's checking this specific occurrence in backends. Nobody's so far We've done consulting for many financial entities in Europe and abroad We have never seen detection for these kind of attacks which takes correlation of two bits If these two bits are both one you're good if one of them is one and the other one is zero Then it's not good and you know mathematically that this attack takes place But this is too difficult to do So this is one example of this Of this fraud taking place. So we have a clean run where the pin gets transmitted You see it is the little squares. We have full skated the pin One two three four there and you get a response and in a man in the middle Attack you can just intercept that and then force Saying yes, and you will never relay the actual pin verification to the card. So the car will not know So where does the detection lie? The card knows what happened and the terminal knows what happened each has their own view and the card Signs this data. So you can correlate The car holder verification method results generated by the terminal And the so-called issuer application data, which is generated by the car These two pieces of information They will tell you if the terminal is verified a pin offline And if the card is verified a pin offline and when this attack takes place the two mismatch And the ad is signed And the cvmru cannot intercept with a shim because he happens between the terminal and the back end So this can be easily detected, but it's not been Detected so this is one thing that you should ask If you're involved into a fraud you should ask the bank. Please show me the ad that was exchanged Please decode it for me because it's vendor dependent And also showing the cvmr and let's see if they match That's one thing they should provide to you our contribution to Cheap and pin attacks was to take this even further and say, okay Let's assume they fix this flaw Is the pin Protected can we still do something with it? And we discovered the cvm downgrade attack So the card tells to the terminal How the card holder should be verified with what is called the cvm list So sometimes you might use a signature sometimes you might use a pin in plain text You can use a enciphered pin with dds Who gets to decide that the card tells to the terminal? This is what I support And then the terminal can decide and the card also tells the preference of supported methods So the card can say I want to try signature first But if you're not ready to commit to that let's use a pin offline pin And if you don't want that let's use an online pin and so on and this is the cvm list So what we discover is that Even if this information is signed by the data authentication phase Which is supposed to authenticate the card and the data on the card If you tamper with it the terminal will still be so happy to parse it and accept it and honor it Which is a problem on its own because And I'm going to get into detail for this. So this is a cvm list These are all the the fields that you can have so we're interesting to plain text pin So you can have enciphered pin which means that the pin will send encrypted to the card The response will still be unencrypted by the way The response will still be yes or no, but at least the pin is encrypted And you have online pin which means that the card will never see the pin request because it's between the terminal and the back end Or you have signature or you also have no pin required or no cvm required whatsoever Which is what we use in in toll roads in italy. We pay with a credit card. There's no signature There's no pin because we fall back to that So we we asked ourselves what we if we use only dda cars, which is what banks say it's the state of the art You know and we invalidate the signature So this is the problem. There's one piece of Data on the card, which is called the issuer action codes Which specify which failure conditions should trigger an online transaction So this is what happens. I'm the card And I'll tell you to the terminal Please do not deny a transaction without attempt to go online even if my signature fails So let's think of this in terms of security You have data which is signed And you can tell to the terminal what to do if the signature fails That seems obvious to me, right? It's like, hey, I want to go out with you. I really don't yes, you do Okay, that's how it goes, right So in every test terminal and back end we were able to manipulate when it was necessary These action codes so that if we tamper with the cvm list We would not be rejected offline and guess what the cvm list is parsed by the terminal and it's applied So we can tell the terminal what to do Which means that whatever card you have We can tell the terminal. Please verify the pin offline Which means that can a skimmer Can always force the terminal to transmit what is input on the pin But as a pin to the car which leaves for interception Which makes the whole liability fall apart And this is one example here. We modified the cvm list. So this is a normal car which goes online Because you see on the left side The pin verification phase is empty because there's been none because that went online But on the right side there's our man in the middle where we actually invalidate the cvm list And we force the pin transmission to the car And keep in mind The the back end will know that the signature failed They just don't care about it So from a protocol standpoint you could say that this is somehow anticipated the signature fails But since the data authentication of the card is a separate step from the authentication of the card holder Since those are treated separately Then the two phases they don't use the knowledge gained from the other So that's why you can always force the pin to be transmitted plain text The way you detect it. Well You have offline data authentication failure and you know, you might even correlate How the card was issued you might have a car which only has online pin in the cvm list So you can tell if the offline pin is requested something wrong is there But that's simply too much data to keep on the back end You know the back end would have to know every configuration for every single card Which to me is not unreasonable, but apparently it is but you could at least reject every transaction we does Doesn't pass offline data authentication, but you know sometimes you also don't get offline data authentication processing at all so And one more important thing Even if you would have these markers These are not conclusive evidence either positive or negative Because as a skimmer I can always reset the terminal as soon as I get the pin Which means that the back end won't see anything at all and won't get any data from the transaction So this is a design flaw That cannot be even detected if you implement it completely covertly The only way to fix this is to have the firmware on the point of sale device to refuse offline plaintext pin verification All the time if you know that your cards are Don't support that or in case of signature invalidation at least And this is a big problem with liability Because you cannot say that the emv protects your pin Despite the card configuration you might have a dda card Which doesn't even have a pin on the card itself And I would still be able to do this and to see your pin So if I steal your card afterwards, of course, I would need your physical card These are the scenarios that we're talking about Then you will never be liable But the classic case is that if you lose your card and it gets used and he has chip and pin They will tell you that you are liable if it's used with a pin because they tell you that you're being negligent Because maybe you had your pin written down in the bag or somewhere But it doesn't matter if it's that truth or not They will use the technology of emv which is flawed against you and we see this all the time And we consult card holders into preventing these kind of Claims by asking for the right data and which is why I'm giving you this talk right now to let you know what you can ask in order to prevent these kind of things Because even if we're not talking about millions of people being fraud, I don't care as long as one person Loses, I don't care 100 2000 euro because these technologies turn against them. I don't think that's right And I think as an IT security community we should work Against that Thank you So going back to the pin verification wedge attack the one where we say yes or no to the pin that was discovered by Cambridge and their first paper they say That Depending on the CVM list, you know, whatever is specified cheapest signature online pin You know They tell that this their attack is not applicable to certain cards And at the time when we released the CVM downgrade attack we we thought of Combining the two but we you know, we didn't actually try it This summer We tried it. There's no reason why it shouldn't work and guess what? It works just fine We can combine the CVM downgrade attack and the pin verification wedge attack to use stolen cards Regardless of their configuration We can use cards which are only meant to go online We can use cards that only have a signature We can use cards where the actual chip on the car Doesn't have the pin stored. There's a command which you send to the smart car saying verify pin Certain cards do not support that because they're secure secure and They don't even have knowledge of the pin But if we combine the two attacks We downgrade or upgrade the car depending on its configuration And then we force a fake offline pin reply And of course this works regardless of the car configuration We were able to test it with every car with different stores. We tested with our own cards We were able to fraud our own cards with pin, which is one two three four, which is not our actual pin So it doesn't really matter the back end is not even smart enough to understand that Offline pin verification took place on a car that has no pin whatsoever Even with cards with a signature So the Cambridge pin verification wedge attack can be applied to every single card So if the bank will tell you oh, but we only have dta cards and you don't even have a pin on the car Or you only go online It doesn't matter at all because you can always downgrade So this is an example of that run Oh again on the left side There was no pin verification whatsoever and this car was set to do pin online So we do two things we do the combination of the two attacks First of all we do change the cvm list So that the pin is being asked to the car and then we reply Yes, this is my pin. Of course one two three four is my pin And you get both the texture markers here because the signature fails And the car tells That he has verified no pin while the terminal will say I have verified a pin So we have two things that we can spot No back end that we have tested so far was smart enough to do this kind of correlation Not on the same day not after a week not after a month Nothing So this is a main problem here There's another problem EMV supports the concept of transaction certificate Which is the final thing that happens the car will speed out to determine a transaction certificate Which should be the proof of the transaction This transaction certificate is not immediately sent to the back end Sometimes it's not sent to the back end at all and you you know It should only be part when a dispute arises. So guess what? You can change that you can put it to dead beef whatever hex Leet Sentence you want to put and the transaction will go through right away So what is supposed to be the actual proof of the transaction never gets checked? So I could potentially fake my transaction certificate on all of my transactions and then claim all of them back And ask them look at the transaction certificate. It doesn't really make sense And the bank would be you know Obliged to tell that I'm right. Of course that would be not very smart But this is to give you a proof of our flow of this protocol is and this also means one thing that when you see on the car the transaction certificate the issue application data Which is what allows you to detect? The pin verification wedge attack or the application transaction counter Since those are printed on the receipt from this last phase. They can all be faked You can put whatever you want there So if the bank will ask you to see the receipt or if they will show you the receipt as a proof Of some metadata that is important You can always say that you don't trust that because you can tamper with all of that So whatever it's on the receipt With these specific parameters can be faked no problem about that and this is also important to know So the banks will have the following arguments in case of emb fraud Pin verification cannot be compromised with emb Enciphered pin guarantees security Online pin cannot be intercepted and plain text pin is get for backwards compatibility only and can only be forced If you tamper the terminal or on specific configuration All of these are not true as we shown we can always Fall back to plain text pin So all the mechanisms that are there to protect the pin verification. They do not work And we don't tamper the terminal itself I could even have my own card Which has nfc bluetooth connection to a real car and it will just do this kind of transaction The terminal is intact. We don't change the firmware on the terminal. We don't do anything wrong with it Okay, so don't take the fact that we insert as shim as an example as terminal tampering because that's not the case It could be very well be my own card So liability falls apart especially in the in the cvn downgrade one where you can have no logs in the backend so if you have a dispute The bank should at least provide you the unpredictable numbers from that same terminal or from other terminals that were used With your car on the same day They should provide you the terminal verification results. They should provide you the issue application data They should provide you the application transaction counter all of the metadata that I've shown to you They should provide them to you in order to give an analysis of exactly what happened If they don't they have no claims and even if they provide them it really depends on what's going on So depending on the different kind of attacks These are the things that you should ask and it is essential to acquire the backend data Not only the one that has the terminal and especially not the one that they received has and So the unpredictable number will give you the freshness of the terminal random numbers The atc will give you if there are any gaps in the transaction Which can make you understand if something fishy went on The terminal verification results will tell you if the offline data authentication failed or not And the carlow verification method result will tell you exactly You know what happened and they must agree with the issuer application data, which is signed If they don't agree Then an attack went on in spoofing the incorrect pin. So these are things that you should ask So what happens when we ask for this data? two options When we start asking for this data The bank sees that You know the claim goes forward because some people they just want to settle before Or they get scared and they lose their money and this is what actually happens. I have experience with this So if you get to ask the data At some point in the panels on the country again, I'm not a legal expert, but this is how it is You go to the arbiter And the arbiter Guess what? It will tell you that a burden of proof in fraud claims shall fall in the honor of the payment infrastructure And at least in Italy they rule that the pain can be acquired in many ways that are outside the carholder control Now this is the interesting thing every single Fraud case where the liability they attempted to shift the liability to the customer The bank tried to do this anyway, even if there were dozens of legal precedents With response number one So now we're in a state where this kind of response is just you know as it goes in law It's just quoted from previous cases. They won't even bother in doing the whole dissertation They say, you know go track, you know, like they do in law and order in the u.s. Go on track or in 1984 It was johnson versus miff. This is what happened. So that's what it is So but they try anyway, even if they know because what do they have to lose, right? So it is important to know that at the end of the day in most countries You are protected and they can never use the technology against you But you need to have to show that you Know the technology a little to know what to ask for because number two In some cases as soon as we ask for detailed logs. Guess what the bank settled And we had a refund I don't know why I don't know if it's because The data would have proved that some fraud was taking place I have no idea The only thing that I know is that the classic vendor response in these cases is There are sufficient security mechanism in the payment industry to prevent these kind of things to happen This is a classic response that visa massacre or any bank will give you because And in a way, you wouldn't understand them. They will never tell you That of course EMV is flawed. They would just tell you that there's a sufficient number of mechanism in place But as soon as we see fraud cases being, you know shifted to the customer as soon as I am able to fraud my own card And nobody calls me, you know, I think that there's something wrong with the system Especially where the technology can very well do end to end encryption from the car to the back end and the terminal Would just be a dumb relay But you know, this is not the case and as long as we don't admit that there are these flaws We will never We will never fix them and there's one more thing that I would like to say in the u.s Very recently, they're, you know, they're start removing after saying for many years No, we're never going to move away from the mag stripe. They're going to move to the chip and since For whatever technical reasons they're going to do chip and signature They're not going to do chip and pin. So they're going to remove All of the pin verification part which in some way it's a good thing because if you have a cheapest signature You're not liable the chip protects the actual transaction Which is fairly well protected if we ignore the unpredictable number thingy, but the transaction that's the only thing that You know is a security issue there, but that can be fixed if you remove the whole cardholder verification phase Then the cardholder is not liable. So Incidentally by doing less they're actually doing more from a security standpoint So, you know things can be done and also in the Netherlands after one of our presentation They they patched every single point of sale device in order to refuse plaintiff's min verification Of course, they did that only for local cards And I don't think that the detection of local card Uses a data which is actually signed. So I think there was a bit of a problem there But anyway, so this is how it is so um I think we have about 10 minutes for questions. So and before that I also have a little demo here. So I will show you What happens When both attacks are combined. So this is how we do them. We have an FPGA Which acts as a shim between a real card terminal and an actual point of sale device So you see them here. That's a terminal That's a reader attached to the laptop which is doing many the middle through the FPGA and the FPGA will have a smart card Car which go inside the terminal. So all of these attacks We test them with the code running on the laptop In this case, we're using one of our own cards We plug it in. So this card has no concept of offline pin in a CVM list So we do two things we downgrade the CVM on the fly So we type The amount And then a pin is being asked. So the fact that a pin is being asked right there before going offline before going offline means that the first part of the attack Was effective because we convince the terminal to be so kind to us the pin to the card And the second attack you will see is because we will just type one two three four five And that gets accepted and then the terminal goes online because we said yes and from the logs We we see that we can tamper both of them and so on So that was an illustration Thank you And before answering questions from you, I got an email from a journalist today Maybe easier. I don't know he asked me three things The german finance industry says that the weaknesses of emv in general would not be an issue as point one Sda cards would not be given out to customers Irrelevant sda is always present as a backward compatibility into every card And this is the reason why you can use your car and go abroad Because some terminals don't even know what dda is So every emv car by the standard has sda and dda if he has dda if he has sda the only sda But every dda car also supports sda is a capability Second point fallback transactions would not be allowed This might be but it's very hard to accept that very hard because if I come here as a tourist I can use my sda card and even if They would do something smart like detecting your own card. I can always fake a foreign car in order to do pin interception I could make up Mickey mouse credit card Totally fake in order to intercept the pin and you will never know because I can always reset everything Before going online. So I can always get the pin that you're typing on the terminal For there were no german emv card that were breached ever I cannot possibly comment on that without breaching a lot of nda's So any questions from the audience? There Please use the microphones Have you ever played the wrong with the idea of faking the entire card? I mean if you skim the number and then you just use a smart card to play Yes, so we skim the real card so the skimmer can read the card independently We Fake a card or we use another card a previous card like an sda card We get to the point where we do pin verification We intercept the pin we reset everything and then you would just see that our terminal resets or It will send you reject transaction and it will try it one more time The reason i'm asking is because it's relatively easy to Steal the number itself whether visually or for magnetic stripes Then if you can create a fake chip card that presents itself as that number But you actually control the chip and you can accept whatever pin and Yes, but this is only for pin interception where you actually go to the actual transaction that you cannot fake Unless it's offline So all of this is for either using a stolen card Without knowing the pin or to intercept the pin on any card Okay transactions cannot be faked unless you can predict the unpredictable number That's the only condition. Okay, so this is important Thank you there Hi So um We'll be talking only about those card readers that you find in shops because like in atms Like as far as i know if you go to an atm and and enter your pin, right? The pin is encrypted in the touchpad right and this is sent To your bank and this is like not that bad. This is actually quite Okay, right? So there there are two things that i have to say on this First of all we never play with atms because it's extremely difficult even as professional to get to audit them But i an atms is as you say they should all go online I can tell you from personal experience that at least in nidalee not all of them go online and it's very easy to understand that If you type the wrong pin Sometimes it gets rejected right away like it takes even a millisecond And you can also check by reading back the logs on your card What was actually used as a pin verification mechanism and at least in certain atms I think this was in the immigration phase They were not checking the pin online But i cannot say what is it today What i would say is that I worry much more about point of sale devices when it comes to pin interception Because there are so many of them and they're so much more insecure You know you can gain i can gain access to a point of sale device much more easily than doing it on itm I don't have cameras pointing at me. I'm not outside a bank. You know, I can collude with the merchant There are so many ways and from the liability framework perspective all I care is about one point of sale in one city Where this might have happened, right? Yeah, I agree 100 percent. I was just thinking like what to tell my Can I tell my grandmother that okay if you use an atm You're secure because your pin gets encrypted on the touchpad no matter where you are in italy, us russia, whatever in principle Yes, but in in our line of professor I cannot tell you 100 percent for sure. I I I don't know because we never tested them But in theory that's what should have happened. Yes You're much you have much better chances of being safe From e and v protocol interception on atm's But you're much less safer from actually physical interception because the atm schemers that I shown They're still there So, you know at the end of the day, you can always say that there's a hidden camera and the whole liability falls apart These are just you know more cases to say that the pin is not really a good way to make you liable Thanks. Thank you I've got a question regarding online payments Not regarding evm in some countries. I know of holland. They asked for some date of birth and then a password You know anything about the security behind this and liabilities um So a friend of mine called adam lorry From a partial labs Very smart guide as all the rfa d stuff you should check his work um One said a car with um, you know secure code by visa and mastercard where you go online and in order to provision it You know, you have a password and then if the password doesn't work It will ask you a question like the you know name of birth the birth date and so on So his daughter wanted to buy something with his credit card And adam gave the credit card to the daughter and says let's see if you can hack it After 10 minutes she came back and she totally reset Of course the old secure code Thing with data that she wasn't supposed to know because there was a secret question or a secret answer along with the birthday and so on so you know security and Birth date and and other kind of data. They don't really match together You know, we're struggling here to get proper ssl encryption from browser to websites, you know What what I know, you know, it's it's just you know It they're meaningless at the end. They're not they might have been something that I would have vaguely respected 10 years ago You know 20 years ago, but nowadays, you know, no, just no One offside question, please I have a bunch of questions from the internet first one Um are the cost of proper security actually larger than the current cost of the insecurity? Okay, so this is the classic argument from the bank. They say, okay, I have like 0.001 frost. So why would I care? If the customer if the car roller gets the money back Yes, I mean you can argue that the time spent in in in getting your money back is of course as a cost But in principle you could say yes, of course, but this is the issue here You know, they don't get their money back if they don't Fight the claim properly. So when you see the statistics about fraud They don't put into account these cases Where liability shifted to the customer and that's my old point there Even if you have one person which loses 2000 euros that they didn't lose because they were Negligent whatever that means, you know, they shouldn't lose this kind of money So I don't care if that's 0.000001% of the total profit. It shouldn't happen So we handle about a dozen cases and that's you know, that's more than enough And we know that if we which are very small company we handle a dozen cases Maybe there are so many more and maybe there are so many more people that they didn't get their money back So, yeah, that's you know, that argument is Not relevant to the kind of discussion that I want to have here Okay, three last questions. Andra will be there for more questions for you. So please yes, approach me anytime Okay, um, three more questions number four starting Just one quick comment the CVV on the max drive isn't the same as the CVV on the back of the card Those are two different values. That was correct. Those are two different ones. Yes at the beginning But in a similar vein to to what's to the to the price or the cost of the attack to what's coming out You said, um, you don't necessarily have to have a wedge and a stolen card If you're doing downgrade attacks, for example Because you could maybe have a card that communicates to the stolen card via bluetooth and Yes, that is the man in the middle But that would make an attack at a pos pretty expensive for the attacker. So it seems that that's somewhat Unlikely attack scenario if I if I stole cards, I think there's more Is this a question more? Yeah, is that um, I mean that that whole cost of attack thing applies to the attacker as well So there are two aspects here. So the first aspect is that from a liability standpoint We don't care about how likely it is as long as it can happen then from a legal standpoint then You know, you you are not negligent if this can happen The second thing is If I would be a criminal this is what I would do I would scheme every single point of sales that I can in a way Which is covert And then as soon as one card gets stolen there's a very nice database where oh you you you stole that card Hey, I have the pin for that So this is something that you can do now how likely is that happening now? I don't know. I don't think it's very likely how likely is Is that maybe five ten years from now when the mag stripe goes away much more likely So we need to address this now And having an industry which is pushing this technology as the holy grail of security doesn't help So this is my old argument here. So you can see both sides Number two, please. Um, can you comment on, uh, nfc payments? Um, yes, so nfc payments, it's it's a complicated matter. There are many ways of doing them Some of them they expose very similar vulnerabilities. What you see here because it's actually env going wireless So they sometimes they have this classic downgrade mechanism You can harvest the cvv the dynamic they have a dynamic cvv you can harvest and then replay So they have their own set of issues Different it would require another one hour talk to address them But let us say that there are similar issues there as well And it's not something that was well thought of from the beginning Okay, you have a smarker the actual signing of the transaction that is Except for the random number it is done correctly if they would adjust stick to just that phase and the random number comes from the back end That would have been so much simpler minimal design end to end easy I want to pay this done And the fact that they're not following this also Reflects on nfc in a way Another off-site question the last one. Thank you. What precautions does your team take to prevent being legally stunned on by the bank? As you probe their weaknesses So first of all in in in many of our Consulting we were actually paid by the banks to do this so In our experience most banks They don't consider these to be serious issues, but not all of them. There are a few of them which are Very exemplary in the way They consulted us into exposing the casual techniques and they have security teams which they care They are aware of all of these issues and they know that it's a political fight So I don't want to blame the entire industry second of all from a legal standpoint. I mean We have the Cambridge group which proceeded us We have done our research all of these you can read through the standard. I mean You know In our job we it's a double-edged sword all the time everything that we do 99 percent of the talks here You do something which you think it's for the greater good, but it can also be used maliciously. This is the thing We're not if I think of something I think of an attack. There's no reason why you don't have 20 other people's Thinking of that before me for criminal activities. So, you know, there's no reason to keep this Quiet, you know That's what our industry does and I think most of the audience here agrees to that and it's a well Known accepted fact of the industry. So so far we didn't have any problems at all Okay, sorry, that's it. We have to finish now Thank you very much. I hope you enjoyed it and if you want tomorrow Come see this