1 00:00:00,000 --> 00:00:05,520 Hello. Thank you to be here today. We're going to start. We're 2 00:00:05,520 --> 00:00:07,620 going to talk about NFC payments, the outdoor relay and 3 00:00:07,620 --> 00:00:12,960 replay attacks. Basically, who am I? I'm a security researcher, 4 00:00:13,260 --> 00:00:17,200 a freelancer. I work in California. I present here in 5 00:00:17,200 --> 00:00:20,360 DEF CON like two years ago about Samsung Pay. Also last year I 6 00:00:20,360 --> 00:00:23,060 present about exploiting all my information with Bluetooth 7 00:00:23,060 --> 00:00:28,340 audio. This is my third time in DEF CON in a row. I'm probably 8 00:00:28,340 --> 00:00:31,680 a woman in DEF CON which basically is a foundation that 9 00:00:31,680 --> 00:00:34,480 helps women to come to a conference like security and 10 00:00:34,480 --> 00:00:39,340 technology calls. Basically, this tag is how we can move 11 00:00:39,340 --> 00:00:43,440 transactions from one place to another. And we are going to 12 00:00:43,440 --> 00:00:46,580 research about how we can implement replay attacks and 13 00:00:46,580 --> 00:00:50,940 relays using this technology. And of course, using open 14 00:00:50,940 --> 00:00:55,700 source tools to do that. In this case, I'm using a same 15 00:00:55,700 --> 00:00:58,320 device to move one transaction from one place to another. 16 00:00:58,340 --> 00:01:01,640 I'm using one device, in this case, a Samsung device, acting 17 00:01:01,640 --> 00:01:07,500 as POS on a Samsung Pay technology. A little bit about 18 00:01:07,500 --> 00:01:11,620 the content of this tag. It's about an intro to NFC. We're 19 00:01:11,920 --> 00:01:16,120 going to talk about MEV flow process. And also the fraud 20 00:01:16,120 --> 00:01:20,300 vector of this technology. We're going to talk about also the 21 00:01:20,300 --> 00:01:27,480 previous work from Peter Fillmore and Mr. Roland. Also 22 00:01:27,480 --> 00:01:28,320 about the NFC environment. We're going to talk about the 23 00:01:28,340 --> 00:01:32,440 simulation, which is one of the keys in these attacks. Replay 24 00:01:32,440 --> 00:01:35,780 attacks from, in this case, I'm going to use Google Pay flow. 25 00:01:36,820 --> 00:01:40,560 And relay attacks for any kind of device. Implementing HTC or 26 00:01:40,560 --> 00:01:45,340 secure elements for Apple Pay. Also how we can strike chips 27 00:01:45,340 --> 00:01:50,840 data implementing NFC. A new attack that I call a relay for 28 00:01:50,840 --> 00:01:55,640 replay. I also call it a smart relay attack. And how this could 29 00:01:55,640 --> 00:01:57,140 affect new technology to come. 30 00:01:59,040 --> 00:02:04,200 Basically, NFC technology, it's part of, like, you can have two 31 00:02:04,200 --> 00:02:07,520 devices that they need to be close to each other to make a 32 00:02:07,520 --> 00:02:10,620 transaction or a communication between them. We're talking 33 00:02:10,620 --> 00:02:15,980 about 10 centimeters. But that doesn't mean that we can make an 34 00:02:15,980 --> 00:02:19,320 amplitude of this signal to communicate to devices in a 35 00:02:19,320 --> 00:02:25,420 large range. NFC is in the high frequency and the RFID 36 00:02:25,420 --> 00:02:28,320 spectrum. Basically, it's implemented in the high 37 00:02:28,340 --> 00:02:29,100 frequency range. It's implemented in passive technology. 38 00:02:31,380 --> 00:02:34,380 One of the characteristics of NFC technology and the payment 39 00:02:34,380 --> 00:02:39,860 systems is that it implements 13.56 megahertz passive mode, 40 00:02:40,020 --> 00:02:45,040 which basically it needs another device to boot up another, for 41 00:02:45,040 --> 00:02:48,600 example, in this case, it could be the cell phone or a smart 42 00:02:48,600 --> 00:02:52,780 card, credit card. It's widely implemented. Basically, many 43 00:02:52,780 --> 00:02:58,320 devices implement NFC. And you use the ESO 14.4. It's a 44 00:02:58,340 --> 00:03:02,480 3A. In this particular case, we're going to talk just about 45 00:03:02,480 --> 00:03:07,980 bank systems. One of the main questions that many people ask is 46 00:03:07,980 --> 00:03:11,300 how this process starts. Basically, when you approach to a 47 00:03:11,300 --> 00:03:15,400 terminal to make a payment, the terminal starts the transaction, 48 00:03:15,620 --> 00:03:19,840 not the smart card or the device like Apple Pay or Samsung Pay. 49 00:03:20,440 --> 00:03:24,120 Always, the terminal starts the communication with the devices. 50 00:03:25,440 --> 00:03:28,320 For example, this is a transaction that we're going to 51 00:03:28,340 --> 00:03:32,240 implement in the smart watch. Basically, you have to have in 52 00:03:32,240 --> 00:03:35,420 mind how this works. Basically, you are in the shell. You test a 53 00:03:35,420 --> 00:03:39,000 command and the system responds back. It could be with right 54 00:03:39,000 --> 00:03:41,820 answer or wrong answer. But basically, it's in the way they 55 00:03:41,820 --> 00:03:45,540 works. With four commands, we can make a transaction, 56 00:03:45,700 --> 00:03:49,880 basically. This is how NFC works. We're going to get into 57 00:03:49,880 --> 00:03:55,080 details about these transactions in a few slides. A little bit 58 00:03:55,080 --> 00:03:58,320 about how this transaction works. First, we're going to 59 00:03:58,340 --> 00:04:00,540 talk about the tokenization process. The POS detects the card 60 00:04:00,540 --> 00:04:03,820 or the smart card. List the applications. Select applications 61 00:04:03,820 --> 00:04:07,760 to get data. Implements the fraud vectors. Also, the managed 62 00:04:07,760 --> 00:04:11,160 risk. Some actions from the card and from the POS 63 00:04:11,160 --> 00:04:15,200 simultaneously. And after that, the complete transaction. The 64 00:04:15,200 --> 00:04:17,840 complete transaction doesn't mean it could be a successful 65 00:04:17,840 --> 00:04:20,380 transaction. It could be a declined transaction. But the 66 00:04:20,380 --> 00:04:25,700 transaction has to be finished some way or another. A little bit 67 00:04:25,700 --> 00:04:28,240 about the tokenization process. Basically, the tokenization 68 00:04:28,340 --> 00:04:32,180 process is how you convert a physical card to a virtual 69 00:04:32,180 --> 00:04:35,620 credit card. This process basically is when you're making 70 00:04:35,620 --> 00:04:39,640 a payment with Samsung Pay, let's say. Every time you're 71 00:04:39,640 --> 00:04:44,240 making a purchase, the system is generating a new card. This is 72 00:04:44,240 --> 00:04:49,940 for to avoid fraud attacks. For example, if someone is able to 73 00:04:49,940 --> 00:04:54,700 intercept a token, he can use just for one time. But not for 74 00:04:54,700 --> 00:04:58,100 more times. The idea of this tokenization process is to 75 00:04:58,100 --> 00:05:01,160 add security to the physical cards. Instead of using the 76 00:05:01,160 --> 00:05:04,520 physical card numbers, you're using the scramble data, let's 77 00:05:04,520 --> 00:05:09,320 say. How the tokenization process works. Basically, when you use 78 00:05:09,320 --> 00:05:12,080 your cell phone to make a payment, it could be Apple Pay 79 00:05:12,080 --> 00:05:16,960 or Samsung Pay or whatever. The terminal detects the token. On 80 00:05:16,960 --> 00:05:19,720 this token, it sends to the payment network. And we have 81 00:05:19,720 --> 00:05:22,480 another party working on it, which basically is a token 82 00:05:22,480 --> 00:05:26,100 service provider, which relates the token with the physical card 83 00:05:26,600 --> 00:05:28,080 number. So, this is how the tokenization process works. 84 00:05:28,100 --> 00:05:31,760 After it relates the transaction, it sends out to the bank, and 85 00:05:31,760 --> 00:05:36,560 it accepts or reclines the transaction. Some of the technology 86 00:05:36,560 --> 00:05:41,040 about NFC, basically, we have secure element for Apple Pay, 87 00:05:41,160 --> 00:05:44,920 Samsung Pay, and for Google Pay, the new version 88 00:05:44,920 --> 00:05:48,760 of Android Pay. Some of the characteristics of this 89 00:05:48,760 --> 00:05:52,620 technology is that secure element is more than 20 years 90 00:05:52,620 --> 00:05:57,780 implemented. It has smart card, received access, and also it has 91 00:05:58,100 --> 00:06:00,820 self-encryption. Self-encryption, I mean you have 92 00:06:01,360 --> 00:06:05,380 cryptograms inside of the device so you can validate the 93 00:06:05,380 --> 00:06:08,840 transactions. In the host card emulation, on the other side, 94 00:06:08,940 --> 00:06:13,200 we have limit use keys, tokenization process, cloud 95 00:06:13,200 --> 00:06:16,640 cryptograms, and transaction risk analysis. And this part is 96 00:06:16,640 --> 00:06:19,480 like the Google Pay technology. Basically, when you add your 97 00:06:19,480 --> 00:06:22,620 card to the Google Pay, it unloads four or five tokens to 98 00:06:22,620 --> 00:06:25,040 your device, and you can use these tokens to make payments. 99 00:06:25,240 --> 00:06:28,080 After you finish this pile of tokens, it unloads four or five 100 00:06:28,080 --> 00:06:35,240 more tokens. So you can use them. The NFC fraud vector. The 101 00:06:35,240 --> 00:06:38,020 motivation about this attack is because you have low limits but 102 00:06:38,020 --> 00:06:41,180 higher in other countries. Basically, if you stole $50 in 103 00:06:41,180 --> 00:06:44,580 the United States, if you move this $50 to another country, that 104 00:06:44,580 --> 00:06:49,100 $50 will increase in value in another country. You don't have 105 00:06:49,100 --> 00:06:53,020 any additional calculation verification, which basically, if 106 00:06:53,020 --> 00:06:56,860 it's less than $50, you don't need a PIN or a signature or 107 00:06:56,860 --> 00:06:58,060 anything like that. So you don't have any additional verification 108 00:06:58,080 --> 00:07:00,020 or anything like that. And also, from our perspective, the 109 00:07:00,020 --> 00:07:03,820 fraud is considered an accepted risk. And the main thing is that 110 00:07:03,820 --> 00:07:11,300 NFC is implemented in many IoT devices. Attack is the while. We 111 00:07:11,300 --> 00:07:14,720 noticed that a few years ago, in 2015, one guy was in the metro on 112 00:07:14,720 --> 00:07:18,660 the subway using a POS, basically, to make, to get close 113 00:07:18,660 --> 00:07:23,440 to people and try to get the NFC transactions, making offline 114 00:07:23,880 --> 00:07:27,800 transactions. And after that, he convalidated them with, using 115 00:07:28,080 --> 00:07:32,420 online transactions. The previous work about this NFC, 116 00:07:33,980 --> 00:07:38,020 basically, Mr. Roland presented a replay attack about MasterCard 117 00:07:38,020 --> 00:07:44,480 in 2013, which he said, if you implement the unique number to 118 00:07:44,480 --> 00:07:48,200 zero, you can, let's say, guess it, which is going to be the CBC. 119 00:07:49,480 --> 00:07:54,300 And for four transactions, three of them went through. So it was 120 00:07:54,300 --> 00:07:58,060 a very good attack. In 2015, we had a very good attack against 121 00:07:58,060 --> 00:07:58,700 Black Hat. And a lot of people are saying, Peter Fillmore 122 00:07:58,700 --> 00:08:01,720 presented Black Hat about how you can turn on the master bit 123 00:08:01,720 --> 00:08:05,880 and the IP. Instead of using all the security in the NFC 124 00:08:05,880 --> 00:08:10,220 transaction, you can reduce it to the max type level. Which 125 00:08:10,220 --> 00:08:15,540 basically you can use this against the Visa card. Also, 126 00:08:15,580 --> 00:08:19,740 about the hardware side, previous work in last year, the 127 00:08:19,740 --> 00:08:23,800 man in the NFC, guys from Asia present two boards, which 128 00:08:23,800 --> 00:08:27,800 basically was a client on a server, which you can implement 129 00:08:28,060 --> 00:08:31,720 to make a relay attack using SDR technology. Basically, it's a 130 00:08:31,720 --> 00:08:35,960 specific channel to make this relay attack. Some of the 131 00:08:35,960 --> 00:08:40,080 limitations, it was a private prototype, and it has a special 132 00:08:40,080 --> 00:08:46,260 design. Let's talk a little bit about NFC emulation. NFC 133 00:08:46,260 --> 00:08:51,180 emulation is where you can have a NFC reader and behaves like a 134 00:08:51,180 --> 00:08:55,020 smart card, or like NFC. Basically, NFC has three modes, 135 00:08:55,160 --> 00:08:58,040 which is reader and writer, peer-to-peer communication, and 136 00:08:58,060 --> 00:09:01,940 emulation mode. And you can change the configuration of the 137 00:09:01,940 --> 00:09:08,100 reader to do different things. So the art of this part is how we 138 00:09:08,100 --> 00:09:11,960 can put the emulation mode in a NFC reader. In this case, it's a 139 00:09:11,960 --> 00:09:17,060 ACR122. Basically, you can initialize as target this NFC 140 00:09:17,580 --> 00:09:21,920 reader, implementing some native commands or APD commands. You 141 00:09:21,920 --> 00:09:27,480 can see all these commands in the data sheet of this reader. But 142 00:09:27,480 --> 00:09:28,040 thanks to NFC, you can use NFC to do a lot of different things. 143 00:09:28,060 --> 00:09:31,700 To go to Adam Lurie, he created a library which basically, you 144 00:09:31,700 --> 00:09:34,980 have all the commands to this reader so you can put it right 145 00:09:34,980 --> 00:09:41,280 away into emulation mode. Also, he has a Python script to emulate 146 00:09:41,280 --> 00:09:47,760 something just for testing, basically. So having this idea, 147 00:09:47,980 --> 00:09:52,300 how we can make a replay attack. A replay attack, basically, is 148 00:09:52,300 --> 00:09:57,980 how we can block a transaction from a device to the POS, or the point of sale systems, 149 00:09:57,980 --> 00:10:03,420 or the terminal, and we can intercept that token. Intercepting the token is like, I can 150 00:10:03,420 --> 00:10:08,200 have that transaction and replay it later, probably two or three hours later in a different 151 00:10:08,200 --> 00:10:16,420 location. So I present a bug to Google Pay. I discover a bug about that you can make a 152 00:10:16,420 --> 00:10:24,400 replay in the Google Pay this year. And I basically report it. And the answer that I got was 153 00:10:24,400 --> 00:10:31,100 it couldn't be fitted because it is in that behavior of the payment system. Basically the 154 00:10:31,100 --> 00:10:35,440 flexibility that we have in the system who gets to the vulnerabilities that we can find 155 00:10:35,440 --> 00:10:43,400 different devices. So, for example, in this case, I'm going to make a replay attack. I have this 156 00:10:43,400 --> 00:10:46,400 Google Pay device. And I'm going to make a replay attack. And I'm going to make a replay attack. 157 00:10:46,420 --> 00:10:50,820 And I have a Square device which I'm going to validate the transaction. This one is a pocket 158 00:10:50,820 --> 00:10:57,260 chip which I have. It's ACR122, which basically is going to act a reader initially to read the 159 00:10:57,260 --> 00:11:03,080 transaction from Google Pay. I'm going to capture the token. And after that, I'm going to put the 160 00:11:03,080 --> 00:11:10,160 same reader in emulation mode. So I'm going to emulate the transaction using the Square, in this 161 00:11:10,160 --> 00:11:16,400 case, MFPS, to make a transaction for $1.01. And then I'm going to run that transaction. And then 162 00:11:16,420 --> 00:11:21,960 the transaction goes through. Basically this type of attack, I'm using, I get the transaction and 163 00:11:21,960 --> 00:11:29,120 basically I convert it to magnetic stripe data transaction, putting lower the levels of security 164 00:11:29,120 --> 00:11:37,240 of the NFC. It could be with different kind of devices. This example was a pocket chip, but it 165 00:11:37,240 --> 00:11:46,140 could be an Arduino. It could be Raspberry Pi or any other devices. In this case, it's a Raspberry 166 00:11:46,140 --> 00:11:55,060 Pi implementing a PM532 chip, which basically is very cheap, around $15. But this is the 167 00:11:55,060 --> 00:12:02,640 project I made. It was called NFCopy. Basically it's a Raspberry Pi 0, ACR122, a leap of 3.7 volts, 168 00:12:02,800 --> 00:12:09,560 and a booster, which basically moves the 3.7 volts to 5 volts. Some of the characteristics of 169 00:12:09,560 --> 00:12:16,120 this attack is that this device is portable. You have reader and emulator simultaneously. You have 170 00:12:16,120 --> 00:12:22,120 Wi-Fi connectivity and, of course, it's customizable. So let's try to make a replay demo. 171 00:12:22,740 --> 00:12:33,640 Basically, in this case, sorry, I have a Google Pay. And I'm going to use a transaction in 172 00:12:33,640 --> 00:12:39,080 different ATM, in this case, a grocery machine. I'm going to capture the token of Google Pay, 173 00:12:39,960 --> 00:12:45,760 using the same technique, intercepting the transaction, moving the, loading the security 174 00:12:45,760 --> 00:12:57,720 level and the transaction. I make a payment in a terminal. This kind of transaction goes 175 00:12:57,720 --> 00:13:05,520 through because we are implementing a, I can say, cryptogram. It's already validated before, which 176 00:13:05,520 --> 00:13:14,940 basically is going to go through the transaction. I call it Cloud Validated Cryptograms. Let's talk a 177 00:13:14,940 --> 00:13:19,920 little bit about relay attacks. Relay attacks is when you have, it's a man in the middle and you have two 178 00:13:19,920 --> 00:13:25,260 nodes. Basically, you have two devices. One close to the NFC device and another one close to the 179 00:13:25,260 --> 00:13:32,740 NPRS or POS or terminal, which is going to make a transaction in the same time that another person 180 00:13:32,740 --> 00:13:39,900 is making them. If we talk about the distance between the two devices, we can increase this distance 181 00:13:39,900 --> 00:13:44,920 implementing SDR, for example, or Wi-Fi connectivity. But many people have started using the cloud. This is a 182 00:13:44,920 --> 00:13:53,260 in SDR because you have a specific channel to make a relay attack. Some of the inconvenience of 183 00:13:53,260 --> 00:13:59,360 these attacks is that you have delays on timeouts and the protocol. MFBA specifies that you need 184 00:13:59,360 --> 00:14:05,920 to make a transaction in 500 milliseconds. But that doesn't force the terminal, the POS, to 185 00:14:05,920 --> 00:14:11,480 finish the transactions if it takes longer. Which basically I can make transactions in 4.5 186 00:14:11,480 --> 00:14:17,580 seconds without any problem. That means if I'm making a relay, it could take 2 or 3 seconds to 187 00:14:17,580 --> 00:14:25,360 make a transaction and it's going to go through. For this project I make a call called 188 00:14:25,360 --> 00:14:31,980 sentinels which basically is the same kind of device I use for the NFC copy but I have a SDR 189 00:14:32,960 --> 00:14:41,460 transceiver which basically is a CC1101. The CC1101 is the same kind of device I use for the 190 00:14:41,480 --> 00:14:46,520 NFC copies. The CC1101 basically is a cheap device, $5. It has different frequencies, 191 00:14:47,180 --> 00:14:51,660 different modulations. I'm not using that one because it's powerful. I'm using it because it's 192 00:14:51,660 --> 00:14:59,160 cheap. So you can try it at home. The configuration to connect to the Raspberry Pi is very 193 00:14:59,160 --> 00:15:07,200 straightforward. It's using the SPI protocol but we notice that we have many cables so we design a 194 00:15:07,200 --> 00:15:11,040 small board so you can plug and play with it. And this is when we have a lot of problems and you can 195 00:15:11,040 --> 00:15:11,080 problems with the SDRs. The SDRs are not the same thing. The SDRs are different. The SDRs have not the same 196 00:15:13,540 --> 00:15:18,340 Another inconvenience in the library of this C1101 is that you 197 00:15:18,340 --> 00:15:24,980 only can send 60 bytes in each packet. So, for example, if we 198 00:15:24,980 --> 00:15:30,500 have a common APDU for 200 bytes, we need to make chunks of 199 00:15:30,500 --> 00:15:38,080 it. Basically chunks of 60 bytes. We are in time and waiting 200 00:15:38,080 --> 00:15:43,020 time of this kind of attack, but because of the flexibility, we 201 00:15:43,020 --> 00:15:48,480 can make a relay attack. So basically, this project is that 202 00:15:48,480 --> 00:15:51,460 we have two readers and two emulators simultaneously, Wi-Fi 203 00:15:51,460 --> 00:15:56,600 connectivity, a chip, and we have a SDR support, which 204 00:15:56,600 --> 00:16:01,900 basically is the C1101. So the demo of this attack, basically, 205 00:16:02,500 --> 00:16:08,060 I'm using this device as MPOS. And I'm going to show you how 206 00:16:08,080 --> 00:16:13,940 it works. It's acting a terminal, and I'm going to make 207 00:16:13,940 --> 00:16:18,180 a relay attack. You are going to see what is in our device that I'm 208 00:16:18,180 --> 00:16:22,060 getting this data, which basically is a smart card from 209 00:16:22,060 --> 00:16:31,380 Visa. Sorry, it's kind of framing a little bit. So you see it was 210 00:16:31,380 --> 00:16:34,640 very quickly a transition, implementing the SDR. In less 211 00:16:34,640 --> 00:16:37,820 than one second, you can have all the data. And we are 212 00:16:37,820 --> 00:16:38,060 attacking the terminal. And we are going to make a relay attack. 213 00:16:38,080 --> 00:16:42,180 We are talking about around 15 meters of distance. So basically, 214 00:16:42,400 --> 00:16:50,380 here is another device, and the smart card is under it. Another 215 00:16:50,380 --> 00:16:53,020 type of attack I want to talk about is how to extract data 216 00:16:53,020 --> 00:16:58,980 from chip and PIN cards using NFC. If we think about it, we 217 00:16:58,980 --> 00:17:03,620 have two different ISOs. We have contact and contactless. But 218 00:17:03,620 --> 00:17:06,960 they share the same APDU layer, which basically, you can send 219 00:17:06,960 --> 00:17:08,060 comments from one to the other. And you can send comments from 220 00:17:08,060 --> 00:17:11,080 one technology to another, and they are going to respond. It 221 00:17:11,080 --> 00:17:13,540 could be wrong answer or right answer, but they are going to 222 00:17:13,540 --> 00:17:17,120 respond. It's like when you are making a SQL injection and you 223 00:17:17,120 --> 00:17:20,000 got these kind of errors, and you know that something is there. 224 00:17:20,300 --> 00:17:26,320 It's the same thing with APDUs. For this project, I changed the 225 00:17:26,320 --> 00:17:30,580 reader. Instead of using the ACR122, I'm using a USB smart card 226 00:17:30,580 --> 00:17:36,560 reader. And I changed the protocol. Instead of using a 227 00:17:36,560 --> 00:17:43,540 block byte protocol, I'm using a byte-to-byte protocol. So let's 228 00:17:43,540 --> 00:17:47,320 play a demo to show you how this works. Basically, it's a relay 229 00:17:47,320 --> 00:17:51,360 attack. In this place, we have the card connected to the USB. We 230 00:17:51,360 --> 00:17:56,240 have the SDR connection to this device. And this device, the 231 00:17:56,240 --> 00:18:00,160 Samsung device, is going to act as POS or terminal. So I'm going 232 00:18:00,160 --> 00:18:05,840 to run it. The MPOS is going to start sending NFC comments, and 233 00:18:05,840 --> 00:18:06,540 you can see it's not going to respond. So I'm going to run it. 234 00:18:06,560 --> 00:18:12,780 And I'm going to start reading the chip and PIN card data, which 235 00:18:12,780 --> 00:18:21,500 could be useful to strike, let's say, RSA certificates, but also 236 00:18:22,170 --> 00:18:26,620 data like the name of the card, which is user two, and things 237 00:18:26,620 --> 00:18:30,580 like that. So let's talk a little bit about relay for 238 00:18:30,580 --> 00:18:33,500 replay attacks. Basically, relay for replay attacks, how we can 239 00:18:33,500 --> 00:18:36,540 make smart relays. If we talk about security, we talk about 240 00:18:36,540 --> 00:18:38,240 security. So we have two elements, which is one of the 241 00:18:38,240 --> 00:18:43,980 best secure technologies. The main point about this 242 00:18:43,980 --> 00:18:47,300 technology is you cannot make a replay attack. Why? Because 243 00:18:47,300 --> 00:18:51,040 basically, when you intercept a transaction, it has a 244 00:18:51,040 --> 00:18:53,760 cryptogram on it, which basically is a challenge that 245 00:18:53,760 --> 00:18:56,880 the terminal sends to the device, and the device has to 246 00:18:57,380 --> 00:19:02,200 answer it correctly at the same time. So in this particular case, 247 00:19:02,300 --> 00:19:05,360 I'm using a Fitbit Ionic. I'm going to talk a little bit more 248 00:19:05,360 --> 00:19:06,520 about this. So the Fitbit Ionic is a chip that is going to be a 249 00:19:07,260 --> 00:19:10,080 different cryptogram. And this part, where is the red tag, 250 00:19:10,220 --> 00:19:12,680 which basically is the cryptogram section, and the blue 251 00:19:12,680 --> 00:19:15,740 one, which basically is the application transaction counter, 252 00:19:16,300 --> 00:19:19,240 are the two only things that are changing in each transaction 253 00:19:19,240 --> 00:19:25,100 in the secure element. So the question here is, I intercept a 254 00:19:25,100 --> 00:19:28,720 transaction, and when the terminal sends me the challenge 255 00:19:28,720 --> 00:19:32,440 and I answer with a captured transaction, it's going to be a 256 00:19:32,440 --> 00:19:35,020 different cryptogram, or it's going to be the right cryptogram. 257 00:19:36,520 --> 00:19:40,740 So the transaction is going to be declined. But what happens is 258 00:19:40,740 --> 00:19:44,700 we intercept the transaction, and we make a relay just using 259 00:19:44,700 --> 00:19:47,180 the cryptogram and the application transaction counter. 260 00:19:49,160 --> 00:19:52,920 So instead of making a relay with hundreds and hundreds of 261 00:19:52,920 --> 00:19:57,280 bytes, we just need 20 bytes, which basically are the 262 00:19:57,280 --> 00:20:02,100 cryptogram and application transaction counter. So let's 263 00:20:02,100 --> 00:20:05,680 say I capture a transaction from someone using secure element, 264 00:20:06,520 --> 00:20:12,880 and I have, I put it in one of the devices. So let's say I have 265 00:20:12,880 --> 00:20:16,360 computer one and computer two. When the computer, when the POS 266 00:20:16,360 --> 00:20:19,680 asks me for the PPC, the computer is going to answer with 267 00:20:19,680 --> 00:20:23,760 a previous safe transaction. And after I got the challenge, 268 00:20:23,960 --> 00:20:26,540 the computer one is going to send the challenge to computer 269 00:20:26,540 --> 00:20:29,940 two, and the computer two to the smart device, and it's going 270 00:20:29,940 --> 00:20:33,300 to get it straight forward with the cryptogram and transmit it 271 00:20:33,300 --> 00:20:36,500 back to the POS. So in this case, I'm using the computer two 272 00:20:36,520 --> 00:20:38,860 to the smart device, and I'm using this previous data to have 273 00:20:38,860 --> 00:20:42,700 less time making the relay attack, which basically I 274 00:20:42,700 --> 00:20:46,280 improve it, like, in three seconds. So instead of using, 275 00:20:46,380 --> 00:20:51,300 like, not, let's say 3.5 seconds, I can do it in 1.5, 276 00:20:52,220 --> 00:20:58,800 using this technique for secure elements. So basically, I have 277 00:20:58,800 --> 00:21:06,500 a smartwatch, the Fitbit. I use the Fitbit, and the Fitbit is 278 00:21:06,520 --> 00:21:07,240 going to run the transaction. So if you already have a 279 00:21:07,240 --> 00:21:12,140 previous, previous safe transaction, probably you can 280 00:21:12,140 --> 00:21:15,800 see in the back there, which all the APDs. And I'm going to run 281 00:21:15,800 --> 00:21:21,860 it using a secure element of this tool. When I run it, 282 00:21:21,940 --> 00:21:24,760 instead of sending all the data back and forward, I am just 283 00:21:25,240 --> 00:21:28,420 going to get the cryptogram and the application transaction 284 00:21:28,420 --> 00:21:32,360 counter, and the transaction is approved. Because the only thing 285 00:21:32,360 --> 00:21:35,060 that changed in the transaction is the cryptogram and the 286 00:21:35,060 --> 00:21:36,080 application transaction counter. 287 00:21:38,180 --> 00:21:43,540 So if after all of these relay and replay attacks you think that 288 00:21:43,540 --> 00:21:46,180 you can make it better, probably you can use something like this 289 00:21:46,860 --> 00:21:53,120 which is more interesting. And Twitter. Get close to the person 290 00:21:54,460 --> 00:22:03,020 and get a transaction accepted. So about new technology. We have 291 00:22:03,020 --> 00:22:06,040 new technology for the cards implementing NFC. Basically to 292 00:22:06,040 --> 00:22:13,160 get into the cards. And some of the boards I am implementing uses 293 00:22:13,160 --> 00:22:19,800 NFC. How this could affect this new technology to come. They are 294 00:22:19,800 --> 00:22:25,320 not going to use a, let's say in this case encryption and the 295 00:22:25,320 --> 00:22:28,660 communication. We're going to have problems making relays and 296 00:22:29,040 --> 00:22:33,000 replay attacks. This is a problem that we're going to have to 297 00:22:33,020 --> 00:22:34,020 fix. So we're going to have to do a new protocol. The board I 298 00:22:34,020 --> 00:22:37,880 am implementing, the NFC 3320. We're basically, they are in 299 00:22:37,880 --> 00:22:41,980 some cards already. So I don't have the, I didn't have the 300 00:22:41,980 --> 00:22:47,460 chance to test it. But I would love to do it. So new attack 301 00:22:47,460 --> 00:22:52,120 vectors. We can make relay with a new technology like Lora's. 302 00:22:52,560 --> 00:22:58,220 She's cheap and very useful. In this particular case I have a 303 00:22:58,220 --> 00:23:03,000 smart card. I'm using a, another device, the Samsung. I'm using a 304 00:23:03,020 --> 00:23:07,420 card that is behaving as MPOS. And I can get the data from the 305 00:23:07,420 --> 00:23:12,160 card basically. Using this technology. With Lora you can 306 00:23:12,660 --> 00:23:16,060 have kilometers of distance in some of the cases. Depending on 307 00:23:16,060 --> 00:23:20,940 how it's set up. Also let's talk a little bit about how you 308 00:23:20,940 --> 00:23:24,760 can use NFC in web browsers. Which is something that nobody 309 00:23:24,760 --> 00:23:30,280 talks about it. Many people start trying to work with ACR 310 00:23:30,280 --> 00:23:33,000 wanting to connect into the computer. And they don't know how 311 00:23:33,020 --> 00:23:35,960 to connect. And trying to use a library in the browsers. But they 312 00:23:35,960 --> 00:23:41,480 have many problems to communicate with it. I found a reason to it. I 313 00:23:41,480 --> 00:23:45,060 found that they have experimental web platform, the Chrome, that you 314 00:23:45,060 --> 00:23:50,160 can use USB. And they have a specific library to do that. And 315 00:23:50,160 --> 00:23:53,480 this library they have support for Arduinos already. So what 316 00:23:53,480 --> 00:23:56,660 about instead of connecting directly the NFC reader, what 317 00:23:56,660 --> 00:24:00,040 about you connect the NFC and the Arduino and we communicate 318 00:24:00,040 --> 00:24:03,000 with the Arduino and the Arduino communicates with the NFC. So we 319 00:24:03,020 --> 00:24:06,360 can do that. So basically it's very straight forward technology. 320 00:24:07,560 --> 00:24:11,260 You can have basically terminal in the web browser and communicate 321 00:24:11,600 --> 00:24:15,560 with the NFC reader to put it in emulation mode peer to peer 322 00:24:15,560 --> 00:24:20,040 communication or whatever. So in this case we're going to read, 323 00:24:20,240 --> 00:24:23,940 we're going to emulate NFC transaction using a web browser. 324 00:24:25,380 --> 00:24:32,880 So in this case I'm going to run a script using the Chrome. And I 325 00:24:33,020 --> 00:24:36,200 can get a transaction very quickly. So this is a new type of 326 00:24:36,200 --> 00:24:38,820 attack that you can use it in different web browsers. In this 327 00:24:38,820 --> 00:24:44,780 case Chrome web browser. Some of the protocols that probably 328 00:24:44,780 --> 00:24:49,680 could implement to prevent this type of attacks is distance 329 00:24:49,680 --> 00:24:55,180 bounding protocols. Which is very difficult. Because you need 330 00:24:55,180 --> 00:24:58,440 to know the timing exactly when a transaction is happening. And 331 00:24:58,440 --> 00:25:01,760 it's very difficult if you have many different applications open 332 00:25:01,760 --> 00:25:03,000 already at the same time. So you need to know the timing exactly 333 00:25:03,020 --> 00:25:08,360 when you're making a transaction. The transaction can be delayed. So 334 00:25:08,360 --> 00:25:13,220 it's very difficult to do it. What we need basically is a new update 335 00:25:13,220 --> 00:25:17,880 of the MEV in the United States and all America continent. But the 336 00:25:17,880 --> 00:25:22,220 problem is the hardware. Basically you make an update in the MEV. You 337 00:25:22,220 --> 00:25:25,840 need to replace all this hardware for all the stores. Which basically 338 00:25:25,840 --> 00:25:31,320 is very difficult. Very expensive. So some of the conclusion of this 339 00:25:31,320 --> 00:25:33,000 talk. An attack attack. This is an attack attack. This is an attack 340 00:25:33,000 --> 00:25:33,240 and if somebody represents a typical attacker. So if you 341 00:25:33,240 --> 00:25:34,040 spray that S means the attacker doesn't need a 342 00:25:34,040 --> 00:25:36,100 specializedshirts or software 343 00:25:36,100 --> 00:25:38,920 to make transactions.rat transactions. The my phone 344 00:25:38,920 --> 00:25:48,020 can be used as a sintl asyou can use a player. If you keep 345 00:25:48,020 --> 00:25:51,840 designing this product with proper protections against the 346 00:25:51,840 --> 00:25:55,320 new technologies, they are going to be in effect for many years. 347 00:26:08,140 --> 00:26:12,140 Sorry. It doesn't matter which card. It could be any kind of 348 00:26:12,140 --> 00:26:14,740 Visa card, MasterCard or whatever. I'm using West Fargo 349 00:26:14,740 --> 00:26:18,400 because it's the only I have in my hand. I need Spire so you 350 00:26:18,400 --> 00:26:28,600 can use it. You have any questions? Thank you. Thank you 351 00:26:28,600 --> 00:26:28,940 to be here.