1 00:00:00,000 --> 00:00:04,292 >>Without further adieu ‑‑ ‑‑ near and dear to our security information hearts. Point and 2 00:00:04,292 --> 00:00:09,292 sales systems. Here to talk about it today is gentleman Nir Valtman. >> Hi. Glad to be here 3 00:00:09,292 --> 00:00:15,292 today >> I'm sorry. Are you a new speaker? Oh excellent. I just didn't want them to get too 4 00:00:27,833 --> 00:00:33,833 much in to it. >> Okay. Guys. It'll be fun. >> wait wait wait. (Laughing) I've been doing 5 00:00:58,375 --> 00:01:04,375 this all day. (Laughing) love for the new speaker! (Applause.) >> I'm Russian by the way. So 6 00:01:30,250 --> 00:01:37,167 doesn't really matter. (Laughing) . >> That's all we have time for, thanks everybody 7 00:01:37,167 --> 00:01:44,625 for coming. DEF CON is cancelled. (Laughing) . >> You have the bottle? >> We're not 8 00:01:44,625 --> 00:01:50,958 leaving the bottle! >> Okay. So umm, I'm Nir and I'm going to speak to the point of sales. I 9 00:01:50,958 --> 00:01:56,958 do a introduction and then I'll get into the the details. So first of all, that's the thing 10 00:02:03,500 --> 00:02:10,250 when I say to all the people what I do. Well obviously I'm not the Batman here. Actually, 11 00:02:10,250 --> 00:02:16,250 I'm working as a enterprise security architect, solving a lot of problems in the retail 12 00:02:18,625 --> 00:02:25,458 like business. But actually I do only for these guys. I had a refew researchers about this 13 00:02:25,458 --> 00:02:31,458 this and at least open source two. But I'm here today to speak about the last year research 14 00:02:34,917 --> 00:02:42,083 that I've done and a lot of, and the result of meeting with a lot of start up companies and 15 00:02:42,083 --> 00:02:48,083 enterprises in order to protect point of sales. So before we begin, I just want to show you 16 00:02:52,958 --> 00:02:58,958 that the view of why point of sales is so targeted. So today when we want to buy credit 17 00:03:01,208 --> 00:03:07,833 cards, there's still something for a dollar. And I saw that it's really easy to find credit 18 00:03:07,833 --> 00:03:14,958 cards and get them with pay low prices. But when we want to get little bit more information, we 19 00:03:14,958 --> 00:03:20,958 can get full dumps. Full dumps like this is something it's stolen from POS. Different from 20 00:03:24,583 --> 00:03:30,583 other scenarios where like Ecommerce or M commerce web sites. Then they're ‑‑ you store 21 00:03:33,292 --> 00:03:39,750 fans which is the card numbers and the expiration date. So here we have a little bit more 22 00:03:39,750 --> 00:03:46,458 information. And we will compare a little bit about what should be attacked more. You'll see 23 00:03:46,458 --> 00:03:54,000 that although E commerce is pretty easy to try to attack this vector, point of sales have 24 00:03:54,000 --> 00:04:00,917 the same things, but also the full dumps. The full dumps by the way, it's Track 2 data. And 25 00:04:00,917 --> 00:04:06,917 sometimes it can also contain the pin number. So umm, before getting to the security stuff, I 26 00:04:12,500 --> 00:04:17,083 just want to talk about what is point of sale because some reason, we just think about 27 00:04:17,083 --> 00:04:23,083 these things. Which is, this is the point of sale, but this is only for the retail stores. The 28 00:04:25,917 --> 00:04:33,375 simple assumptions about point of sales in the retail store is that it can be stolen or at 29 00:04:33,375 --> 00:04:41,042 least it can be tampered. Is these ones. Fuel pumps. Fuel pumps ‑‑ fuel pumps, well 30 00:04:41,042 --> 00:04:47,500 they're public. It's pretty easy to tamper them as they do ATMs. They just put skimming devices 31 00:04:47,500 --> 00:04:55,375 there. That's fine. It will work. But the next point of sale, is kind of the new point 32 00:04:55,375 --> 00:05:01,375 of sale. It's mobile POS or M POS. Umm, the ideal M POS is to shorten the queues from the 33 00:05:07,792 --> 00:05:15,750 retail stores. That means just for a queue busting. But the fact is that since it has no 34 00:05:15,750 --> 00:05:21,750 wires, it has card reader, can be replace easily. And also, I don't know if you see the right 35 00:05:25,750 --> 00:05:30,750 bottom corner, you see kind of scanner, it's a blue tooth scanner and contains all the 36 00:05:30,750 --> 00:05:36,750 risks of connecting bluetooth devices to the point of sale. But in fact, we're attacking 37 00:05:40,708 --> 00:05:47,875 point of sales. We shouldn't attack point of sales. This picture, by the way, means that 38 00:05:47,875 --> 00:05:54,583 there is no spoon. Because point of sales is not exactly the thing that you attack. The thing 39 00:05:54,583 --> 00:06:00,583 that's attack is the payment application. This is something that can be inserted as part of 40 00:06:03,083 --> 00:06:09,208 another deal ahead of POS. Or it could be an external exit load. And this should be the thing 41 00:06:09,208 --> 00:06:15,208 that should be attacked. Just to give you some over view about how it works in retail stores, 42 00:06:18,083 --> 00:06:23,792 so generally, we have a store and without the payment processor data center, obviously 43 00:06:23,792 --> 00:06:31,250 we have the store. We have head quarters try to simplify that a little bit. So if we go to 44 00:06:31,250 --> 00:06:39,250 store, we see that any POS has application. The POS manager identities like cashiers and 45 00:06:39,250 --> 00:06:46,625 tabs and loyalties. But it doesn't manage any data. The only thing it can manage is 46 00:06:46,625 --> 00:06:54,083 authorization code we get back from the processor. We also have the payment client which is the 47 00:06:54,083 --> 00:07:01,375 responsible for processing the credit card and all of this data somehow stored in the database 48 00:07:01,375 --> 00:07:07,375 or file system and obviously in the ram at that point in time. The PA Client communicates with 49 00:07:10,542 --> 00:07:16,542 point of production or pin pad or magnetic card reader. Then accesses the credit card numbers 50 00:07:19,625 --> 00:07:26,292 to a PA server. Honestly, there maybe point of sales server in other places, head quarters. But 51 00:07:26,292 --> 00:07:33,042 again, we simplify them. So we have a store server. Probably the store server is going out 52 00:07:33,042 --> 00:07:36,167 the processor. This payment server is umm credit cards, again, at least ‑‑ it's a 53 00:07:36,167 --> 00:07:42,167 specific point of time. And then it goes to the process. So let's just understand where our credit 54 00:07:53,000 --> 00:07:58,667 cards ‑‑ because when we speak about the risks and explaining how to exploit everything just 55 00:07:58,667 --> 00:08:04,958 need to understand where to exploit. So it will look at the data address, probably to see on 56 00:08:04,958 --> 00:08:12,167 file or on databases. And it's pretty weird 'cause why do we have to store credit cards in a 57 00:08:12,167 --> 00:08:18,125 database? So this is pretty simple. Let's say that the store is disconnected from the center 58 00:08:18,125 --> 00:08:24,125 or from the processor. So the store can sell? It can sell. It just stores the credit card 59 00:08:26,500 --> 00:08:32,500 somewhere. Can be in the database and the file system. So then we have the data in 60 00:08:34,958 --> 00:08:40,542 transit. And here, we understand the data in transit is not only something that we can ‑‑ or need 61 00:08:40,542 --> 00:08:46,542 to see through the Wireshark. Sometimes the data in transit is from the pin pad to the PA 62 00:08:46,542 --> 00:08:49,875 Client and it can be done through two two three and can be done through USB. So umm, that's 63 00:08:49,875 --> 00:08:55,875 the options. As for the memory, which is the most common way of attacks on point of sales, which 64 00:09:02,375 --> 00:09:08,375 have it in the ram. Just to connect it to the way we work today and we see retailers, 65 00:09:11,042 --> 00:09:16,458 let's say the retailers don't have only point of sales in the stores, they also have an E 66 00:09:16,458 --> 00:09:22,042 commerce. And if they have E commerce, probably, they have a PA server. A payment application 67 00:09:22,042 --> 00:09:29,250 server. So if they have a payment application server, they have an M commerce, D commerce, 68 00:09:29,250 --> 00:09:36,083 doesn't matter. But somewhere there are credit cards as well. So if we look at data address 69 00:09:36,083 --> 00:09:42,083 and probably be in the same place as for the data that it transits over the wire here. But 70 00:09:44,583 --> 00:09:48,417 then we have the data in memory. And we have it also in the presentation server. Which is 71 00:09:48,417 --> 00:09:54,417 pretty easy to have the data there. It's exploitable. The thing that we never thought 72 00:09:56,417 --> 00:10:02,417 about storing credit cards or at least looking for credit cards there is the mobile app. So the 73 00:10:05,292 --> 00:10:11,750 mobile app can also take credit cards. So there are ways to somehow remove this credit card 74 00:10:11,750 --> 00:10:18,667 from all this places and this can be done by just storing all the keys in a specific server, 75 00:10:18,667 --> 00:10:24,625 called token server is the concept. That means that this is pretty simple server. It 76 00:10:24,625 --> 00:10:31,292 contains the table. Credit cards. A token. And then when we pay, we just pay by token. We 77 00:10:31,292 --> 00:10:36,500 don't pay by credit card. And then it means the presentation server don't need to have, 78 00:10:36,500 --> 00:10:43,000 actually, credit cards there, and application server neither. On the other hand when we have a 79 00:10:43,000 --> 00:10:49,583 wallet, somehow we need to register a credit card there. So when we do that, it is in the 80 00:10:49,583 --> 00:10:55,167 memory. So we don't have a solution for everything. But the system solved here for the PA 81 00:10:55,167 --> 00:11:01,167 server, no problem. So let's just understand something about what the retailers think when 82 00:11:05,125 --> 00:11:11,125 they deploy the point of sales. Okay. So the first thing ‑‑ yeah? No one cares really? PCI? 83 00:11:16,500 --> 00:11:22,500 Well it's a marketing thing. So the next thing is the fact that retailers actually deploy the 84 00:11:26,917 --> 00:11:30,417 point of sales on embedded device, it's windows embedded. So it doesn't mean that windows 85 00:11:30,417 --> 00:11:36,417 embedded is secure. >> (Inaudible). >> Yeah, it's not as bad as a regular windows 86 00:11:39,917 --> 00:11:45,917 seven, but it doesn't mean that it's secure enough. And then, part of them tell that, well we 87 00:11:49,292 --> 00:11:55,292 have patches. We all know that no one cares about patches. Yeah. And you know what ‑‑ yeah. 88 00:11:57,333 --> 00:12:03,333 Do you know why the retailers are not vulnerable to Heartbleed? That's pretty easy. 89 00:12:07,583 --> 00:12:13,583 Because most of them don't have even SSL. (Laughing) yeah. So another assumption is that 90 00:12:20,208 --> 00:12:25,083 they're not connected to the internet. Well actually, they're not connected directly to the 91 00:12:25,083 --> 00:12:30,083 internet. They have the store. They have the head quarters. But somehow they need to go to the 92 00:12:30,083 --> 00:12:36,083 internet. How they have patches. Okay. So all of them connected to the internet, this is just a 93 00:12:38,250 --> 00:12:44,250 fact. Another fact is that retailers believe that the cashier can be hacker. So the 94 00:12:50,500 --> 00:12:56,500 cashier can be a hacker, but is his USB stick can be a hacker? Probably. And it happens. The 95 00:13:01,750 --> 00:13:08,458 next thing is is something pretty odd. I asked one of the retailers. Hey guys, do you log? 96 00:13:08,458 --> 00:13:16,125 How do you know you don't have fraud on the POS? And they told me, well we have cameras and we 97 00:13:16,125 --> 00:13:22,458 see if the cashier just gets the money from it. So we don't have fraud. We have physical 98 00:13:22,458 --> 00:13:30,417 security. No one cares. But these are only assumptions, in fact there are a few Achilles 99 00:13:30,417 --> 00:13:37,042 tendons in the recent environments. This the first one. Whoops. This is the one. 100 00:13:37,042 --> 00:13:43,042 The RAT. The fact is that on most retailers, they have a lot of sites. And it's really hard 101 00:13:46,667 --> 00:13:52,667 to put IT guy on each side that they, say more than one K sites. And then they just install the 102 00:13:56,125 --> 00:14:02,125 VNC. Okay. So it's also vulnerable. And again, this is a fact that most of the retailers 103 00:14:05,917 --> 00:14:11,917 can't handle. Another thing is, who can access the POS. Sometimes ‑‑ ‑‑ any user can log 104 00:14:14,375 --> 00:14:20,375 in to this machines. Actually they are. Another fact is that no one really knows how to 105 00:14:28,333 --> 00:14:36,000 harden the systems. So the point of sales run with local admin access control, so you don't 106 00:14:36,000 --> 00:14:41,250 have to manage permissions. I know that PCI requires managing permissions. But I'm Admin, who 107 00:14:41,250 --> 00:14:48,875 cares. So let's talk about the threats, because well, there are many threats on the point of 108 00:14:48,875 --> 00:14:55,708 sales. And we need to solve at least part of them. So the first threat with the low hanging 109 00:14:55,708 --> 00:15:01,708 fruit is the permissions on the point of sale. So like I said, if we had admin, that's good. 110 00:15:03,792 --> 00:15:10,083 But yet, if we don't have the the admin access and we have a regular user, we have specific 111 00:15:10,083 --> 00:15:16,875 permission to the application. So for instance, if we have a pin pad, probably will need to 112 00:15:16,875 --> 00:15:22,875 manage the permissions managing the driver. Okay. Another thing is permissions for the process. 113 00:15:26,250 --> 00:15:32,458 Do you know that if I run the process as a logged in user, it doesn't matter which process I 114 00:15:32,458 --> 00:15:38,458 run, I can read it. If I run a point of sale with a logged in user, I don't even need to 115 00:15:41,250 --> 00:15:45,583 exploit the operating system, I just need to run a memory scraper. It's pretty easy 116 00:15:45,583 --> 00:15:52,833 because I have the permission. Again, the file system access the point of sales write logs 117 00:15:52,833 --> 00:15:58,833 when there's write logs and we can change them. We can probably do fraud or sometimes be exposed 118 00:16:01,125 --> 00:16:06,958 to credit card numbers in the logs. That's a bug ‑‑ by the way, every retailer that you see 119 00:16:06,958 --> 00:16:12,958 that there, it's not by design. But somehow, all of them design this bug. So umm, another fact 120 00:16:16,708 --> 00:16:21,250 is that in many point of sales you'll have the database on the point of sales. Because 121 00:16:21,250 --> 00:16:28,208 sometimes we work in offline mode. So you have the database on the point of sales. So hey 122 00:16:28,208 --> 00:16:33,792 guys, you don't need to hack the point of sales. You can just take the MDF file. That's fine. 123 00:16:35,833 --> 00:16:41,833 Another threat is something pretty common on browsers. On browsers, when you go to a URL 124 00:16:45,167 --> 00:16:51,167 with HTTPS and then the Cert is not correct, probably you get a warning, right? The point of 125 00:16:53,500 --> 00:16:59,500 sale is not a browser. Point of sale can do whatever ‑‑ point of sale can't ignore HTTPS error if 126 00:17:02,250 --> 00:17:10,000 they have HTTPS. So I can actually put any certificate I want in the middle because no 127 00:17:10,000 --> 00:17:16,000 one cares if it's trusted and open SSL connection and it will work. As for the business 128 00:17:19,333 --> 00:17:26,833 perspective for paying through the point of sale or paying application, we actually have 129 00:17:26,833 --> 00:17:32,833 pretty long flow until we get authorization from the issuer. So we have the point of 130 00:17:35,500 --> 00:17:39,708 interaction which is the pin pad the pass the data to the application. And then processor 131 00:17:39,708 --> 00:17:41,708 and then issuer. But the main thing we must understand here that this part is pretty 132 00:17:41,708 --> 00:17:47,708 protected. And that means that pretty hard to exploit. I'm not saying impossible, I'm saying 133 00:17:50,625 --> 00:17:56,625 this is not a point of sale code. The left side is the side is the side we need to 134 00:18:06,625 --> 00:18:14,375 exploit ‑‑ but hay I'm just stealing data from the memory. I can consume sometimes and 135 00:18:14,375 --> 00:18:19,875 sometimes when I try to do some number scraping, it consumes ‑‑ I can say a lot. But it consumes 136 00:18:19,875 --> 00:18:25,875 the resources from the point of sale and jus to explain you how weak is the point of sale, it's 137 00:18:28,917 --> 00:18:34,917 pretty old. So if it's Pentium4, probably you see a memory scraper. You see the performance 138 00:18:36,958 --> 00:18:42,958 goes up. And it will be much difficulter to get the data because we just need to wait a 139 00:18:46,375 --> 00:18:52,500 lot of time until we get all the credits cards that we want. On the other hand, there is 140 00:18:52,500 --> 00:18:59,417 settlement flow. The settlement flow just stores the credit card somewhere. It can be on the POS 141 00:18:59,417 --> 00:19:06,750 it can be on the store server. It really depends on implementation. So again, we 142 00:19:06,750 --> 00:19:14,417 have something specific that is protected, but yet, the credit card stored somewhere. That 143 00:19:14,417 --> 00:19:20,417 means not in the memory, they're on a disk. So that's easy. I just need to go to the disk and 144 00:19:22,917 --> 00:19:28,917 get the file. That's fast by the way. This is pretty common on point of sale. I just want to do 145 00:19:36,917 --> 00:19:42,917 short demo to show how it works. Okay. So I have here windows machine. And I have here kind of 146 00:19:57,208 --> 00:20:03,417 application, very simple application a few of my students wrote and I was supervising it. 147 00:20:03,417 --> 00:20:11,250 This memory scraping does a single thing, goes to the process we choose and gets the 148 00:20:11,250 --> 00:20:18,708 memory from it and translate it to a string and then tried to find credit card based on our 149 00:20:18,708 --> 00:20:24,708 regular expression. So let's say that this is our POS. Pretty nice POS. I'll just set the pan 150 00:20:27,083 --> 00:20:33,083 for a moment there. Just like this. So now we'll go through the process. And with we'll 151 00:20:44,208 --> 00:20:49,750 choose credit cards. When you see that, you see that I just started the scan. Nothing's 152 00:20:49,750 --> 00:20:55,750 there. When I set the credit card ‑‑ woo, it worked. So when I set the credit card, I can see 153 00:21:02,500 --> 00:21:07,750 that in a moment, I get it. Memory scrapers don't work in one iteration, we just need to 154 00:21:07,750 --> 00:21:13,750 open few threads and refresh them every five, ten, 30 seconds depends on how much credit cards 155 00:21:17,375 --> 00:21:23,375 we want to get. This is pretty simple to get the credit card. So I'm again going to the demo. 156 00:21:31,708 --> 00:21:37,708 This is user named Foo not admin. Now I can run again, the point of sale. And let's just 157 00:21:43,333 --> 00:21:49,333 try to get something from this one. So I just injected the DLL into the the point of sale. Used 158 00:21:54,250 --> 00:22:00,333 the Framework injection, i t's an open source frame work it allows DLL injection. I just 159 00:22:00,333 --> 00:22:07,125 added something to the point of sale try to scrape the memory from it. And then I get the log. 160 00:22:07,125 --> 00:22:13,125 Obviously, I can't see ‑‑ whoops. Didn't remove the old one. I need to close that one 161 00:22:16,083 --> 00:22:22,083 out. Right. So umm, now I have the memory on the point of sale and I just inject the DLL in 162 00:22:35,167 --> 00:22:41,583 there. Probably I won't see any credit cards there. Because there are no credit cards set 163 00:22:41,583 --> 00:22:47,583 here. Yet. Nothing. And again, if I'll set the pan. I'll delete this one. Let's do it again. We 164 00:23:14,750 --> 00:23:22,250 have the credit card. So that's just injecting the DLL and POS, just get through the process and 165 00:23:22,250 --> 00:23:27,875 do whatever we want. Getting access to the process. We'll do the questions later? So this is 166 00:23:27,875 --> 00:23:33,875 the number scraping, pretty easy things. Didn't take so long to do it because you'll find great 167 00:23:46,708 --> 00:23:52,958 process memory, well documented memory. So there are other things that can be done on the 168 00:23:52,958 --> 00:23:55,250 POS. We can actually steal credentials. It could be sheer credentials or user credentials. 169 00:23:55,250 --> 00:24:00,500 Because sometimes on retail stores, you just register to the store through E commerce and 170 00:24:00,500 --> 00:24:04,583 it's stored somewhere. And when you just buy something in the retail store, you have a loyalty 171 00:24:04,583 --> 00:24:08,875 card. And sometimes the card is connected to the user and password. So if you can just 172 00:24:08,875 --> 00:24:14,875 scrape something else from the memory, you'd probably able to get the login credentials. And 173 00:24:18,042 --> 00:24:21,833 then use them on other web sites. Another thing that you probably be able to do is to get 174 00:24:21,833 --> 00:24:23,833 the PII data on the point of sales. Because point of sales store PII data. Because we have, 175 00:24:23,833 --> 00:24:25,833 well, your address, telephone numbers, E mail sometimes. And this is data that costs a lot of 176 00:24:25,833 --> 00:24:31,833 money for the ones that steel it. Another thing, another fact on point of sales is that no one 177 00:24:55,042 --> 00:25:00,917 really deploys a thin point of sales. That means no one really deploys only to presentation 178 00:25:00,917 --> 00:25:06,875 layer, all of them deploy, a thick point of sales and that's the picture, because we didn't 179 00:25:06,875 --> 00:25:12,875 find a thick one. So umm, the fact is that all the business logic and the database, 180 00:25:15,083 --> 00:25:20,667 everything installed on the point of sale. There are retailers that are brave enough 181 00:25:20,667 --> 00:25:26,750 to duplicate their net work line and then if one net work line just fails, they have the other 182 00:25:26,750 --> 00:25:32,750 one. But that's pretty expensive. So just prefer to run it. The way we steaal the credit 183 00:25:35,708 --> 00:25:42,125 card, we have actually two scenario, probably you hear about one of them. The most 184 00:25:42,125 --> 00:25:49,042 common way to steal credit card is using online approach. That means that I'll find a way to 185 00:25:49,042 --> 00:25:53,625 get from the POS to the internet, somehow I'll find this way. It could be done through a 186 00:25:53,625 --> 00:25:59,625 proxy, another FTP server, et cetera. Somehow it'll get to the server in the end. But as I 187 00:26:05,292 --> 00:26:11,250 said, not all retailers actually have access or direct access to the internet and it's not really 188 00:26:11,250 --> 00:26:17,250 easy to do it on all times. So if I'm a cleaner, in a retail store, I could just take a USB. 189 00:26:20,958 --> 00:26:26,958 Put it somewhere on the PA server and run the memory scraping. But then the 190 00:26:26,958 --> 00:26:32,958 exfiltration of the data will be a specific ID of the USB key and I just connect it to the point 191 00:26:36,000 --> 00:26:42,000 of sale, then I'll get the credit card back to the storage. So this our two approaches. So I 192 00:26:44,042 --> 00:26:51,250 check the solutions of how retail to protect the point of sale. So I thought about, well, 193 00:26:51,250 --> 00:26:57,208 before going to solutions and trying to purchase software to protect point of sales, maybe we 194 00:26:57,208 --> 00:27:04,000 could code something. So I thought, maybe I could use ‑‑ by the way, something specific for 195 00:27:04,000 --> 00:27:11,500 dark net, but probably you'll see for any other managed code. I just thought maybe we can use 196 00:27:11,500 --> 00:27:18,625 another way to include the credit card in the memory. So there is a class, in .NET. It's 197 00:27:18,625 --> 00:27:24,625 called stream class. Umm, this is a managed class of stream, yeah. It means that if it's 198 00:27:28,792 --> 00:27:34,792 managed, maybe we can bypass it. And again, we have another demo. Okay, so, we have another secure 199 00:27:53,917 --> 00:27:59,917 stream point of sale that's pretty cool. But then. Nothing to show because it can't show me 200 00:28:02,000 --> 00:28:08,000 the string. The secure string. As I said, it's a managed code. So if it's managed, we can just 201 00:28:11,500 --> 00:28:17,500 decrypt it. It's done easily by marshalling the secure string using .NET. No need of course 202 00:28:20,333 --> 00:28:26,292 for specific knowledge here, just go to the internet and get this five lines of code. And 203 00:28:26,292 --> 00:28:32,292 again, if we'll do the memory scraping here, and obviously, we can do the memory scraping and 204 00:28:36,083 --> 00:28:40,375 calling this function to the grid, probably we'll see here, the credit card. Yeah come on. 205 00:28:40,375 --> 00:28:46,375 So that's the idea of secure screen. I figured out that coding won't here. And obviously 206 00:29:07,625 --> 00:29:15,375 I won't be able to change all the point of sale. So I thought about other solutions. And then 207 00:29:15,375 --> 00:29:21,375 I investigate, maybe firewall will help here. Well, it doesn't matter which firewall next next 208 00:29:24,583 --> 00:29:30,583 next next generation will it be. Because ‑‑ well most of the point of sale, they work with 209 00:29:33,500 --> 00:29:40,000 HTTP. So if they work with HTTP. It doesn't matter what next generation they have there. And 210 00:29:40,000 --> 00:29:47,625 even the antivirus malware and all the other curses we have, it won't work. 'Cause you know 211 00:29:47,625 --> 00:29:54,417 what, it's Pentium4. How we will we run the whole end point security solution on them? It's 212 00:29:54,417 --> 00:30:02,167 pretty hard. And then I thought, maybe there might be data loss prevention products will help. 213 00:30:02,167 --> 00:30:08,833 Because I really don't care if someone infect the point of sale. I care if someone 214 00:30:08,833 --> 00:30:14,833 exfiltrate it is data. Well, it's pretty easy. If I have a memory scraper off malware, I'll 215 00:30:17,000 --> 00:30:23,875 include the credit card. So I'll be the only one able to decrypt them. So if I encrypt it, how 216 00:30:23,875 --> 00:30:29,333 will data loss prevention on it can be done. But the last product is the product that's 217 00:30:29,333 --> 00:30:35,708 widely used on point of sale. A lot of companies just decide a white listing product. On the 218 00:30:35,708 --> 00:30:42,958 point of sale, well a wide listing product allows only specific products to run on 219 00:30:42,958 --> 00:30:48,958 operating system. That's great. Especially when using MD5. Because MD5 it's one built for 220 00:30:51,833 --> 00:30:57,833 collisions. And then when someone decides to use a little bit past ‑‑ let's say SHA256, it 221 00:31:04,708 --> 00:31:10,708 becomes problematic in terms of performance. So no one really can have this way ‑‑ way it 222 00:31:13,500 --> 00:31:19,667 work. So I just thought about the correct solution. Because there are any other incorrect 223 00:31:19,667 --> 00:31:25,125 solutions than I just thought it's a long list. I I wanted to put on a side and tell you what 224 00:31:25,125 --> 00:31:32,125 did I think that can work for point of sale. So this approach is not technical at all. We just 225 00:31:32,125 --> 00:31:39,750 need to look for a little bit of intelligence before someone attacks us. So I just that you 226 00:31:39,750 --> 00:31:45,875 bring out really can explain why things are good. So this is a screen shot is something that we 227 00:31:45,875 --> 00:31:51,875 got from the forums. And I saw that someone just looks for info about how can I access the point 228 00:31:56,125 --> 00:32:02,125 of sale in the U.S. And what is the best malware I should use to get the data from it. That's 229 00:32:05,417 --> 00:32:11,250 pretty easy. Some recommend BlackPOS. On a lean nah. And then someone just gives the 230 00:32:11,250 --> 00:32:15,833 whole information because it's pretty easy. In a moment you can get the data. So if you infect 231 00:32:15,833 --> 00:32:21,833 the firmware of the terminal, you can do this that, track 2 data. And you have also another 232 00:32:25,333 --> 00:32:28,417 extended information that tells you okay from this specific POS terminal, maybe you won't be 233 00:32:28,417 --> 00:32:34,417 able to get the PINs. That's enough information for the one that want to hack. Another 234 00:32:37,125 --> 00:32:43,125 scenario is selling the malicious firmware for veriphones point of sale. So 235 00:32:45,417 --> 00:32:52,375 they say that it leaks dumps through GPRS which is pretty nice because no firewalls. No 236 00:32:52,375 --> 00:32:55,708 next, next firewalls. So this is pretty nice. Just for $700, probably will get, we don't have 237 00:32:55,708 --> 00:33:01,708 investment pretty fast on that. Our next thing is kind of an offer. No one wants to sell this 238 00:33:08,333 --> 00:33:14,333 because it's too cheap, it's $700 at the point of sale. So the business offer is do 239 00:33:16,333 --> 00:33:22,333 grabbing sharing. Okay, the last one is kind of requesting for information. So umm, here's 240 00:33:25,417 --> 00:33:31,417 someone just tells ‑‑ hay guy I just couldn't find specific data I want and can get them. So this 241 00:33:33,833 --> 00:33:39,833 is a PIN pad that you really can get the pin from there. But hay, hackers have a lot of 242 00:33:42,792 --> 00:33:49,958 creativity. So they said, okay, we'll just thermal imaginer. They can see where they're 243 00:33:49,958 --> 00:33:57,042 actually press when you pay with a pin pad and that'll give the number. So this, this is just 244 00:33:57,042 --> 00:34:04,667 one option that can work. Other option, if it's only limited to the specific point of sale and 245 00:34:04,667 --> 00:34:09,708 specific application, I believe sand box can work. And I know this is something that bypassed 246 00:34:09,708 --> 00:34:15,250 a lot of times. This is something specific not a browser, something that runs 247 00:34:15,250 --> 00:34:21,250 only to the point of sale may work until now, it works. Umm, the next thing that you should 248 00:34:25,500 --> 00:34:30,708 know about point of sale is that point of sale are pretty static. Except the fact that patches 249 00:34:30,708 --> 00:34:36,583 install on the point of sale. Nothing else changes. So that means if you can do the profile 250 00:34:36,583 --> 00:34:44,208 for the whole point of sale system, or systems, then probably will be able to find 251 00:34:44,208 --> 00:34:50,208 abnormal behavior, then get the information about the one that already infected. The problem is 252 00:34:52,542 --> 00:34:58,542 that if we just deploy it after infection, then everyone is normal. Next thing is going to 253 00:35:04,042 --> 00:35:10,625 operating system anomaly detection. This is the 0day products. The nice thing here is 254 00:35:10,625 --> 00:35:16,625 things point of sale works with a lot of drivers, native drivers. We can actually inject 255 00:35:18,708 --> 00:35:26,042 a new one drivers as part of this product and it will be much easier to understand if someone 256 00:35:26,042 --> 00:35:32,833 tries to ‑‑ just an example change the driver of the pin pad and then get the numbers back. 257 00:35:32,833 --> 00:35:38,500 So that's pretty nice approach. But all of this, this is products you already heard 258 00:35:38,500 --> 00:35:45,875 about. So this is something that probably most of you have didn't hear about. Here ‑‑ I met with 259 00:35:45,875 --> 00:35:51,875 some other company, really cool. They say they do run time obfuscation. This is translated 260 00:35:53,917 --> 00:36:01,875 into my words, they do an operating system obfuscation. And that means that they can 261 00:36:01,875 --> 00:36:07,708 change all the windows system calls, they can change the names of all of them. for instance if 262 00:36:07,708 --> 00:36:15,042 we have a malware, this malware will probably try to open a socket or HTTP connection. 263 00:36:15,042 --> 00:36:20,667 Great. The name is incorrect. So the malware won't be able to work. And this obfuscation works 264 00:36:20,667 --> 00:36:25,750 specifically for each operating system. So that means that if one operating system is infected 265 00:36:25,750 --> 00:36:30,167 and they found the naming convention, it probably won't go to the other point of sale. 266 00:36:30,167 --> 00:36:36,167 Which is pretty cool. But yet, no harm to send. We have products. That's nice. But it's 267 00:36:40,625 --> 00:36:45,958 not all. Because sometimes we'll need to add a little bit security architecture to the 268 00:36:45,958 --> 00:36:53,458 point of sale. And most of it is IT problem. So the defense is window's hardening which is a 269 00:36:53,458 --> 00:36:58,958 common thing that should be done. It's not done, by the way. Most the retailers, at least the 270 00:36:58,958 --> 00:37:04,958 mid size doesn't, it doesn't work. Obviously, the ones that are enterprise level, they have 271 00:37:08,500 --> 00:37:14,500 certain hardening. The next thing is ‑‑ well actually part of the hardening let's say logs. 272 00:37:17,958 --> 00:37:23,958 Audit trail. Really? Thank you for. No one can enable just auditing. It won't work. When 273 00:37:27,208 --> 00:37:33,208 you go to the store and you have an item, you just hear the beep. That's your coke, yeah. And if 274 00:37:37,917 --> 00:37:44,375 you hear [beep], you don't have to pass the code and then wait a few seconds and then [beep]. It 275 00:37:44,375 --> 00:37:50,375 won't work. Next thing is on assembly signing, this is common for software. Probably, it can 276 00:37:52,583 --> 00:37:59,375 work for point of sale. And I know it could be also bypassed, but yes, this is another layer 277 00:37:59,375 --> 00:38:07,125 of security. And actually, the fact that we have point of sale that are deployed as peak point 278 00:38:07,125 --> 00:38:12,250 of sale. So we have the whole business logic on the point of sale. So probably we need to 279 00:38:12,250 --> 00:38:19,208 obfuscate the code to let hackers work a little bit harder. It doesn't mean they 280 00:38:19,208 --> 00:38:25,208 won't by pass it. Another thing I thought about, is ‑‑ well it's pretty simple solution. If 281 00:38:31,458 --> 00:38:37,375 you'll just try to isolate the process with a few users. Let's say we have a simple user and 282 00:38:37,375 --> 00:38:44,167 another user. And if the process, the point of sale rises on the user, the log in user 283 00:38:44,167 --> 00:38:51,250 won't be able to read the process memory of the other user. And so that, again, I have 284 00:38:51,250 --> 00:38:57,250 a demo. So, I'm just closed here, there's everything, remove the log. Let me just run this 285 00:39:10,333 --> 00:39:16,333 point of sale with another user. I have another user named BAR, also a weak user. It will look 286 00:39:21,833 --> 00:39:27,833 at the process monitor, we'll be able to see that we have memory swiping process that runs as BAR 287 00:39:29,958 --> 00:39:35,958 and not FOO. And now let's try to inject it. Nothing. Won't work. Well, this is a simple 288 00:39:40,458 --> 00:39:47,583 injection, probably if you tried to do it a little bit harder. You may succeed. But the 289 00:39:47,583 --> 00:39:52,917 original way that the operating system works, is it does not allow any reading of process 290 00:39:52,917 --> 00:39:58,917 memory that runs with another user. So umm, generally, these aren't just solutions. So what's 291 00:40:07,000 --> 00:40:13,000 coming next? I don't know I have a few ideas. Lets say you need to steal a POS. Who ‑‑ well 292 00:40:15,125 --> 00:40:21,125 raise your hand if you steal the point of sale the right one. No one steals the right one? Okay, 293 00:40:25,708 --> 00:40:31,708 not too much. Who wants to steal the left one? Everybody right? That's what I would do. Dang. So 294 00:40:35,417 --> 00:40:40,250 umm, probably if, it will be able to sale steal the models on the sale. Will be able to steal 295 00:40:40,250 --> 00:40:46,750 the business project on the model point of sale. That's nice, because we can steal it 296 00:40:46,750 --> 00:40:53,458 and bring it back in the morning. Next thing which is brief challenging is memory 297 00:40:53,458 --> 00:40:59,458 scraping for the model point of sale. Well, I suppose that we'll be able to see another skimming 298 00:41:03,375 --> 00:41:10,250 devices attached to the point of sale or maybe exploiting other ways to read the process memory. 299 00:41:10,250 --> 00:41:17,000 I know this is pretty hard on the iOS. But the Android, I think that maybe possible. Next 300 00:41:17,000 --> 00:41:24,250 thing is umm taking the assumption the cashier is actually hacker. Because I 301 00:41:24,250 --> 00:41:30,250 already saw a post of a cashier that just publishes something that says, okay guys, I can give 302 00:41:33,792 --> 00:41:39,625 you VNC access to point of sale, just pay me. Okay. Maybe probably someone got it. Next 303 00:41:39,625 --> 00:41:45,625 thing is rubber ducky. I suppose that even if point of sale will stop all the USB storage 304 00:41:52,083 --> 00:41:58,083 communications, rubber ducky can do nice things on the point of sale. I still didn't see it, but 305 00:42:02,042 --> 00:42:09,375 I believe it will be pretty easy to do it. So as a summary, everything we discussed and our 306 00:42:09,375 --> 00:42:17,042 session, so we have security through obsecurity. The retailers believe that the fact 307 00:42:17,042 --> 00:42:24,542 that we don't know about retail, probably we won't be able to hack it. That's a lie. Now they 308 00:42:24,542 --> 00:42:30,542 know that we know. It's simple to exploit the systems. And again, this is as a result of 309 00:42:33,250 --> 00:42:39,333 the assumptions we got from this session and it's really hard to protect the point of sale 310 00:42:39,333 --> 00:42:44,375 because as you probably understand there is no one solution. We need to take a 311 00:42:44,375 --> 00:42:49,083 little bit security architect. Or take a few products and then combine everything together to 312 00:42:49,083 --> 00:42:55,083 get a not bullet proof solution yet. But as for you guys, you're not a business, you're just the 313 00:43:00,875 --> 00:43:06,625 ones that buy on the point of sale, don't worry, you have insurance on your credit cards. 314 00:43:06,625 --> 00:43:12,625 So that's fine. Thank you and if you have any questions, that's the time. (Applause.) 315 00:43:20,750 --> 00:43:26,750 >> (Inaudible). >> That's the mic? >> (Inaudible). >> The memory scraping you showed up 316 00:43:38,500 --> 00:43:44,500 there was just the pan. But with POS systems, do most of the retail systems store pans or 317 00:43:46,875 --> 00:43:53,500 track one track two? >> So you're asking if they store pans? >> Yeah when it's pen pad 318 00:43:53,500 --> 00:43:59,500 based POS system, does the software save it as a pan? ..It depends on the implementation. 319 00:44:04,208 --> 00:44:10,208 Because pin pads, you have the driver, you can set the set for the pin pad to not encrypt 320 00:44:13,250 --> 00:44:20,042 anything, just pass all the data. Although if you have the direct connection to the issuer, 321 00:44:20,042 --> 00:44:26,042 probably you won't see it on the POS anyway. >> Okay thank you. >> Okay. >> For all these 322 00:44:29,167 --> 00:44:35,667 attacks out here, why no mention of Point to Point encryption or encryptioning the pan at the 323 00:44:35,667 --> 00:44:42,125 card swipe and let the OS out of the equation entirely? >> Well this is correct. I didn't 324 00:44:42,125 --> 00:44:48,542 mention implement encryption. I suppose you meant the Pooint to Point encryption. >> The P to P 325 00:44:48,542 --> 00:44:54,000 tokenization. >> So P to P is something that's specific for the pin pad and also for the 326 00:44:54,000 --> 00:44:57,917 payment application. So therefore it's not in the scope. But that is correct, point of 327 00:44:57,917 --> 00:45:03,667 points encryption on pin pads can actually work. Again, it's not the point of sale. >> All 328 00:45:03,667 --> 00:45:09,667 right thank you. >> I am very sad that your evaluation on the point of sale system doesn't 329 00:45:12,833 --> 00:45:19,542 seem like we have much as a consumer. What can be done retro actively? There are literally 330 00:45:19,542 --> 00:45:23,333 millions of systems. Target for example, what can Target do or Macy's do now instead of protect 331 00:45:23,333 --> 00:45:29,333 in the future? >> Well umm, let me understand if I understand it correctly. You ask how can 332 00:45:35,583 --> 00:45:41,583 the ‑‑ >> What can be applied to the existing systems to protect them? >> Well, today the way to 333 00:45:43,708 --> 00:45:49,917 protect point of sale systems is using white listing. But following few bridges you saw 334 00:45:49,917 --> 00:45:56,708 over the internet, they just looking for new approaches to protect the point of sale. So it 335 00:45:56,708 --> 00:46:02,208 starts with vendor security and then it goes to the operating system security. So they try to 336 00:46:02,208 --> 00:46:08,208 layer the approach. But there's no standardized solution following the type of the 337 00:46:10,625 --> 00:46:16,625 breeches that you hear. >> Thank you. >> So you say point to point encryption doesn't involve 338 00:46:19,917 --> 00:46:26,000 the point of sale, but that's sort of the point. If you have point to point through all the 339 00:46:26,000 --> 00:46:30,458 way through the payment application, through the processor, even the payment 340 00:46:30,458 --> 00:46:36,583 application at that point doesn't have it. >> Exactly. >> So why is that not covered? 341 00:46:36,583 --> 00:46:43,667 >> Well retailers, that's a good question by the way. Retailers, why shouldn't they just use 342 00:46:43,667 --> 00:46:51,292 point to point? Well it cost a lot of money. Assume that you have thousands of point of sale 343 00:46:51,292 --> 00:46:55,958 and pin pads. And your pin pads does not support point to point encryption. Because you need a 344 00:46:55,958 --> 00:47:01,958 hardware encryption. So you have point to point encryption on hardware, and it will cost you a 345 00:47:05,625 --> 00:47:11,625 few hundred millions or you have the software solution. What will you choose? >> Well yeah, target 346 00:47:14,250 --> 00:47:20,208 costs ‑‑ they figure it costs them about a $148 million to deal with the fall out, I think 347 00:47:20,208 --> 00:47:27,125 they could probably afford a few pin pads that handle point to point encryption. 348 00:47:27,125 --> 00:47:33,125 >> (Inaudible). >> Yeah. (Laughing) . >> This might be a naive question, but can you help 349 00:47:36,750 --> 00:47:42,125 me understand how chip and pin if it does show up if it does change the login. >> Chip and 350 00:47:42,125 --> 00:47:48,125 pin doesn't really help. That just means that, you just use pin pads to verify the chip in 351 00:47:51,375 --> 00:47:58,125 order to prevent fraud. But it doesn't mean you can't steal credit card. It's only an issue 352 00:47:58,125 --> 00:48:04,458 of the driver that's accessing the point of sale. >> I think the assumptions that you went 353 00:48:04,458 --> 00:48:10,458 with in the beginning are pretty crazy because I've personally exfiltrated tons of credit cards 354 00:48:14,958 --> 00:48:20,958 information from NCR terminals, and in no situations were those assumptions generally true. With 355 00:48:23,625 --> 00:48:27,583 small merchants, especially, they don't have IT shops, they don't have people who are in the 356 00:48:27,583 --> 00:48:34,333 know, what is NCR specifically doing to improve that, to force ‑‑ I mean listen, if 357 00:48:34,333 --> 00:48:40,833 they're retailers, they don't to do the right stuff. We all know that. We have to meet them half 358 00:48:40,833 --> 00:48:46,833 way right. What do you guys do at NCR to bridge that gap and thank you. >> So, as an NCR, as 359 00:48:48,958 --> 00:48:53,833 I said, there's a lot of product that probably need to engage together to protect the point of 360 00:48:53,833 --> 00:48:59,500 sale. So if it's not the point to point encryption solution, then we're just looking for 361 00:48:59,500 --> 00:49:06,167 business partners, and then recommending to our customers to use the specific products in 362 00:49:06,167 --> 00:49:11,000 order to protect their environment. 'Cause hey, we can protect everything. We can just 363 00:49:11,000 --> 00:49:17,000 protect our scope of the product of the vendor. Okay? >> Thank you. (Applause.) >> Okay. So all 364 00:49:26,750 --> 00:49:32,167 this is really good. I wanted to talk about one of the hacks I found for payment systems. You 365 00:49:32,167 --> 00:49:37,875 were talking about ‑‑ sorry my voice is lost. But you're talking about payment 366 00:49:37,875 --> 00:49:43,292 applications, in over the last year, I did a lot of payment testing of these APIs. And one 367 00:49:43,292 --> 00:49:47,750 thing I found out, that was easiest we hacked. If you could get on the same network segment 368 00:49:47,750 --> 00:49:54,333 of the point of sale system, you could forge the HTTP request response to trick the point of 369 00:49:54,333 --> 00:50:00,333 sale system into believing a purchase was successful, even if the card or payment never went 370 00:50:02,750 --> 00:50:10,083 through. So what I did, I had some retailers that hired me. I basically tricked the point of 371 00:50:10,083 --> 00:50:16,458 sale into printing out receipts saying I paid cash for whatever merchandise. And I would grab 372 00:50:16,458 --> 00:50:22,125 the merchandise off the self‑and take it to another cashier and say I want my money back. And 373 00:50:22,125 --> 00:50:28,458 then I give the cash in the logs on the point of sale system ‑‑ >> (off mic). Not that you 374 00:50:28,458 --> 00:50:33,958 actually did this right? >> No I was hired to do it. It was all legal. But it was interesting 375 00:50:33,958 --> 00:50:39,042 because on the point of sale system, everything checks out. All the logs look normal. The 376 00:50:39,042 --> 00:50:45,000 sale looks normal. Because the cashiers aren't trained to know. They just say, oh, the point of 377 00:50:45,000 --> 00:50:48,375 sale says this purchase was successful. Here's the receipt, here's the merchandise.  ‑‑ ‑‑ 378 00:50:48,375 --> 00:50:52,125 all good and anyways, so I thought it was interesting different angle than like 379 00:50:52,125 --> 00:50:56,125 anything you've talked about here. But it's something that made me think about is really 380 00:50:56,125 --> 00:51:02,125 securing the payment application the API in addition to the the system itself. The network 381 00:51:11,958 --> 00:51:18,917 segment and the other things we talked about. I just wanted to share that. >> Thanks for 382 00:51:18,917 --> 00:51:24,250 sharing. (Applause.)