1 00:00:00,125 --> 00:00:06,917 >>I'm Eric. This is Josh. Hi! Today we're talking about several attacks around RFID, 2 00:00:06,917 --> 00:00:12,917 specifically RFID tag that we'll go into detail about that are used access facilities. Not so 3 00:00:15,167 --> 00:00:21,542 much for cars or buses, amusements parks and stuff like that. So, a quick little 4 00:00:21,542 --> 00:00:25,083 agenda. We will kinda go through a high level around red teaming. The kind of attacks that we do. 5 00:00:25,083 --> 00:00:27,750 Traditional attacks and techniques you have heard about for years now, specifically RFID 6 00:00:27,750 --> 00:00:32,625 attacks is what we're doing today. Then we'll talk about some advanced attacks we've been 7 00:00:32,625 --> 00:00:36,500 able to develop ourselves, and then some mitigation and remediation and things you guys 8 00:00:36,500 --> 00:00:42,375 can do to protect against some of these things we are showing. So about Juarez. Myself and my 9 00:00:42,375 --> 00:00:46,333 partner Chris Nickerson started Juarez about 6 years ago. Since then we've been doing a lot of 10 00:00:46,333 --> 00:00:51,000 big things in the industry but something we have been proud of now for a couple years is we put 11 00:00:51,000 --> 00:00:54,958 together something called - - And with a lot of other people in the community put together 12 00:00:54,958 --> 00:00:58,667 something called the penetration testing execution standards, so if you guys have any questions 13 00:00:58,667 --> 00:01:03,333 around Penn testing, the process of it, how it works, details around it, check that out. 14 00:01:03,333 --> 00:01:07,750 We've also done lots of other things that are boring to read, so I'll move on. Myself, I'm one 15 00:01:07,750 --> 00:01:13,167 of the owners of Juarez and also principal consultant and also a co- owner of the company called 16 00:01:13,167 --> 00:01:16,708 Layer 8 Labs that we just launched this week, so when you guys get a chance, check that 17 00:01:16,708 --> 00:01:23,583 out as well. Do you have an important call? [Laughter]. >> Not anymore! Hi, my name is 18 00:01:23,583 --> 00:01:29,333 Joshua Perrymon. I came on with Lars almost a year ago. I think we worked this out at DEFCON 19 00:01:29,333 --> 00:01:36,833 last year. I'm also a senior partner with Layer8Lab.com. If you guys want to check it out, 20 00:01:36,833 --> 00:01:41,417 we just released a new user attack framework. That's about it. So, a quick little funny 21 00:01:41,417 --> 00:01:49,042 slide, it really says a lot of what we do. We have been lucky enough to build a company around 22 00:01:49,042 --> 00:01:52,458 our hobbies and passions and then get paid for it. So that's why Lars was started, and that's 23 00:01:52,458 --> 00:01:57,417 why everybody loves working there. Specifically today, we are talking about red team 24 00:01:57,417 --> 00:02:01,292 testing. Red team testing has a huge definition that I don't care to read. The analogy behind 25 00:02:01,292 --> 00:02:05,250 it that we always use is red team testing puts you in the ring, puts you in the fight. You 26 00:02:05,250 --> 00:02:10,458 can't have an idea of how well you can defend the fight until you get in and fight. And so, 27 00:02:10,458 --> 00:02:13,750 everybody does things in the labs, does things back in their own company itself, but until 28 00:02:13,750 --> 00:02:18,917 you actually put yourself against an adversary, you don't know how you will stand up 29 00:02:18,917 --> 00:02:23,333 against them. The things we are showing today are true adversarial modeling. The 30 00:02:23,333 --> 00:02:26,750 reasons to conduct it, pretty straightforward, right? Show real impact to the business from 31 00:02:26,750 --> 00:02:30,042 physical, social, electronic, whatever it might be, all the different ways it can be 32 00:02:30,042 --> 00:02:36,625 compromised. Just a quick little summary of how red team testing works. Red team testing, 33 00:02:36,625 --> 00:02:40,917 the idea behind is blended attacks, right? Where social, electronic and physical or all 34 00:02:40,917 --> 00:02:45,042 three come together. That is what red team focuses. So, today we are showing one component of 35 00:02:45,042 --> 00:02:48,792 that which will be direct physical attacks. Those can lead to things like physical 36 00:02:48,792 --> 00:02:52,625 access to facilities, then that would lead to electronic access, or we're going to be sandwiching 37 00:02:52,625 --> 00:02:56,375 things around blended attacks. So, we may compromise something electronically and get to a back 38 00:02:56,375 --> 00:03:00,208 system, which is what we'll show here in a little bit. And once we have back system access, then 39 00:03:00,208 --> 00:03:06,417 we can maybe get physical access after. So traditional attacks that we're not going to bore you 40 00:03:06,417 --> 00:03:11,208 with. You have heard of lock picking and tailgating and shimming and impressioning and 41 00:03:11,208 --> 00:03:14,750 bumping and all kinds of other cool things, what we are focusing on today is just RFID. 42 00:03:14,750 --> 00:03:18,250 >> which in those attacks they work really well, right? But, they are traditionally kind 43 00:03:18,250 --> 00:03:24,708 of loud in nature, so you can't always pull those attacks off, so what we're going to show is 44 00:03:24,708 --> 00:03:29,417 hacking RFID where it beeps and you walk in, basically. >> Yeah, because what we have seen 45 00:03:29,417 --> 00:03:33,083 throughout the years now doing this, is who is going to stop you if you beep in a door and 46 00:03:33,083 --> 00:03:36,375 the door opens and you walk in? Chances are no one is going to question you. right? If you can 47 00:03:36,375 --> 00:03:39,500 get yourself a badge, you can actually make a valid badge, maybe you are lucky enough and 48 00:03:39,500 --> 00:03:42,292 can get a picture on it, or get a picture in the badge system through a blended attack, who is 49 00:03:42,292 --> 00:03:49,292 going to stop you once you're in the building? >> All right, so we're not going to get real deep 50 00:03:49,292 --> 00:03:56,875 into details, I'm sure a lot of people understand RFID by now. So what we're going to cover is 51 00:03:56,875 --> 00:04:02,042 low- frequency and high- frequency. We don't get into the UHF stuff, so the low- frequency 52 00:04:02,042 --> 00:04:09,583 of the prox card, the older first badges, a lot of times the card is actually a lot thicker. 53 00:04:09,583 --> 00:04:14,583 And the other one or HF is high- frequency. So the I-class stuff, with encryption, that we're 54 00:04:14,583 --> 00:04:20,583 really into, it's 1356 megahertz. >> next two pages. So who uses it? 80% or 70 to 80% 55 00:04:26,500 --> 00:04:32,500 of people that have badges actually use the old unencrypted prox badges. Who is vulnerable? 56 00:04:36,250 --> 00:04:42,292 Government facilities, medical facilities, financial institutions, nuclear, power and 57 00:04:42,292 --> 00:04:47,292 water facilities, education. A lot of those are the old proxy stuff, right? They haven't even 58 00:04:47,292 --> 00:04:51,542 gotten over to I-class encrypted stuff which we're going to own in a minute. So understanding 59 00:04:51,542 --> 00:04:58,333 back systems. So here are the four main components of a badge system. Of course, this is a lot 60 00:04:58,333 --> 00:05:02,375 smaller version, but this is applicable to all badge installations. You have the 61 00:05:02,375 --> 00:05:07,542 cards which are powered by the reader, so think of it as shining a flashlight into a 62 00:05:07,542 --> 00:05:12,417 mirror. The reader is actually putting the power out. That is sent. It powers the card. The 63 00:05:12,417 --> 00:05:18,000 card then sends its information back over to the reader. That gets sent back to a controller. 64 00:05:18,000 --> 00:05:24,667 And the host PC or the badge system, for instance, it's hooked into the controller and 65 00:05:24,667 --> 00:05:31,000 that data is sent to the badge system and it makes its logic decisions based on the facility 66 00:05:31,000 --> 00:05:33,500 code and card data sent to it. >> So some of the things we brought today to demo some of 67 00:05:33,500 --> 00:05:40,750 the cloning we're going to be doing, a company out of Lithuania, Lithuania Midpoint 68 00:05:40,750 --> 00:05:44,875 Security, actually builds badge demo systems. Whatever components you want to include 69 00:05:44,875 --> 00:05:48,208 in it, you can buy, put together, have a rig set up in your lab, you can do your own 70 00:05:48,208 --> 00:05:52,792 testing with it. Here we have one of the new edge readers from HID. We also have a multi class 71 00:05:52,792 --> 00:05:55,833 so we can do both the frequencies Josh was talking about, and then you can simulate 72 00:05:55,833 --> 00:06:00,708 things like push to exit, break an alarm if you actually bypass a door, shim a lock, under-door 73 00:06:00,708 --> 00:06:04,625 hook it, whatever it might be to simulate an alarm as well as push to exit with a mag release. 74 00:06:04,625 --> 00:06:08,250 So just for demonstration purposes, we have a full badge system and software running to 75 00:06:08,250 --> 00:06:11,250 demonstrate the things we're going to be doing. >> Yes. And this is the newer edge 76 00:06:11,250 --> 00:06:17,167 system as Eric said. So, it is -- The one we've just shown is more of the older traditional 77 00:06:17,167 --> 00:06:23,333 style. This is what HID is moving to. Power over Ethernet, it has a lot of services, a lot 78 00:06:23,333 --> 00:06:29,458 of web app stuff listening. So a big attack surface with this new system as well. So, again, what 79 00:06:29,458 --> 00:06:34,333 we mentioned, we're really not interested in ski passes or anything like that. We're just 80 00:06:34,333 --> 00:06:42,292 focused on the badges that get you into physical facilities. So this slide shows the most common 81 00:06:42,292 --> 00:06:49,917 badges used. So, again, the 70 to 80% of the badges are prox, the old unencrypted stuff. So 82 00:06:49,917 --> 00:06:54,125 then there's company that, you know, newer facilities that are buying new stuff. Because that's 83 00:06:54,125 --> 00:06:58,500 the thing, right, with badge systems, a lot of that is tied into the facility. So if you 84 00:06:58,500 --> 00:07:03,292 have an old building, it's typically going to be the older stuff. Unless somebody goes 85 00:07:03,292 --> 00:07:07,500 in and redoes it. Because it's a real pain in the ass to come in and run all new readers and hook 86 00:07:07,500 --> 00:07:12,667 all new stuff up. So anyways, this shows is the layout of how the antennas are, and you see on 87 00:07:12,667 --> 00:07:17,708 the prox stuff, the antenna is a lot bigger than the I-class, but that's all built inside the card 88 00:07:17,708 --> 00:07:25,000 and the integrated circuit. So read ranges, so here are the limitations if you are using off 89 00:07:25,000 --> 00:07:31,750 the shelf hardware. So the prox stuff and even I- class, 12 inches. >> About 3 inches 90 00:07:31,750 --> 00:07:35,625 usually. >> Yeah, it's typically 3 inches if you use - - . >> Like this reader right 91 00:07:35,625 --> 00:07:39,625 here. >> Yeah. >> You have to get pretty close before it reads it. >> You almost have to touch 92 00:07:39,625 --> 00:07:45,583 it. So what we have here, this is a parking deck reader and they sell these for both prox 93 00:07:45,583 --> 00:07:50,208 and I- class, so it's a lot bigger footprint, but again if you are using off the shelf 94 00:07:50,208 --> 00:07:55,250 stuff, you are limited to that. And Owen did a bad ass talk about making this long- range. 95 00:07:55,250 --> 00:08:02,167 So what we wanna say, is don't think about you are just limited to what hardware is on eBay. You 96 00:08:02,167 --> 00:08:06,917 get with some guys, do some research and we're talking 10 to 25 feet and maybe more. >> 97 00:08:06,917 --> 00:08:12,708 Yeah. >> So - - . >> and just with a garage reader that you buy off eBay or buy from 98 00:08:12,708 --> 00:08:16,542 HID, it's anywhere from one and a half to two feet. Which if you think about it, that's me 99 00:08:16,542 --> 00:08:20,000 walking up to Josh and asking for a smoke or asking for a light. I'm that close to him. I 100 00:08:20,000 --> 00:08:23,667 can get a read on his card. So that in your backpack, clipboard, whatever it might be, 101 00:08:23,667 --> 00:08:28,167 a satchel If you are European, you can walk up and read somebody's card if you are a 102 00:08:28,167 --> 00:08:36,000 couple of inches away. >> so. And all this is built around the Wigan protocol, so if you go 103 00:08:36,000 --> 00:08:41,542 back thinking to the slide earlier, we present the reader with the card. Once the card 104 00:08:41,542 --> 00:08:47,458 does its translation, it's all Wigan clear text from the reader itself back to the back end 105 00:08:47,458 --> 00:08:53,458 system. So what that looks like is, this shows you the layout. Wigan is a faulting signal, so 106 00:08:55,833 --> 00:09:00,917 the signal will be flat lined and then when it actually receives the bit, it drops down. 107 00:09:00,917 --> 00:09:05,250 So falling edge is how we identify those signals in the aldrino. And the last thing we 108 00:09:05,250 --> 00:09:12,667 want to leave you with on this slide, there's three things that you need to get into a facility. 109 00:09:12,667 --> 00:09:18,667 You've got to know the bit link, the type of card it is, so 35 bit, corporate 1,000, or 26 bit 110 00:09:21,375 --> 00:09:26,417 or custom 46 bit. >> Or low- frequency, high- frequency, whatever kind of card it may be. 111 00:09:26,417 --> 00:09:29,833 And you can identify these things through various ways, and we'll talk about some of that. 112 00:09:29,833 --> 00:09:35,583 >> yeah. This shows the layout of the cards. There's the start bit, a parody bit at the front 113 00:09:35,583 --> 00:09:41,417 of the card and then you have the facility code and then the user code. It depends on what 114 00:09:41,417 --> 00:09:47,292 card type it is about how long those can be. So obviously a custom 46 bit is going to 115 00:09:47,292 --> 00:09:54,958 provide you with a lot longer facility code and a lot longer user code. >> So three major 116 00:09:54,958 --> 00:09:59,417 components, those things should be sensitive and private, right? Well, one of the things we found 117 00:09:59,417 --> 00:10:03,208 through a lot of the research we were doing, and development around these things is that 118 00:10:03,208 --> 00:10:09,250 information is not so private. Because of the way HID structures their ordering 119 00:10:09,250 --> 00:10:15,000 process and reseller process, you can actually go on eBay and buy extra cards companies are 120 00:10:15,000 --> 00:10:19,042 selling. And the sad part about this is, I don't know if you can see it, but printed on the box 121 00:10:19,042 --> 00:10:23,208 which is displayed in high quality pictures on eBay is the facility code and the card 122 00:10:23,208 --> 00:10:28,083 numbers in range for what they bought probably in excess. So right there alone, we have a 123 00:10:28,083 --> 00:10:32,167 facility code for a particular person on eBay. So everybody knows through O-cent that you 124 00:10:32,167 --> 00:10:35,625 can typically find somebody through social media or whatever it might be. So the chances of 125 00:10:35,625 --> 00:10:42,333 us finding who that card belongs to and what company we can get access to, pretty probable, 126 00:10:42,333 --> 00:10:50,250 right? Also go back one more. The way HID sells their cards is in a series in sequence numbers. 127 00:10:50,250 --> 00:10:55,250 So, say you run out of cards, you're hiring more people. You call HID up or your reseller up 128 00:10:55,250 --> 00:10:59,375 and they send you another 500 cards, 1,000 cards, whatever it might be. Then all of a sudden 129 00:10:59,375 --> 00:11:02,250 you have budget cuts and you need to sell some cards, whatever it might be, like this 130 00:11:02,250 --> 00:11:06,542 guy. And you decide to go sell a hundred of your cards. What we will show later is . . . If we 131 00:11:06,542 --> 00:11:12,333 have a valid card number, we can also do brooding and we can display say, access card 6,000. 132 00:11:12,333 --> 00:11:17,125 If I know 6,000 is a valid card . . . Chances are 6100 or maybe back a hundred, those are valid 133 00:11:17,125 --> 00:11:22,667 cards as well. So if they are selling excess off of eBay, and they have an extra 500 cards, 134 00:11:22,667 --> 00:11:27,583 chances are 500 back or 400 back, you're probably going to get a valid hit. So through 135 00:11:27,583 --> 00:11:31,750 intelligence gathering, just by looking at what's available, you can probably connect the dots 136 00:11:31,750 --> 00:11:35,333 and find out where those cards belong and what they might have access to. So, data's not so 137 00:11:35,333 --> 00:11:39,000 private. So if you have the opportunity to actually get a picture of somebody's card, if 138 00:11:39,000 --> 00:11:42,375 you can get it in your hands or you have a nice lens on your camera, you get a picture of 139 00:11:42,375 --> 00:11:46,542 somebody's card, there are printed on the bottom of the card a lot of times, they 140 00:11:46,542 --> 00:11:51,042 actually say some kind of an order number. Well, there are third party sites out there that 141 00:11:51,042 --> 00:11:55,292 are resellers of HID products and you can give them the order number and they will look up the 142 00:11:55,292 --> 00:11:59,250 number for you and say this is facility code and this is card number and they will ship you 143 00:11:59,250 --> 00:12:03,625 more cards. Well now if I've used the reseller to ship me cards that have a valid facility 144 00:12:03,625 --> 00:12:10,083 code just by a picture I took. So use someone else to do your identification. >> All right, 145 00:12:10,083 --> 00:12:14,750 so now we're going to get into the actual hands- on stuff is, which is the cool part. So the 146 00:12:14,750 --> 00:12:21,167 first thing we're going to talk about is cloning and replaying low- frequency cards. So, again, 147 00:12:21,167 --> 00:12:28,000 these are unencrypted used by 70 to 80% of the facilities globally - - or in the United 148 00:12:28,000 --> 00:12:34,167 States. Again, a lot of those are critical infrastructures that still use this old 149 00:12:34,167 --> 00:12:37,500 technology. >> and you guys have probably heard about this in previous talks. Fox 2 has 150 00:12:37,500 --> 00:12:41,750 been around for years, it's been vulnerable for years, it's all unencrypted, you can sniff the 151 00:12:41,750 --> 00:12:45,958 authentication to the reader. You can do cloning, replay, so I wanted to give you a little 152 00:12:45,958 --> 00:12:49,958 primer of what we are leading up to which is the encrypted stuff. Anybody ever heard of 153 00:12:49,958 --> 00:12:55,208 Proxmark3? Pretty common tools to use for RFID hacking. They have the ability to do both low- 154 00:12:55,208 --> 00:13:00,667 frequency and high- frequency based on the antenna you hook up to. Not too expensive, you can 155 00:13:00,667 --> 00:13:03,667 buy the knockoff versions out of China. Or you can spend a little more money and get them from the 156 00:13:03,667 --> 00:13:09,958 vendor. These will work really nice. So here we have a valid proxy 2 that works on the bad 157 00:13:09,958 --> 00:13:15,750 system. You'll see a successful authentication, mag lock opens up. So what we are going to do, 158 00:13:15,750 --> 00:13:21,292 we're going to take standard stock firmware on a prox mark 3, do an actual read on the card. 159 00:13:24,292 --> 00:13:30,292 >> Possibly. >> I think it read. >> Put it in replay mode. Or not. First fail. >> Demo, 160 00:13:33,875 --> 00:13:40,875 demo, demo. [Laughter.] >> Does that open the door? >> No, this card does. >> Yeah, it does. 161 00:13:40,875 --> 00:13:46,875 >> Nice. >> All right. Put it in record mode. >> This is awesome. >> So what should be 162 00:13:52,750 --> 00:13:58,542 happening is a Proxmark3 out of the box, no custom software or anything on it, you can put it 163 00:13:58,542 --> 00:14:05,500 into record mode so it gets - - if you get within the distance of the badge you can record it 164 00:14:05,500 --> 00:14:08,208 and then it turns around and replays it to the badge reader. >> [Laughter]. >> Hold on. 165 00:14:08,208 --> 00:14:14,208 This bitch is working. Record. Really? >> Eric, Eric. >> We just spend two hours testing 166 00:14:22,083 --> 00:14:26,542 everything in the back. >> Well that is the way it works. Every time you try to give a live 167 00:14:26,542 --> 00:14:32,542 demo, it never works right. >> Oh, we got this time. Yeah, it's awesome. >> [Laughter]. >> 168 00:14:40,792 --> 00:14:46,792 Next. What we were getting to was when that does work, we've been able to conceal it, right? 169 00:14:58,583 --> 00:15:02,458 You can't walk up to a building with a Proxmark3 and an antenna and try to badge in, somebody 170 00:15:02,458 --> 00:15:06,792 will probably question you. Put them inside of things that don't block the RFID signals, plastic 171 00:15:06,792 --> 00:15:10,667 clipboards work great, we found through years of red team testing that if you have a 172 00:15:10,667 --> 00:15:12,792 clipboard in your hand and a pen, put a collared shirt on and nobody is going to stop you 173 00:15:12,792 --> 00:15:17,417 anyway. Put a badge inside of it with that thing in replay mode, walk up, badge in. So. That was 174 00:15:17,417 --> 00:15:22,958 the point of that demo that just worked awesome. >> Anyway, the next thing you can do with that 175 00:15:22,958 --> 00:15:28,917 is you can take a custom firmware and upload it to the Proxmark and have Proxbrew 176 00:15:28,917 --> 00:15:34,833 works. Now, what Proxbrew does, again like Eric mentioned, so say there's 3 pieces of data we 177 00:15:34,833 --> 00:15:42,333 need to have, the card type, the facility code, and the user ID. So for this attack, we 178 00:15:42,333 --> 00:15:47,083 configured the card type, configured the facility code and then we brute forced the user 179 00:15:47,083 --> 00:15:53,875 space. So essentially what this does, if we know that, say, I have data center access, but 180 00:15:53,875 --> 00:16:01,083 Eric doesn't have data center access, so if you have his card space and know that the user ID 181 00:16:01,083 --> 00:16:06,750 is 100, then you start there and what - - essentially what this does is every so many seconds it 182 00:16:06,750 --> 00:16:12,292 goes through and presents a facility code and user ID just like the badge for him. And 183 00:16:12,292 --> 00:16:16,958 eventually it will get hit or get caught. >> Usually you'll get a hit. >> Yeah. Hopefully. 184 00:16:16,958 --> 00:16:21,000 >> And the one thing to note when you are doing Proxbrew, it is a custom version of firmware 185 00:16:21,000 --> 00:16:26,167 to put on the Proxmark 3, so re-flash your custom firmware has Proxbrew built in. Once you 186 00:16:26,167 --> 00:16:30,542 have it on there, you need to adjust the timing. By default, it's really noisy really fast. 187 00:16:30,542 --> 00:16:34,875 The readers either can't successfully or fail on authentication. Lower your 188 00:16:34,875 --> 00:16:41,458 timing a bit and you won't get as many false negatives. So. This is Josh's baby. We pulled 189 00:16:41,458 --> 00:16:48,000 some influence from a lot of different places. Again, a lot of things we are showing here 190 00:16:48,000 --> 00:16:52,500 today aren't necessarily OD and HID, they are things that have been out for a long time, but 191 00:16:52,500 --> 00:16:57,583 they are also things that people have talked about and talked about in small aspects of 192 00:16:57,583 --> 00:17:01,125 attacking some kind of company. Today we're talking about how to combine all of the things we're 193 00:17:01,125 --> 00:17:05,583 going to put into a blinded attack and a full scope test. >> exactly. Our saying is from 194 00:17:05,583 --> 00:17:11,292 the lab to the street, so everything we show you has been tested real world, live, for 195 00:17:11,292 --> 00:17:17,833 clients, and we know it works. >> Other than that. >> Other than the proxy. >> Yes, I'll 196 00:17:17,833 --> 00:17:22,542 just tell somebody to open the door and they'll open it. >> Yeah. >> So giving credit where 197 00:17:22,542 --> 00:17:27,833 credit is due, Bishop Fox did a talk I believe last year at Black Hat, on a tacit reader he 198 00:17:27,833 --> 00:17:35,500 put together, a simple parking garage type reader hooked up to his own version of an ardrena 199 00:17:35,500 --> 00:17:40,583 with his own code, and he was doing low signal reads or low- frequency reads from about one 200 00:17:40,583 --> 00:17:45,625 and a half to two feet away. Limitation over distance is obviously voltage and the type 201 00:17:45,625 --> 00:17:50,667 of reader that you have. What we have here that we're going to demo, we have the encrypto 202 00:17:50,667 --> 00:17:56,083 version. But credit to Bishop Fox and the research previously before him. He was able to put 203 00:17:56,083 --> 00:18:01,458 together the first long-range reader for low frequency. >> Absolutely. >> So we're going 204 00:18:01,458 --> 00:18:06,292 to step it up a little bit, talk about advancing these attacks beyond the unencrypted clear, 205 00:18:06,292 --> 00:18:09,875 what people have been talking about for years. >> Yeah, because anybody can buy a 206 00:18:09,875 --> 00:18:14,500 Proxmark and attack those 80% of companies in the US. So we want to show you how to get after the 207 00:18:14,500 --> 00:18:21,083 other percentage. So this is where we started. We had a need for this. One of the first ever 208 00:18:21,083 --> 00:18:27,250 the jobs we really wanted to get into a secure facility, they were not using Prox. So, we took 209 00:18:27,250 --> 00:18:32,375 the Proxmark and threw it away, just like that. So they were using I- class, so we're 210 00:18:32,375 --> 00:18:36,917 thinking oh, I- class, this is kinda interesting. They have encryption, the reader and the 211 00:18:36,917 --> 00:18:42,917 card share this private key. >> Private key. >> So one of the attacks that we did is to take 212 00:18:46,000 --> 00:18:52,833 this big reader and put it into a backpack. All this is off the shelf, nothing fancy, in this 213 00:18:52,833 --> 00:19:00,000 version we're showing. It's just an Ardreno Uno, and off the shelf I- class long- range 214 00:19:00,000 --> 00:19:06,125 reader that they use in parking decks. And if you get one, when it warms up, it's supposed to 215 00:19:06,125 --> 00:19:11,500 make this noise. I don't know why. >> HID, they never answered us when we called them. 216 00:19:11,500 --> 00:19:17,500 Go to the next slide. >>So, again, off the shelf stuff. As you can see, this is the first 217 00:19:21,167 --> 00:19:26,833 layout that we made. This is kind of like the lab unit that we set up. So just an Uno, it 218 00:19:26,833 --> 00:19:32,083 has a contrast switch on it and it's got some connecters so you can connect the wiring and 219 00:19:32,083 --> 00:19:36,708 things in. Because what we found out is, as you can see in this demo here, the wires are 220 00:19:36,708 --> 00:19:41,708 just plugged into the Uno, so if you're walking around you have that one chance, you know, 221 00:19:41,708 --> 00:19:46,625 creepy smoker guy, if you have to get into somebody's bubble, get a cigarette from them, then 222 00:19:46,625 --> 00:19:53,208 you don't want that read to fail. So we noticed there's so many wires, you can see here, 223 00:19:53,208 --> 00:19:57,583 that we got in, used fritzy and we designed this board using this setup. >> Whatever. Good 224 00:19:57,583 --> 00:20:03,583 enough. >> Yeah. And how it works is, you power it with a battery and it always, with all 225 00:20:07,958 --> 00:20:13,042 these readers, there's two wires that typically go to them, the green and white wire, that's the 226 00:20:13,042 --> 00:20:19,833 Wigan, data 1 and data 0. So the trailing falling edge is what we look for in the Adrena. I'm 227 00:20:19,833 --> 00:20:24,458 going to attempt to demo it. >> And the thing to note when you're building this, at the end 228 00:20:24,458 --> 00:20:27,583 of the talk I'll give you the URL off of GetHub to pull down the code that Josh has been 229 00:20:27,583 --> 00:20:31,875 putting together so you guys can go out and buy an Ardreno, put the code on it, buy a reader. 230 00:20:31,875 --> 00:20:36,250 You've got the full setup. >> Yeah, I mean $200, $300. Probably. >> Yeah, the reader 231 00:20:36,250 --> 00:20:39,708 is the biggest expense. >> Yeah. And we'll put up all the fritzing stuff to so you can 232 00:20:39,708 --> 00:20:44,958 make your own PCPs. That way you don't have all these wires because, again, it's really hard 233 00:20:44,958 --> 00:20:51,875 to keep those wires in it. So what we want to show is with the long- range reader, before you 234 00:20:51,875 --> 00:20:57,958 were within an inch, two inches rubbing somebody's ass. With the long- range reader, you can get 235 00:20:57,958 --> 00:21:02,625 within someone's bubble. >> That's this close. Can I bum a light? >> Sure, you can bro. 236 00:21:02,625 --> 00:21:08,625 Smoke with me, man. >> It works. >> So something Josh added, that was the demo, that 237 00:21:13,333 --> 00:21:17,083 was necessary for us in the field is, you are walking through a crowd of people, will 238 00:21:17,083 --> 00:21:23,208 get multiple reads and need some kind of offline storage. So LCD having access to what was read 239 00:21:23,208 --> 00:21:26,750 just now, if you have it out in the open, also having the ability to hook up an SG card to 240 00:21:26,750 --> 00:21:31,083 it, writes it all to a flat file. Go back to the van, pars through it, find out what card 241 00:21:31,083 --> 00:21:36,417 you need, make your card with some of the stuff we're going to show you, walk back into the 242 00:21:36,417 --> 00:21:42,833 building 5 minutes later. >> We heard there were new speakers here. >> Yeah. Over here. Long- 243 00:21:42,833 --> 00:21:48,833 term listener, first time caller. Yay! >> [Applause]. >> This is going to piss Rob off. 244 00:21:57,750 --> 00:22:02,042 Where are you at, Rob? Stand up. >> So we actually - - so we have another special edition of 245 00:22:02,042 --> 00:22:05,958 shot the new because in addition to having two new speakers, we also have a new speaker, Dune 246 00:22:05,958 --> 00:22:11,958 Scout. So if you could welcome Scout. We have not destroyed her yet, but there's always time. 247 00:22:21,292 --> 00:22:27,292 All right. Some love for our new speakers, please. >> [Applause]. >> Just one more. 248 00:22:32,708 --> 00:22:38,708 >> No, no. >> Didn't you hear, I'm giving the rest of your talk? >> Sweet! I'll drop the 249 00:22:45,583 --> 00:22:51,583 mic. >> All right. >> As you were. >> Thank you, guys. Thank you. >> [Applause]. >> Do you 250 00:22:59,125 --> 00:23:05,125 want to hook up and show? So all of these things we're talking about today, we get 251 00:23:07,500 --> 00:23:13,583 serious now, intimate, all of the things we're talking about today around I- class it's 252 00:23:13,583 --> 00:23:21,250 pretty sad, hence the slide. It came out in 2010 and this is the part where we're probably going 253 00:23:21,250 --> 00:23:25,542 to piss them off, but HID has known about the vulnerability with I- class and the encryption 254 00:23:25,542 --> 00:23:31,542 of I- class for four years. And the current technologies that Josh was showing in the previous 255 00:23:33,833 --> 00:23:38,583 slides with the multi card formats, the higher bit links, the longer facility codes, the 256 00:23:38,583 --> 00:23:43,208 longer range of user codes, all of those have been built upon the foundation that has been 257 00:23:43,208 --> 00:23:48,750 flawed since 2010. In 2010, what started all this was a paper that came out called Heart 258 00:23:48,750 --> 00:23:54,292 of Darkness. These guys put in heavy research on how I- class and how the protocol works. What 259 00:23:54,292 --> 00:23:59,417 they found was the first revision of readers that came out had the serial interface 260 00:23:59,417 --> 00:24:05,083 still enabled. By finding that, they then find out how to dump the firmware. Once they found 261 00:24:05,083 --> 00:24:10,583 the firmware, then they found the encryption keys and so the encryption keys were indirectly 262 00:24:10,583 --> 00:24:15,667 leaked out since 2010. The process to obtain them is nothing more than going to read 263 00:24:15,667 --> 00:24:23,542 the paper, get the right hardware and cable we searched all over for. Once we had that, 264 00:24:23,542 --> 00:24:27,083 we were then able to hook up to the revision a reader, dump the firmware and get an encryption 265 00:24:27,083 --> 00:24:31,125 key. At that point we had the encryption key to write our own codes, so now we're HID pretty 266 00:24:31,125 --> 00:24:38,167 much. >> There's a couple different ways to do this, a couple different ways you can go 267 00:24:38,167 --> 00:24:44,667 about it. There are two to three papers on how to do it. Here's the thing, if you're going to do 268 00:24:44,667 --> 00:24:49,375 it, you have to have a revision, a reader that you can plug into the ICSP interface with an FTDI 269 00:24:49,375 --> 00:24:57,292 cable. And it uses a bit bang method, so there is copy protection on the firmware. So 270 00:24:57,292 --> 00:25:02,417 the way that a couple guys got around that is they were basically taking two readers and 271 00:25:02,417 --> 00:25:07,833 putting jumps and stuff in the first one and getting part of it, and then getting part of the 272 00:25:07,833 --> 00:25:13,167 second one. It's going to trash both readers. We have got a stack of hardware that we burned 273 00:25:13,167 --> 00:25:20,458 down, that are no good anymore. >> One was burned by accident. I got grounded to the wrong one. 274 00:25:20,458 --> 00:25:24,000 >> You have to be careful planning this stuff, they have sensitive electronics. If you 275 00:25:24,000 --> 00:25:30,208 are messing around and you plug into the wrong hole or the wrong wire, it's going to brick. So 276 00:25:30,208 --> 00:25:36,208 what we want to show here is, so, you know, you can spend your three months like we did, you 277 00:25:40,208 --> 00:25:47,708 know, in the lab, staying up all night, reversing this stuff trying to figure it out, or, you 278 00:25:47,708 --> 00:25:55,583 can go online and buy one from China for 300 bucks. Already got the key in it. >> [Laughter]. 279 00:25:55,583 --> 00:26:01,583 >> With the China hardware that you buy, you actually buy a stock on the key 5321. Pretty 280 00:26:03,917 --> 00:26:10,958 cheap. 40, 50 bucks I think. Standard reader from HID. It also has the ability to write. 281 00:26:10,958 --> 00:26:15,125 But, it requires a custom driver. You are paying China for the custom driver. And you're 282 00:26:15,125 --> 00:26:20,000 also paying China to use the stolen key that's been out there since 2010. >> If you wanted to 283 00:26:20,000 --> 00:26:26,458 do this yourself, you could get the reader and VC contact list demo, HID has pretty much yanked 284 00:26:26,458 --> 00:26:32,458 it off the Internet, so if you need a copy, just ask for it. Somebody I know. So if you 285 00:26:40,292 --> 00:26:43,500 already have the key, you put it in that software and it's doing the same thing we're doing here. 286 00:26:43,500 --> 00:26:45,583 >> so. Pretty straightforward interface other than it's in Chinese that I can't understand 287 00:26:45,583 --> 00:26:50,500 sometimes. We have a valid badge, it's an I- class badge. It just got stolen. The badge 288 00:26:50,500 --> 00:26:56,500 opens a mag lock. Good to go. So if you can acquire one of these cards through various 289 00:26:58,667 --> 00:27:04,500 techniques, either steal it, read it, show up through some kind of social engineer attack 290 00:27:04,500 --> 00:27:09,042 and get a visitor badge, all you need is what kind of card type they have and the facility code 291 00:27:09,042 --> 00:27:12,708 and a valid access number. From then you can do whatever you want and we'll show you to 292 00:27:12,708 --> 00:27:17,333 modify the characteristics of the card. We have acquired a card somehow, whatever the 293 00:27:17,333 --> 00:27:22,625 particular attack vector may be. We have a card. At that point Chinese software works pretty 294 00:27:22,625 --> 00:27:27,542 straightforward. We read - - I can't see the screen. Fucking demos. >> [Laughter]. >> So we 295 00:27:27,542 --> 00:27:33,542 get a full read on the card. >> Yeah. >> You want to go and clone the card at that point. It 296 00:27:44,000 --> 00:27:50,000 works pretty simple. Take a card that doesn't work. Doesn't work. >> Wa, wa, wa. >> Stuck it on 297 00:27:53,333 --> 00:27:59,000 there. And we're essentially going to take. I need my glasses. Oh, my gosh, don't do 298 00:27:59,000 --> 00:28:05,000 that. >> I like how that worked out. >> [Laughter] >> Yeah. We've got a fix for that. >> 299 00:28:11,625 --> 00:28:16,583 [Laughter]. >> You know what the fix is? It's the little nipple on the damn thing. It's 300 00:28:16,583 --> 00:28:22,583 that little nipple right there. >> Yeah. Any problems, you can probably e- mail them real fast. 301 00:28:22,583 --> 00:28:28,583 >> Yeah. >> So get a read on the card. >> Eric, Eric. >> And all we're associated with - 302 00:28:34,833 --> 00:28:39,750 - do you want to explain the blocks? 5678? >> Yeah, we're not really interested in all the 303 00:28:39,750 --> 00:28:44,167 blocks on the card, we were just really interested in the blocks, like 2 through 9 that contain 304 00:28:44,167 --> 00:28:50,625 the facility code, the user ID, your thumb print and the keypad number that you're putting in 305 00:28:50,625 --> 00:28:56,833 there. That's the ones that we like. So we're essentially just reading and taking those and 306 00:28:56,833 --> 00:29:02,833 making a pure copy of this one. Probably add another demo. >> [Laughter]. >> Wow! Awesome! 307 00:29:14,125 --> 00:29:20,125 >> How are you guys doing? >> [Laughter]. >> Where did you go last night? >> How are you 308 00:29:22,833 --> 00:29:27,750 doing? I like that bee thing you have going. >> The fucking mouse is going crazy. what the 309 00:29:27,750 --> 00:29:34,500 fuck! This is stupid. >> [Laughter]. >> Whatever, trash it. >> Whatever. >> Whatever. 310 00:29:34,500 --> 00:29:40,417 Fuck that demo. We're going to show you the one that's much better. >> [Laughter]. >> 311 00:29:40,417 --> 00:29:45,625 Yeah, fuck that demo. >> So you can clone the card, which is good, right? >> That's what 312 00:29:45,625 --> 00:29:51,625 they said. >> Supposedly this worked in the lab. >> Got it. >> You can take Eric's card and 313 00:29:51,625 --> 00:29:57,708 clone it, but what if you need the modified card, Eric? What would you do then? >> I have 314 00:29:57,708 --> 00:30:03,708 the right answer. China works great, whatever. Laptop sucks. Time for the black box. Hell 315 00:30:05,833 --> 00:30:13,250 with that laptop. So what we decided to do was go one step further and we did all this 316 00:30:13,250 --> 00:30:16,833 bullshit that took a lot more time. >> Yeah, you can see half that shit don't work. >> The 317 00:30:16,833 --> 00:30:21,833 fact that I run that Chinese software on an XP software and it never gets connected to the 318 00:30:21,833 --> 00:30:25,417 internet. That laptop is busted and as you can see the mouse is busted, too apparently. >> It's 319 00:30:25,417 --> 00:30:31,625 busted now. >> Definitely busted now. >> So what we decided to do was go one step 320 00:30:31,625 --> 00:30:38,958 further and we get into several situations with I-class, we can either read long- range, we can 321 00:30:38,958 --> 00:30:44,792 also obtain certain pieces information from a direct attack against a badge system, we can 322 00:30:44,792 --> 00:30:48,500 also take a picture, we can use the reseller to look up the information for us, whatever it 323 00:30:48,500 --> 00:30:55,208 takes to get certain pieces of data that we need to make a card. >> If you happen to just 324 00:30:55,208 --> 00:30:59,375 - - so corporate 1,000, let me explain one thing about that, while he's setting up, so 325 00:30:59,375 --> 00:31:03,417 corporate 1,000 what that is HID's way of having the facility code be unique. It's a 35 bit 326 00:31:03,417 --> 00:31:09,417 card, I- class, the facility code is unique for those 1,000 companies that sign up for this. 327 00:31:12,083 --> 00:31:19,958 So their ideas was the biggest 1,000 companies will be assigned a unique facility code and we'll 328 00:31:19,958 --> 00:31:26,375 track those in the database. So what happens if you get a hold of that database? >> Sell it. 329 00:31:26,375 --> 00:31:33,042 >> Exactly. >> So you have all the 1,000, you know, biggest organizations, private and 330 00:31:33,042 --> 00:31:38,500 Government, you would have their facility code. So out of that, you would have two out of the 331 00:31:38,500 --> 00:31:43,833 three things we need, the 35 bit card type and the facility code. And then all you would need is 332 00:31:43,833 --> 00:31:50,167 user ID. >> So we said the hell with the Chinese device and we put together another device that 333 00:31:50,167 --> 00:31:54,625 is essentially a reader with custom software and custom driver. The honey badger. We 334 00:31:54,625 --> 00:32:01,125 call it the honey badger because it takes what it wants. >> A valid card opens the door. This 335 00:32:01,125 --> 00:32:06,167 bitch will work. >> This demo will work, guaranteed. >> Guaranteed. I'm putting that out 336 00:32:06,167 --> 00:32:12,167 there, guaranteed. So we take the card - - >> Guarantees it works. You gotta connect to it. 337 00:32:19,208 --> 00:32:23,375 Damn it. >> Bam, I've got green! >> Yeah, I should have bet on that. >> It gets a read 338 00:32:23,375 --> 00:32:28,250 on the card. We now have all the properties on that card, the facility code is 898 and the 339 00:32:28,250 --> 00:32:34,875 card number is 8435. We've read every memory block off that card. As Josh was saying before, 340 00:32:34,875 --> 00:32:39,667 only certain blocks on that card are really important to us. Block 7 being a primary block we 341 00:32:39,667 --> 00:32:46,042 really care about, and block 7 contains access card number - - or facility code and access card 342 00:32:46,042 --> 00:32:48,917 number. So when we get to the next step of modifying those things, we'll see how that 343 00:32:48,917 --> 00:32:53,583 works. Right now we're going to do a raw dump of the card and a raw clone. So we've already read 344 00:32:53,583 --> 00:32:58,292 the card. We then take one that does not work, that was supposed to work for China. >> Does not 345 00:32:58,292 --> 00:33:03,208 work, China sucks. >> Take that, stick that on there. There's the one that works 346 00:33:03,208 --> 00:33:09,208 still. We get the CSM number off that card which is just a unique serial number for that 347 00:33:11,875 --> 00:33:18,750 particular card. Put it in write mode and write each block which is better than copy and paste 348 00:33:18,750 --> 00:33:23,125 with the China card. >> Yeah, who needs quantum physics when you can push buttons? >> 349 00:33:26,250 --> 00:33:32,250 [Laughter]. >> The new card clones. >> Bam! >> [Applause]. >> Yeah, shit worked! >> So 350 00:33:48,542 --> 00:33:51,625 we've essentially just done a pure clone. Well, maybe that card only gets me into the 351 00:33:51,625 --> 00:33:55,833 building, doesn't give me data center access, but through other means of acquiring information 352 00:33:55,833 --> 00:33:59,542 about a particular person, whether you directly attack them and do some kind of sphere phish 353 00:33:59,542 --> 00:34:05,625 or you pop the badge system, or you potentially pull a badge report that had John Doe has 354 00:34:05,625 --> 00:34:09,833 access to the data center or access to human resources or whatever business or facility 355 00:34:09,833 --> 00:34:15,500 you are going after. Once you know your target and know that particular data, maybe you only 356 00:34:15,500 --> 00:34:21,250 need to modify just the card number. So what we're going to do here is take the same 357 00:34:21,250 --> 00:34:27,167 facility code but through some kind of facility code, fucking projector, but through some kind 358 00:34:27,167 --> 00:34:33,167 of intelligence gathering we know the particular user also has 89835, which we just clones. 359 00:34:38,042 --> 00:34:44,042 It also has one more. 8981337. So that's the one we want to modify. So we change our card 360 00:34:54,125 --> 00:35:02,000 number to 1337. >> And it stays the same? >> No you can change it. Just to be a badass. >> So 361 00:35:02,000 --> 00:35:08,500 898 we already acquired from the clone, a read, a picture, a look up through a reseller, whatever 362 00:35:08,500 --> 00:35:12,917 it might be, with know the facility code. Now we know we need to make a badge to match a 363 00:35:12,917 --> 00:35:17,500 certain number, access card number. We know 1337 is supposed to get us into the system. We 364 00:35:17,500 --> 00:35:23,417 modify that particular block. Using the stolen encryption keys, we calculate Wigan, we 365 00:35:23,417 --> 00:35:29,417 also update block 7 and then we take a new blank card, this fucking thing, take our new card 366 00:35:38,583 --> 00:35:42,583 offline, back into the mysterious white van in the parking lot. >> Free candy. >> 367 00:35:42,583 --> 00:35:48,542 [Laughter]. >> Free candy is always good. We're writing the same blocks in the previous card 368 00:35:48,542 --> 00:35:53,792 we already read. And then we write block 7. We'll talk about 8 and 9 in a few minutes. So we 369 00:35:53,792 --> 00:35:58,333 have written a new block 7 with a different access card number, modified that with the 370 00:35:58,333 --> 00:36:02,125 calculations you can get from the Heart of Darkness paper. It talks about how Wigan works and 371 00:36:02,125 --> 00:36:06,333 the encryption key works. Once we've updated block 7, which it's supposed to match what the 372 00:36:06,333 --> 00:36:12,333 new card number is, now that guy gets in and has a different badge number. That worked. >> 373 00:36:15,500 --> 00:36:21,500 Yeah! >> [Applause]. >> Eric, Eric, Eric! >> So privileged escalation. Various ways to get 374 00:36:24,500 --> 00:36:29,792 into the facility, acquire the information, make the card offline, walk back in. You can 375 00:36:29,792 --> 00:36:32,583 also use it when you are on- site, potentially you have gotten into the building but now 376 00:36:32,583 --> 00:36:37,250 you can't get past bio, two- pin, 2 factor integrational pin, whatever it might be, we'll talk 377 00:36:37,250 --> 00:36:43,250 about some of that too. But you have obtained enough information to make a modified card. Do that 378 00:36:43,250 --> 00:36:46,000 offline and you have something that has been buffed, has additional rights, whatever that 379 00:36:46,000 --> 00:36:51,250 might be. One thing we're working on right now to note is the ability to - - the problem 380 00:36:51,250 --> 00:36:57,875 with I- class versus low- frequency prox 2, when McAfee or Foundstone came out with 381 00:36:57,875 --> 00:37:02,500 Proxbrute, it was easy to do, because it's all unencrypted. You don't have to calculate that 382 00:37:02,500 --> 00:37:08,000 block 7 each time for each authentication attempt. The problem with doing I-class 383 00:37:08,000 --> 00:37:11,833 brooding, is you have to calculate that block ahead of time and then have that in some 384 00:37:11,833 --> 00:37:16,625 kind of list that is going to present that card type each time you try to brute through the 385 00:37:16,625 --> 00:37:21,708 reader. A lot of calculations are done offline, have that data ready to go, then present that 386 00:37:21,708 --> 00:37:25,042 through a device and you can walk up to a reader and do the same thing the Proxbrute does 387 00:37:25,042 --> 00:37:29,458 but now you're doing encrypted authentication. We're working on that now, it's something that 388 00:37:29,458 --> 00:37:34,208 looks like it's going to happen, but we're still working out the kinks. We just did privilege 389 00:37:34,208 --> 00:37:37,167 escalation, got out of order a little bit - - do you want to talk about vulnerability? >> 390 00:37:37,167 --> 00:37:44,000 Yep. As we mentioned earlier from the controller to the reader, that is all unencrypted, 391 00:37:44,000 --> 00:37:50,000 clear text. So all you have to do is tie into that and you are able to identify whatever comes 392 00:37:52,167 --> 00:37:57,458 over the line, so the facility code and the user ID. So any way you can get into the facility 393 00:37:57,458 --> 00:38:01,917 and find those lines, which typically go back to small closet somewhere that nobody 394 00:38:01,917 --> 00:38:07,250 every goes into, if you can get into there and tap - - you just need two wires, yellow and green 395 00:38:07,250 --> 00:38:13,000 wires, those are the two wires you need. You tap those two and you can pull back and exfiltrate 396 00:38:13,000 --> 00:38:16,417 the user ID and the facility code. >> And essentially all you are doing is getting between 397 00:38:16,417 --> 00:38:20,375 the reader and the controller. And typically, like Josh said, they are buried in the wall. 398 00:38:20,375 --> 00:38:25,500 they're buried in a closet, wherever that controller might be. If you have the luxury of 399 00:38:25,500 --> 00:38:30,458 getting access to that back end when the authentication stops, at that point it's all clear 400 00:38:30,458 --> 00:38:34,083 text Wigan and you can allocate a clip into the wires, pull the data. >> If there's not a 401 00:38:34,083 --> 00:38:40,292 camera, you can take the reader right off and do it right there. >> Never done that before. >> 402 00:38:40,292 --> 00:38:46,750 Not happening. >> So we talked a little bit about some of these already. We have plenty of time, 403 00:38:46,750 --> 00:38:52,750 so we're good. The goal here is to stress how blended attacks work and the value you get out 404 00:38:55,333 --> 00:39:00,125 of those types of things showing those to your clients or the company you work for. We showed 405 00:39:00,125 --> 00:39:06,000 how leakage on eBay and leakage through resellers and possible. compromise of that database can 406 00:39:06,000 --> 00:39:11,792 lead to data access and data leakage. Using that data you can then modify certain aspects of 407 00:39:11,792 --> 00:39:17,542 card types. Also, like Josh said before, if they are rolling from an older infrastructure to a 408 00:39:17,542 --> 00:39:22,042 newer infrastructure, you can take those things, and modify certain properties of the cards 409 00:39:22,042 --> 00:39:25,167 to match what they are rolling to that might be at a new facility you are trying to go 410 00:39:25,167 --> 00:39:30,167 after. So using things that you may acquire through electronic access could turn into physical 411 00:39:30,167 --> 00:39:33,458 access. So keep those things in mind when are you looking at badge systems, it doesn't stop 412 00:39:33,458 --> 00:39:40,000 at just a clone. Clones and reads and brooding and modification and privilege 413 00:39:40,000 --> 00:39:44,750 escalation has come from other aspects which may be physical or social or electronic and how 414 00:39:44,750 --> 00:39:48,708 they blend together and that's how they come to materialize. >> One real quick story, one 415 00:39:48,708 --> 00:39:54,708 time old bad ass here, he ended up, we were doing a red team test for a really good client. 416 00:39:57,792 --> 00:40:03,250 We ended up popping them remotely, getting in, getting DA in like 7 minutes. So then Eric 417 00:40:03,250 --> 00:40:09,417 gets on the bad system and we pull out their facility codes, their card types, and their user 418 00:40:09,417 --> 00:40:15,500 ranges before ever going on- site. So we took that back to our lab. We wrote everybody a 419 00:40:15,500 --> 00:40:20,750 card, not only wrote a card, we took their badge template picture and took our faces and 420 00:40:20,750 --> 00:40:26,875 put on it so we had their real badge layout. >> We modified the picture on the badge system 421 00:40:26,875 --> 00:40:32,875 you'd see, so when you are running a badge system and they have a picture that pops up, a 422 00:40:37,958 --> 00:40:40,208 lot of you probably work for companies that have that picture that pops up at the front desk 423 00:40:40,208 --> 00:40:42,333 whenever you are walking in, if you compromise a badge system and modify that pop up the 424 00:40:42,333 --> 00:40:44,708 picture, when you walk in with a badge you made, your picture matches and no one is going to 425 00:40:44,708 --> 00:40:47,583 stop you. >> So all five of us show up with pre-made badges in a really tight facility and 426 00:40:47,583 --> 00:40:51,083 badged in and out all week, never got caught. >> Yeah, we were there for an internal pin 427 00:40:51,083 --> 00:40:54,625 and had our own badges for the whole week. >>It makes things a lot easier to show up with your 428 00:40:54,625 --> 00:41:00,167 own badge. >> So some of the things to focus on here that we want to stress here a bit is 429 00:41:00,167 --> 00:41:07,083 around activity monitoring for badge systems. This is something we have seen as a big gap in 430 00:41:07,083 --> 00:41:10,625 this space. Badge systems are limited in the amount of information they make readily 431 00:41:10,625 --> 00:41:15,667 available by default, like anything, but there are certain things you can look for if you 432 00:41:15,667 --> 00:41:20,333 are managing these types of system to identify an attack before it materializes. If you 433 00:41:20,333 --> 00:41:25,875 are doing things like Proxbrute and you roll up to a reader and you present 1,000 attempts. That 434 00:41:25,875 --> 00:41:30,542 should trigger something, right? There's really no IPS type of solution out for badge systems. 435 00:41:30,542 --> 00:41:36,375 So the vendors leave it up to operators of the applications, to make their own signatures, 436 00:41:36,375 --> 00:41:40,667 their own monitoring, their own alerting to say, why did this thing suddenly receive 500 437 00:41:40,667 --> 00:41:46,792 failed attempts and then the door opened? Or why did Josh badge in the U.S. and an hour 438 00:41:46,792 --> 00:41:51,125 later he badged in in China? There are certain things that should raise red flags in these 439 00:41:51,125 --> 00:41:55,292 badge systems and that's one of the limitations we're seeing right now, what we're testing, 440 00:41:55,292 --> 00:41:59,750 you know, all the commercial badges that we have seen that don't have that built in 441 00:41:59,750 --> 00:42:03,208 natively. Big gap there. Monitoring, like anything, is always important. >> When we 442 00:42:03,208 --> 00:42:08,833 showed up to that facility, all five of us used the same user. >> Yep. And the other thing 443 00:42:08,833 --> 00:42:14,625 we're pretty adamant about doing when we do acquire badges. Josh decided to break into a building 444 00:42:14,625 --> 00:42:20,583 one time on an engagement with me and came in the front door as the bug man. And once he 445 00:42:20,583 --> 00:42:26,208 acquired a visitor badge at the front desk, he left, came back to the truck, used the visitor 446 00:42:26,208 --> 00:42:30,167 badge to get a read, we knew the facility code at that point and we already knew the access card 447 00:42:30,167 --> 00:42:34,250 number we wanted to try, based on a previous attack we did or we pulled it, however we got it, 448 00:42:34,250 --> 00:42:40,667 and we made the card and went back in. So we had two ways to get in. We had one, we took a 449 00:42:40,667 --> 00:42:44,542 visitor badge that had basic access to the facility, we cloned that and made our own 450 00:42:44,542 --> 00:42:48,417 visitor badge, then we used the badge system to elevate rights for the badge. We went and added 451 00:42:48,417 --> 00:42:52,750 data center access, we added other facilities because we had the badge system. So there are 452 00:42:52,750 --> 00:42:56,667 things we'll talk about in a minute about protecting the badge system itself, but those 453 00:42:56,667 --> 00:43:00,583 types of things should identify a red flag, too. Someone that's had basic level access for, 454 00:43:00,583 --> 00:43:04,500 three months, all the sudden has data center access? Why isn't that tripping an alarm? Just 455 00:43:04,500 --> 00:43:07,250 like in many of your environments, you probably have an alarm if someone gets added 456 00:43:07,250 --> 00:43:12,625 to the new admin group? Or new users created and added to that group. Those things trigger, 457 00:43:12,625 --> 00:43:18,375 whatever technology you are using for monitoring, that type of activity monitoring should be 458 00:43:18,375 --> 00:43:24,375 included in badge systems, too. >> Yeah, so this is one thing that we're working on right now. 459 00:43:26,625 --> 00:43:30,708 And, again, this talk was supposed to be, you know, just around stuff that we know that 460 00:43:30,708 --> 00:43:35,542 works. Stuff that's real world, stuff that we've used, stuff that gets you into a building. 461 00:43:35,542 --> 00:43:42,292 So the next area that we're working on right now is the bios stuff. So the biometric, your 462 00:43:42,292 --> 00:43:48,750 finger print and the keypad. So the issue typically with this is, when you go to the set up 463 00:43:48,750 --> 00:43:52,250 your finger print, you have a reader just like this, you put your finger on it and you will 464 00:43:52,250 --> 00:43:57,833 enroll yourself. So that gets written to the card. >> And that block 8 and 9, that we 465 00:43:57,833 --> 00:44:03,500 showed earlier, that is all F's right now, 8 and 9 that would be where bios is stored, biometric 466 00:44:03,500 --> 00:44:08,583 pin, whatever the second factor is, those are stored in the blocks. >> Yeah, and we can't 467 00:44:08,583 --> 00:44:13,917 say every badge system is configured that way, but the majority of systems, it's going 468 00:44:13,917 --> 00:44:18,792 to authenticate - - it's going to verify your thumb print on that card, just a thumb print 469 00:44:18,792 --> 00:44:25,000 tiplet, or the key code that you put in on the card. Not going back across the wire, not 470 00:44:25,000 --> 00:44:31,042 looking at the database. Some of them will go look at the actual keys you put in, but the 471 00:44:31,042 --> 00:44:37,750 majority that we've looked at so far just verifies that the key and the thumb print matches the 472 00:44:37,750 --> 00:44:41,875 card that you just presented with. If it does, then it send Wigan back to the back unit. >> 473 00:44:41,875 --> 00:44:47,292 So. Stress that again, the pin and finger print is an electronic signature that's 474 00:44:47,292 --> 00:44:54,125 written to a block on the card. So if I clone Josh's badge and I then write my own pin or my own 475 00:44:54,125 --> 00:44:59,250 electronic signature of my finger print to my card, when I authenticate to the badge 476 00:44:59,250 --> 00:45:05,417 system, it's validating on client side. Not server side. So I'm telling the badge system who 477 00:45:05,417 --> 00:45:10,833 I am, even though I am lying. So there are issues we have seen on this factor right now. >> So 478 00:45:10,833 --> 00:45:17,000 this is - - we're going to wrap up here, but the other thing that we're working on is so we 479 00:45:17,000 --> 00:45:22,333 go and we clone a badge or we go and read a badge in the parking lot, right? How do we get that 480 00:45:22,333 --> 00:45:28,792 back to the van, back to the team? So what we are working on is taking Zigby and basically if 481 00:45:28,792 --> 00:45:34,125 it's in with the incomly we will take and as soon as it gets a read it will transmit back or 482 00:45:34,125 --> 00:45:39,208 transmit it to another team member and then write the card on the spot. So you know when 483 00:45:39,208 --> 00:45:44,125 you get a buzz in your pocket, you have already received a code, user ID, and you pull that 484 00:45:44,125 --> 00:45:50,750 out of your pocket and badge in. >> So if someone is in the field walking around with a 485 00:45:50,750 --> 00:45:56,208 mysterious clipboard, or a long range reader in a satchel, they can send that back over 3G, Wi- 486 00:45:56,208 --> 00:46:01,333 Fi, Zigby, whatever it might be. >> The other thing is back door reader, so if you have access to 487 00:46:01,333 --> 00:46:06,208 a reader, you can get in, super easy, all you need are those two wires, red and green Wigan 488 00:46:06,208 --> 00:46:10,208 wires, you can backdoor it and have it talk wirelessly, Zigby or whatever, back to the cloud. 489 00:46:10,208 --> 00:46:14,292 >> Mitigation we will go through quickly because there's not a lot. Obviously the little 490 00:46:14,292 --> 00:46:19,625 35 cents shield around your badge is important. Protecting physical access to the badge is 491 00:46:19,625 --> 00:46:22,917 important. Protecting visible access to the badge is also important because of the 492 00:46:22,917 --> 00:46:26,542 reseller issues we've seen. Being able to identify what kind of badge it is and the 493 00:46:26,542 --> 00:46:30,458 information on it just from an order number on the bottom that's printed. But the big one, 494 00:46:30,458 --> 00:46:35,333 we want to stress here, protect the badge system. This thing is the Holy grail of how the hell 495 00:46:35,333 --> 00:46:38,958 people come in and out of your building, and if this thing is not air gapped, if it's not 496 00:46:38,958 --> 00:46:44,125 two-factor authenticated, if it's not part of your domain, if too many people have access to 497 00:46:44,125 --> 00:46:49,792 it, if no one is monitoring it, if it's not segmented properly with VLANS and things like that, 498 00:46:49,792 --> 00:46:54,167 it's going to get attacked and if we're doing a job, we're going after the badge system. 499 00:46:54,167 --> 00:46:59,000 >> And with the badge system . . . Say we're internal, or external, don't matter, you get 500 00:46:59,000 --> 00:47:02,333 into the badge system, there are other things that you can do without having a card, you can 501 00:47:02,333 --> 00:47:09,625 pop doors, you can clean logs, you can set up a new user and elevate your own privileges that 502 00:47:09,625 --> 00:47:13,542 way. >> And the last one I wanted to stress here real quick and then we're done is the 503 00:47:13,542 --> 00:47:21,208 training the staff. The big issue we always see is the isolation between who manages 504 00:47:21,208 --> 00:47:25,583 the facility and who manages corporate security. Facilities are always a third party 505 00:47:25,583 --> 00:47:29,708 facility company in charge of watching the front desk and the visitor log. Things like that. 506 00:47:29,708 --> 00:47:34,583 They don't communicate well with who runs corporate security. And we make tend to make the joke, 507 00:47:34,583 --> 00:47:38,542 that we always play therapist, but having communication between these two groups is key because 508 00:47:38,542 --> 00:47:42,167 protecting this type of stuff is in their hands, not corporate security all the time, and 509 00:47:42,167 --> 00:47:47,083 there's a big gap between those two clients, or two groups. And last but not least, there's a 510 00:47:47,083 --> 00:47:53,792 URL on the bottom and we can pull the Adrena, for doing the long range reads. It's got our 511 00:47:53,792 --> 00:47:59,792 company name at the end. so gethub.com/larsconsulting. That's it. [Applause.]