Okay, so we're going to kick this off. I'm just going to say I'm really honored to be introducing these guys. They're amazing. Andrew and Daniel and Zach and Adam do amazing work. I've known them for a long time and I've drunk on many continents with them. So just this is an honor to have them here. And yeah, when they say it's broken, it's busted. So without further ado, hit it off. Thank you. It's so nice to give a talk with a bottle of whiskey here. It's great. I think it's great. So I'm Andrea Barizzani. I'm Danilo Bianco. I'm Zach Franken. And I'm Adam Loring. Too many speakers. It looks like a panel. Anyway, so we're going to talk about chip and pin and we're going to talk about the chip and pin and we're going to talk about the chip and pin and we're going to talk about why we think it's definitely broken. Also. Yeah, if you're all very good and behave yourselves, major malfunction will be making guest appearance at the end and giving you a happy ending. Right. And also, how many of you have seen mine and Daniela's previous talks here at DEF CON? How many of you? Raise your hand. Okay. So we also will show in the middle of our talk how you can get laid using our technique. We think it's very important to prove that you can use these hacking techniques to get girls. There's no point in doing something very, very technical and then what's the point? Yeah, just buy it. No, no, no. You get laid. And we've got to prove that with a very cheesy Italian style movie because we're Italian. That's how we ruin our reputation every two years or so. And Zach and Adam, they didn't want to take part in it. I don't know why. We were asked. We declined. Politely, of course. You'll see why. Right. Anyway. So when we say chip and pin, we basically mean a standard which is called EMV. EMV stands for European MasterCard and Visa and it's a global standard for defining how smart cards can be used for credit and debit card operations. And it's called in different countries. It's named in different ways. Every single country has their own marketing terms. Chip and pin, I think that's the very good name worldwide. And so why are they going to use the chip on credit cards? First of all, they want to move away from MaxTribe because as we know from the excellent work done by Adam, MaxTribe are crap and they can be very, very easily cloned. It is a technology that allows to do offline card verification and transaction approval. So your point of sale doesn't need to connect to a backend in order to approve the transaction. So it's a technology that allows you to do offline card verification and transaction. And for some reason that was it's considered to be something a good feature. And you can also have multiple applications on one card. So you can have debit and credit on the same card because the chip can support several applications. One of the problems with chip and pin is as it's because it's considered to be a secure technology because well, you're using smart cards so it must be secure, there is a liability shift that goes away from the merchant and goes to the bank, but also it can shift to the card holder itself. Because what they say is that if you do a chip and PIN transaction and you use the PIN, because now you have to use the PIN in order to use a credit card, then we prove undeniably that the final customer has been using the card, or that the final customer has been negligent into storing the PIN, because maybe you've written down somewhere and someone found it. And so PIN verification increasingly becomes a proof of card holder presence, and it's very hard in case of fraud to prove that it wasn't you. And we think this is a problem, and we're going to show you exactly why. Also, if you look at some fine print of the zero liability policies, we also see that some do not apply in case of ATM transactions, because you always have to use the PIN on ATM transactions. So it's a sketchy error. Some countries are doing better regarding this, but some others aren't. They're not. This is one example. This is an article from June. There was a fraud for $80,000. Someone bought a race car with a credit card, which I think is quite impressive. And the Canadian Imperial Bank of Commerce said, our records show that this was a cheap PIN transaction, and this means that a customer personal card and a personal PIN number were used. As a result, the customer is liable for the transaction. And there's a lawsuit going on there. So EMV. So you don't have it here yet, except for a few banks, which give you an option to get a credit card with a chip. It is widely adopted over Europe. Nearly every credit card that's been issued right now in Europe has a chip. And they're pushing this for banning magstripe fallback. However, they're not really doing a good job about that, because as of today, magstripe fallback is accepted pretty much everywhere. And also, if you have a credit card with a chip, the magstripe tells the terminal that there's a chip. So if you try to swipe it, then the terminal says, no, use the chip. But then what you can do, if you put the card inside the chip slot, and the chip is not readable because you put a piece of tape on it, then the terminal says, well, okay, then use the magstripe because I cannot read the chip. So they're not really doing a good job about this entire fallback thing. And of course, as long as one country has magstripe, then it's a problem. So that's why the U.S. will move to chip and PIN, because there's a huge pressure from Europe to move and use the chip. And also, pretty soon, when you travel abroad, you won't be able to use your credit card if you don't have a chip. So just for that reason, you will get it. Also, when we travel to the U.S., the U.S. is flagged as a dodgy country for ATM transactions, as far as Europe's concerned. So it's like going to Eastern Europe. All of a sudden, you're going to Europe. All of a sudden, we've got to tell the bank we're going to the States, or else we can't get any money out. They sprung that on me a few years back. It's like, great, 24 hours. Thanks a lot, guys. So there's been already a few research about EMV. One was made by a very nice group of researchers, Cambridge, where they show you that you can use a stolen card without a PIN, which defeats the entire purpose of chip and PIN. And that was an implementation flaw, and I'm going to go in detail about that later on. But, of course, the industry claims that all these attacks are very, very difficult, and so on, and they have procedures, and so on. So we analyzed the feasibility of skimming and cloning and intercepting the PIN when it comes to chip and PIN. So hopefully everyone here is familiar with existing card skimmers. So generally, they are attached to, to devices like ATMs. And we'll have a quick look at those in a minute. We are going to specifically ignore these devices because they exist already. And what we are going to have a look at later on in this presentation is, can we turn a standard POS terminal that you would use in a shop into a skimming device? So here you see ATM skimmers. You know, sometimes the PIN is captured by a camera hidden above. Sometimes it's captured by a kind of replacement keypad overlay. And in some cases, we've seen the entire bottom sill of the ATM, including the keypad. I mean, this thing is literally this long. Some guys just rock up, clonk. So I always give ATMs a bit of a once-over before I use them. It's like, oh, does this look as if it's just been glued? Oh, no, we're okay. So, yeah. So we're going to kind of move on from ATM skinners and see if we can actually try and skim the EMV protocol coming out the chip itself. And because, you know, like all these things, because it's got to mate electrically with the POS terminal, the terminals are exposed. They have to be. Or else... Or else, you know, no connection happens. So we're going to have a look at that. Also, it's really hard, just like it is with a lot of ATM skinners, to actually verify that, you know, if they're done well, to actually verify that the terminal you're putting your card into hasn't been tampered or is, in fact, a real terminal. So Andrea knows about a little story of someone that tried to submit... an entire ATM front to a 3D printing house. Right. And this company detected that and said, okay, maybe we're not going to prove that. And they blogged about it. And I think it's discriminating, right? I mean, what if it was some security researcher or someone that works at a bank? I mean, it's really unfair. But anyway, there's really a huge activity going on into trying to build these skimmers. But also, with an EMV scanner, one of the nice things is that the POS terminal provides power, because it has to power the card up, so it can power the skimmer up as well, which is quite handy, no batteries. And we'll take you through some details of a device later on in the presentation. Okay. So, yeah, we think this is a scary prospect, and now comes the time when we show you where you can get the GURRS using this technology. Do you want to see that? Right on. I do actually play the blonde in this one. And he does a really good job. I want to buy you a very expensive price. Yeah, sure. Hello. Hello there. So, my woman needs sunglasses. Sure. Okay. Oh, my God. These are the latest ones. Oh, beautiful. So nice. What do you think, darling? Oh, I really like them. I really like them. So? Oh, yeah, yeah. Yeah, we are buying. Okay. Okay. Uh, okay. . Yeah? . Okay. Okay. . That's weird, that's weird, I don't want to miss, come on. Ha, I'm the evil hacker and I cloned all your credit cards and I stole all your money. No. You got nothing, you have nothing. No. You have money. Yes. Yes. My cards. My cards. Yes. They're all useless. No. My cards. My cards. But how did you cloned these credit cards? Yes. How? I used the power of microcontrollers. Love me, love me. No. My cards. My cards. No. I'm alone. I'm alone. No. No. My cards. So, you are also alone. It works. Oh, I forgot the summary, sorry anyway. No, sorry, I forgot that these lies where I mention that the GERD is the actual return of investment, and it's a very strong business point on our part. No. Yes. Okay, so what's interesting about talking to smart cards is the way the data is actually transmitted between the card and the reader. It's done using things called APDUs, and these APDUs are in plain text, although they may contain cryptograms. In the case of the PIN, as you can see here, the second APDU in the example is actually doing a PIN verification, and we see the PIN 6666 in plain text in that example. Now a PIN on a credit card, on a chip and PIN card, is not like a PIN on your mobile phone. So on your mobile phone, you have to actually put the PIN in, if it's PIN locked, to unlock the SIM before you can actually use it. On a credit card, the PIN is entirely optional. You can read all the data from the card. I never actually asked the card to verify the PIN. You still get all the data that's stored on the card. So basically what happens is when you stick the card into the machine, the machine reads all the data it can from the card, decides from that data what it's going to do next, including how it's going to authenticate the card, whether it should verify the PIN, whether it should take a signature, whether it should do nothing at all, and then the transaction proceeds from there. So basically there's a list within the terminal that says what kind of authentication methods are available, and there's a list within the card which says what type are available or acceptable, and they walk down the list together until they find a matching pair, and then they try that. And here we have an example of the data that's stored in some of the data files. So this particular file has stuff like track 2.0. This is an actual copy of your mag stripe with some small changes. So I can take your chip and PIN card and read off a copy of the mag stripe without ever verifying the PIN. So I've effectively skimmed your mag stripe in a chip and PIN card. So that's the skimming part of it. We've taken that. We also need to get the PIN itself. Within that data, as you can see, you've got the effective date, the expiry date, the PAN, which is the primary account number. So the actual card number. And so on. Card name and so on. You can actually reconstruct the mag stripe from that data, but as I say, you've also got an image of the data anyway. So generally, you wouldn't need to do that. Do you want to just talk quickly about the CVV? Yes. So it used to be, since I think two or three years ago, that 100% of the data present on mag stripe was present on the actual chip. So again, as Adam said. If you skim the chip, which is considerably easier from a hardware perspective to do on a point of sale device, you can then clone to mag stripe right away and then you can use the mag stripe in a country where the chip is not accepted or by doing the trick, which I explained before, that you swipe, then you put a chip that cannot be read, and then you swipe again. They realized after a few years that that was a problem. And now the data... The data present on the chip, which allows you to clone to mag stripe, is all there except for a three-digit number, which is called the CVV, which now is different on the smart card. So it is some form of protection, but knowing that all of this is based on a three-digit number is quite worrying. Because first of all, if you clone to a thousand different cards, one will be right if you try over the CVV from 0000. So if you try over the CVV from 0000 to 999, which might not be a huge deal, and also if you can massively skim credit cards with the chip, and you can massively do it when you do it at a point of sale, even if you try a random CVV, you will get some right. And also, in most cases, banks are really not doing a very good job in warning you that there's a fraud if they see a CVV which is incorrect. They would just assume... They assume that for some reason the mag stripe doesn't be read correctly, and they'll move on. So it is some sort of protection. It is good to know that we cannot clone to mag stripe right away, but being labeled a three-digit number nowadays is not that comforting. So here we talk about what you can do by using the data which you get from the chip for online usage. So as it turns out... There are many websites that they do not check the security code nowadays. And ironically, I was frauded. My credit card was frauded while we were making this talk, which I think is very nice. And my credit card was used on five different websites on the internet that they do not check the security code. And also, it was used against one kind of company which acts as a broker that gives you cash if you try to make a transaction without a security code. There are very dodgy companies that exist specifically for enabling this kind of behavior. And all the data that was used for doing the fraud is present on the chip. And so this is the website, one of the websites where it was used, Dolce & Gabbana online store. And they used the data. This is an optional security code. They got the goods. The shipment was delivered to them. So I was warned just five days after. And they also sent a gift to me. Paid with my own money from Dolce & Gabbana, which I thought was very nice. It was very thoughtful. Here, we're getting your money. But here's a nice Dolce & Gabbana, I don't know, full art, which was disgusting. Anyway. And actually, in the same period, my son went on vacation to Italy, as it happens, and used his chip and PIN card in a bar. And a few hours later, he got a call from his bank saying there's someone in Bangkok trying to extract. Money from a cash machine. So yeah, 50% of us here got frauded on our chip and PIN cards in the period where we were preparing these slides. So pretty good record, really. So just a quick introduction about the different technologies, different families, different kind of chip and PIN cards. So basically, we have two main families of chip and PIN cards. The SDA and the DDA. SDA stands for Static Data Authentication, while DDA stands for Dynamic Data Authentication. And basically, here, we are talking about two different technologies used in order to validate the authenticity of the card against the terminal. Visa and MasterCard mandate that all the cards issued after 2011 are authenticated. So basically, we have two different kinds of cards. One of them should use DDA. Actually, this is not... Yeah, we don't think it's happening 100%. Yeah. Actually, what we saw during our research is that, I mean, we tested... About 40? Yeah, probably. Something like that. And only one card was DDA, actually. Good bank of Scotland. And I got a new card this year, which will expire in 2015. And it's still SDA. And now, it will be clear about the difference between the two technologies. So, yeah, SDA cards, basically, they are not able to perform a proper encryption. And what does it mean? It means that the data on the card is signed with a static signature. And the symmetric key is used during the actual online transaction. But during the process of the card holder verification, you will see a little bit more about that in the next slides, they cannot perform the PIN verification in an enciphered mode. That means that the PIN verification is always made in clear text when an SDA card is used. While the DDA cards, the hardware, the actual chip is different. And they have a... An encryption coprocessor. That's why the chip on this card is more expensive. And they can perform proper encryption. And in this case, the PIN can be verified by the terminal in an enciphered mode. So SDA cards, at the end, cannot be encrypted. Cannot be cloned. But in a general way. But can still be cloned in order to create a so-called yes card. That's a card that's always reply yes when you try to verify the PIN, no matter what you are inserting. But they can only be used for offline transaction. Okay. Maybe we will see a little bit more... Yeah. And offline transactions, they're very rare in Europe anyway. Offline transaction, it means that... So we have two different steps. One is the validation of the card, which always happens offline. And then there's a validation of the card holder, which might happen offline or online. And that's the actual transaction. The transaction might happen offline or online. But in Europe, 90% of the time, it's always online. And that's why an SDA card clone... Yeah. ...cannot really be used in Europe. However, the fact that EMV was pushed also because of enabling offline transactions and the fact that you can actually clone the card for doing offline transaction, kind of means that the technology doesn't really work. So they realized this and then they said, well, but with DDA cards, we have a dynamic verification so you cannot actually clone the card anymore for offline verification because you need the real... You need the real card because there's a challenge response going on. However, what you can do as the validation step of the card and the actual transaction are separate, you can present one valid DDA card for the actual authentication of the card and then you present a different DDA card for the actual transaction or actually a fake DDA card, which will reply with something with a non-valid cryptogram. But as the transaction is offline, the terminal has no chance to verify that. So even DDA cards with a more complicated fashion, they can also be cloned. So we discussed EMV skimming usage for max stripe cloning, online usage. We know that if you steal a card, you can use it without the PIN, thanks for the Cambridge research, which is actually an implementation flaw, which can be fixed by the banks, but most of them, they're not doing it because it's very hard to get the implementation of this standard right. So the standard here is how long? Five books? Four books. It's four books and every book is about 300, 400 pages. So no standard needs to be that long. And when you have something which is so complex, everyone will get it wrong while implementing it. And the Cambridge attack is one prime example. So the question we pose, if you use state-of-the-art EMV, we exploit every protection that EMV can enable us, are the PIN really protected? Because remember, the PIN can prove the cardholder presence. And therefore, the use of a stolen card. So let's assume that the Cambridge attack will be fixed, because it can be fixed. Is there still anything that can be done? Or is chip and PIN, you know, 100% secure? So this is a cardholder verification list, which is read by the terminal in order to determine which cardholder verification matters. And this is where the methods are going to be used. As we can see, there is plain text PIN verification performed by the card, which is the one that SDA does. There's enciphered PIN verified online. There is signature. There's an enciphered PIN verified by the card, which is what DDA does. And there's also no CVM required, which is the one that is used actually, for example, at toll roads. When you want to pay with your credit card, you don't have time to sign something or to enter your PIN. That's when no CVM required is used. And this is sent to the terminal. It's read by the terminal as a list. So there's a priority of methods. And if the first one fails, then you can fall back to the second one, and so on and so on. So this list, it didn't use to be signed. So remember, SDA and DDAs, they also have a static signature of the data. It didn't use to be signed. But now it is signed on every card. So it is believed to be tamper-proof. If you tamper with the list by doing a man-in-the-middle attack, then it's a tamper-proof. The signature of the card will be invalid. So if the authentication method is signature or enciphered PIN verified online or enciphered PIN verified by the card, then the PIN is not sent by the terminal to the card in clear text. And then you cannot skim it, basically. And it is believed that only when plain text PIN verification performed by card is present and selected by the terminal from the CVM list, then the PIN can be harvested by the schema. So let's talk a little about action codes. Action codes, so assuming that we have a DDA card, okay, that can check the PIN enciphered, and let's assume that this DDA card has a CVM list with only one entry which says enciphered PIN verified by the card. So there's no chance that you can actually have a plain text PIN verification. So what can we do? So there are some other pieces of data on the card which are called the issuer action codes. So the issuer action codes, which are in pair with the terminal action codes, which are some settings which are present on the terminal, they specify the policy for accepting or rejecting transactions. And the two codes are all together. So there are three kinds, denial, online, default. And the online action codes, they specify which failure condition triggers online transactions. So what does it mean? This is one example. These action codes means do not deny a transaction without attempting to go online. If offline SDA fails, transmit the transaction online. So basically, the card can say to the terminal, if you fail to verify me for some reason, do not reject me. Let's still work together, which is, you know, kind of a wrong concept. So in every tested terminal and cards pair that we were able to test, we could always manipulate the action codes. So the temporary with the CVM list. This does not result in offline rejection. And what happens is that when you tamper with the CVM list, even if the signature is embodied, the CVM list is honored by the terminal. So you can always downgrade from enciphered pin verification to plain text pin verification, no matter what kind of card you're using and no matter what the original CVM list was, bypassing completely these two settings which EMV provides you. Specifically for protecting the card level verification method. And that's one example of a pin being actually skimmed on SDA and DDA cards. So it is broken. And Adam, do you want to talk about this? Yeah. So here's an example of a specific transaction that we sniffed. So the slide before you had a protocol analyzer showing you some data going on. We used that to sniff this conversation. So you see in this card. It's inserted in the terminal. It selects the visa application. It reads a bunch of data, makes its decision it's going to go online. And the final command, generate AC, is generate application cryptogram, which is an encrypted packet that's sent to the online system to verify the pin or whatever it is that it's doing. If we then take the same transaction in the same machine but now using our man-in-the-middle attack, we've downgraded the action code to say don't fail. Don't fail if you've failed the offline authentication. And we've also downgraded the CVM to say, well, do a plain text pin instead of an encrypted one. And so now at the bottom, you see a couple of extra commands have appeared. It asks how many tries it's got left on the pin, and then it does a pin verification in plain text. And we can see the pin in this case was 1234. It then carries on and does the online transaction. Now. We don't care whether or not that transaction fails, because we've achieved our objective. We have now, at the same time as reading all that data, we've logged it all into the skimmer. I can come along with my card, my special card, plug it into the machine, and it will dump that log onto here. I now have all your card data and your pin, because you did a plain text pin. Right. So very quickly, because we're running out of time. So what can do the back end to detect this kind of behavior? So the back end. So the back end will detect that the offline authentication failed. But we don't think that's a good reason for actually blocking the transaction or invalidating the card, because that can happen for several reasons. And also, the back end will see that the last CVM that was used was the plain text pin verification. However, there are ways to get around that. This is another piece of data which is sent by the card to the back end, which also says, if the offline verification was performed or not. And this is actually the bit that can be used to prevent the Cambridge attack. Because what happens is, in the Cambridge attack, what they do, they tell to the terminal that the pin verification has been performed, while the card doesn't see any pin verification. And so by correlating this data here with this data here, you can actually tell that the terminal has seen a pin verification and the card has not. So you can block that attack. But no one does it. Because every back end is not implemented very well. Anyway, so the way that you can prevent this kind of detection, which, again, we don't think can be used to actually prevent this kind of attack. And we get the pin anyway, because all of this back end detection happens after the transaction, and we get the pin already. So one thing that we can do, we can have a downgrade CVM list, which says offline pin and then online pin. And when we verify the offline pin, we then send to the card the incorrect pin, so that then we fall back to the back end. And that's what's going to be in store as the last CVM being performed that the back end can see. And the only downside is that the customer will be prompted twice for the pin, which, well, we don't think it's a huge deal. There are also other ways that I don't have time, so maybe in the QA we can explain. There are other ideas which we haven't tested that can exploit the fact that all the phases are separate to have a completely clean terminal verification results. And all the other data that the back end sees. So the industry loves to point fingers at impracticality. They say, well, but if you want to scheme the cards and do something like this, then you need to build something like this, basically. And that is too big to fit in the POS. So this is what we've done. So this is called Fly. And you'll find out why it's called Fly in a minute, because we have another device called Spider. But this was basically built in a day. We worked together on a project to test some POS terminals, and this is one of the devices we came up with. So you see a flexi circuit here. And actually, if I can swap across, if you can hit input 1. Let's see if we can see this. Okay. So this is... This is Fly. It's really thin. And this was all hand... The board was handmade and hand soldered. So that's why it's got these big vias on it and this particularly large chip on it. It can be made a lot smaller. And basically, this guy, the green cable here is just for programming the microcontroller. And this little sticky out bit actually has an LED on the end, just so we could know it was working. But basically, when it's in operation, these get cut off, and there's a little hook at the back that hooks into the back of the POS terminal. So basically, you have an insertion card. You make like you're making a transaction. And you insert it into the POS terminal. And it sits as a shim in between the actual terminal itself and the card. Now, we'll have a look at... Yeah, we have the name. Yep. So here we see it installed. And basically, it sits there quite happily. The POS terminal manufacturer, if you can see the kind of little divots in that card acceptor, helpfully left me lots of space. It was just the right size for my microcontroller. Thank you very much. And... Yeah. So in this operation, we simply insert it, it hooks in, and just lives in the POS terminal. And once a week, once a month, someone rocks up with a card like this, except we'll just put a sticky label on it to make it look like a card like this. Insert it in, and it will download all the data to this Jacob card. And we can walk away with it. Now, we did this research back at the end of last year. And subsequently, we've discovered that, in fact, these devices are out in the wild. And in fact, have been found out in the wild with a handy little 2.4 gig radio chip. So you don't even have to show up with your card to download the data. And they also had a serial number printed on it, which I think is very scary. Yeah. So just so that you can do the happy ending, which I know it's important, let's brush out... I'm just going to quickly... I'll quickly show you a couple of other quick bits. If this has... Wakey, wakey. No, hold on. One. It's... It is one. Yeah. There we go. So we also developed a device to do the Cambridge attack. This is called Spider. So here we have our stolen card that theoretically would not be usable at all. And again, you just pop Spider on there and just put a sticker over the top. And Spider will implement the Cambridge attack. Yeah. You'll notice I covered up my card number while... And also, we knocked up another little device, because some of these chip and pin terminals aren't very compliant, so they have a nice decorative cover around the keypad. We have pictures for that. Yeah. Well, we discovered we could pop it off, and this guy, when it's populated, is about two millimetres thick. And it will sit there and skim the... The key presses using IR brake beams. So to sum up, we think an EMV skimmer poses a serious threat due to the ease of installation and very difficult detection. There's simply too much data going on in the clear from the card to the terminal, which can be used on fraudulent usage on websites. If you brute force the CVV, you can still clone to max stripe, and we can always intercept the pin that then can be used with a stolen card on an ATM to get cash, despite the card configuration and type. And all of this raises serious liability considerations when the pin is being used. We got a very nice vendor response. My favourite quote is, MasterCard spokesman said in an interview that the EMV system is simply too complex for an easy fix. When you have a technology that is so complex that you cannot fix it when you have security vulnerabilities, you should trash it. Yeah. And do something better. However, in the Netherlands, the whole has been fixed. They just shut down every point of sales for four hours, and they broke compatibility with the standard by disabling the possibility of doing plain text pin verification with domestic cards, because they knew that all domestic cards are DDA. They can still do the plain text pin verification with the foreign cards. The actual country code on the card is not signed, so we're not sure if this actually is an effective method or not. And we have to apologise to any Dutch people here, because we did take effectively the POS network in Holland offline for two days while they patched their firmware. Sorry, guys. So recommendation, they should do crypto from start to end with proper implementation. There's no other way around it. This is simply too complex, and it is a wrong concept to put your pin in a device which you cannot trust when it is the card itself that verifies the pin. Yeah. The terminals cannot be trusted, as we've seen. This is a terminal which has actually been tampered with, and no tamper-proof sensors went off, because they don't concern about this kind of outer casing and about the actual card slot. So of course you can patch EMV by disabling, as the Netherlands did, plain text pin verification on every POS and ATM in the world. It can be done. Some say, no, it's too complex. I think it's feasible. But, you know, there's no way around it. You should probably spend some time to build a better protocol. So when you get EMV in the US, let's hope that this will be fixed, and we will all be happy to help you in doing that. So happy ending. Give these guys the happy ending. Okay. So I'll do this really quickly. Because we don't have a huge amount of time. But Zach and I were here on a business trip back in February. And while we were here, there was a lot of buzz about this new system that was available. Basically it's a credit card processing system, which allows hookers and drug dealers, I mean small businesses, to accept credit card payments. And you get this little dongle. And you stick it in your iPhone. Or your iPad. And you can then swipe cards. So we were looking at this thing. And we thought, oh, that's pretty cool. That's pretty neat. How does it work? And a friend of ours gave us one to play with. And so we had a look at it. And we were sitting in the lounge on the way home. We had about a half hour layover in the lounge. And so we looked at this thing. And we decided, obviously, it was just using audio. You've lost your audio. Maybe cable? Yeah. There you go. Yeah. It's cable probably. So yeah. It's obviously just using audio. It's converting the MagStripe to audio. And then the audio is being processed by the application on the iPhone. Does that sound familiar to anyone? Heard this before? So yeah. I gave a talk about five years ago called MagStripe Madness, which was all about dicking with credit cards, using sound cards, and so on. Do you want to stick me on? Technically. So we ran across the road, across the road, across the hallway from the lounge and we went into Brookstone and we bought one of these little adapter cables to convert a standard PC into a Mac input. And I fired up my old software. And basically what my software does is it will take an arbitrary string and convert it to sound in the same way that a card reader would. Wrote a little application called CNP, which is card not present. Yeah. And if I play it, that's what it sounds like. So that's data being converted to what a MagStripe would sound like if you swipe it. So the idea is we now feed this into the Square application. Now we're not going to do this step because we did it at Black Hat. So we found this willing victim, actually benefactor. Sunshine. Sunshine. So we're going to give her some money. And we did this demo at Black Hat. Strangely, when we tested it this morning, it doesn't work anymore. Her account, when you try and swipe a card, goes, oh, you're a new user. How would you like to set up a new account? And you go, okay, and set up the account. And then you swipe the card again and it says, oh, you're a new user. How would you like to set up an account? So the speaker goon that walked me around here, he's a speaker. Agent X has a badge on his jacket saying, fuck it, let's do it live. So fuck it. Anyone got a Square account? Want some money? Question was how much. Okay. So the other half of the proposition is we've got these gift cards. We couldn't test this in the U.K. because you have to have a U.S. bank account and you have to have a U.S. credit card. We had neither. We solved the second problem by just popping into a convenience store. And buying a U.S. gift card, which is a debit card, a.k.a. a credit card. So I have 100 bucks on here. Okay. You have a working Square account? Come on up. . . . . . . . . . . . . . . . . so this is what happens when we um do it onto the existing account that we tested at black hat so there's two possible things they've either flagged the card um turn it the right way up i'm not sure i can okay you could you could come and you can read sideways you're at defcon amazing apple technology hack your brain um so yeah we tested this at black hat square does geolocation so we can assume they went uh who was at black hat at this time and did a one dollar transaction um okay we'll block that account so we're guessing that account's been blocked or they flagged the card you'll notice i brought up gift card two on my screen so we've got two of these babies so if you flagged the card tough we got another one i there there was uh another possibility can we do the which they could have possibly twigged that the signature was slightly suspect you think so yeah that looks fine to me of course this was this was done after they'd actually verified the transaction yeah so i i'm going to flip back to camera now if i can so if this this gentleman here i was hoping for an attractive young lady that i could offer money to in vegas uh but uh i guess he'll have to do well right so to make this a legal transaction i really ought to buy something from you um so uh maybe some advice uh bend over there you go will you bend over for me told you there was a happy ending for a buck come on for a dollar come on we're running out of time present a fee yeah go for it okay for that i'm going to give you 10 bucks okay so um we're going to try hopefully get the screen to work we'll put 10 bucks onto there so do you want to do you need to come and operate your device okay so how you want to set it to take a payment if i just swipe a card maybe try swiping the card no you're on account setting so hit back i guess ah you're not logged in okay we might not want to watch this step all these people are busy stealing my money so that was a valid credit card i flashed up there if you can get the hundred bucks out of here i'm going to give you a credit card if you can get the hundred bucks out before he gets his it's yours that's b four three five eight eight oh eight five one nine oh nine fail sign in failed yeah they blocked defcon i guess the vendors in there are pretty unhappy as well i saw some of them using square too they just flagged the entire rio as a yeah take square off for an hour we'll be fine one minute two minutes if i give him 20 bucks do we get three minutes it's going he's logging in okay it does say signing in at least at the moment sign and fail never use a human for a demonstration i know anyone else got square crown real quick that's working and live and up and ready get up here quick quick quick that's okay thanks for trying i'll buy a sprint for ten dollars that's good he bends over i'll give him 20. you wanna bend over? yeah go for it wooho okay so so do you swipe first or do i type the money first um i should be able to just hit swipe and it should say i've seen a card is this an i device? No, it's an Android device. No, that's the fail. It doesn't have the... We're using the iPhone adapter. Okay. Loss of screen. No video. No video. Hang on. Probably went to sleep. No. No. Sorry. There. There. Yay. Okay. Please retry Skype quickly. I just bloody turned it off. Nob. Slide to unlock. Just checking. Okay. So we've obviously got volume differences with Android. Are you happy with your Android speakers? Okay. I think we're going to have to call it epic fail. But you saw the screenshots from the demo that did actually work over at Black Hat. But, yeah. Thanks. Anyway, that was a new twist on an old hack. Thank you. Thank you. Thank you.