start	end	text
0	5920	Okay, everyone, thank you for coming. Welcome. I'm calling
5920	9780	this talk Ghosting the Paxman, Basics of Physical Access
9780	15580	Control and Physical Access Control Systems and Beyond. This
15580	20920	is a very fast and abridged but hopefully fun comprehensive
20920	25340	crash course into physical access control systems. This is
25340	29120	not only going to talk about RFID. A lot of people like to
29120	34040	focus on RFID. And that's just the very tip of the access
34040	37480	control iceberg. And so we're going to be jumping around a
37480	39920	lot. We're going to be talking about a lot of different things.
39920	43220	I hope that it all makes sense. This is normally content that it
43220	45740	takes me two days, two eight-hour days to train folks
45740	49860	on. I just spent the last few hours collapsing it all into 80
49860	54260	minutes or less. So fingers crossed. If there's any
54260	58560	questions, there will be time at the end. If not, with me in front
58560	60720	of the microphone, certainly with me standing right over
60720	64380	there behind the table so there won't be a problem. So without
64380	68820	further ado, let's get started. Who am I? My name is Babak
68820	73340	Javadi. I'm a lock picker, hardware hacker and covert entry
73340	77220	instructor. I have been teaching methods of covert entry for over
77220	81720	ten years. I'm the co-founder of the Open Organization of Lock
81720	84860	Pickers, otherwise known as TOOL. Who knows about TOOL?
84860	88880	Yeah, that's right. It's pretty awesome, right? It's amazing to
88880	92600	me how much that organization has grown over the years and I
92600	96060	continue to be thoroughly impressed by all of the people
96060	100280	who continue to be so passionate about it. I served as the
100280	106100	director there for about 13 years and finally decided it's
106100	110260	time to let other people dump in their passion into the project
110260	113400	so I have some room for some other things. I'm also founder
113400	116840	and director of research for the Core Group. That is my
116840	119440	consultancy. We specialize in penetration testing, reverse
119440	122400	engineering and research just like about every other company
122400	126400	here. So, not very exciting. Also co-founder of the Red Team
126400	129880	Alliance. We specialize in physical security training and
129880	133160	certifications and that's all I'll say about that. So let's
133160	137500	jump right into it. Who has used an electronic door lock? Yes,
137500	140460	that's right. When most people think of electronic door locks,
140460	159400	this is what they think of. That's so easy. That's one of
159400	162000	the main reasons why we use access control, right? It's easy
162000	165360	for everyone. It's easy for the user. You get to pull out your
165360	168520	card. You just wave it. Some magic happens and the door is
168520	171180	open. It's great. From the administrative side, it's also
171180	174880	pretty easy, right? If someone says, oh, no, I lost my card. No
174880	178860	problem. Credential revoked. Someone decides they want to do
178860	181160	something against company policy. They get terminated.
181160	184800	Credential revoked. Very, very easy, right? You want to do time
184800	188140	of day access. You want to only let someone in during the hours
188140	190980	of 8 and 5. No problem. Just punch that into the access
190980	194980	control system. It's all taken care of. Very, very easy. But
194980	198340	ultimately, anything electronic, there's some feedback, isn't
198340	202360	there? Is that bothering anyone else? I want to make sure you
202360	209040	all are comfortable. Yeah? All right. I have to pick the right
209040	214640	distance somewhere between like here, deeper. I've got to eat
214640	221380	the ice cream. All right. We're going to do our best. So anytime
221380	224240	you have something electronic meeting physical, there has to
224240	227300	be an interconnect, right? Where the electronic world meets the
227300	230840	physical world has to have an interface of some kind. And when
230840	233860	it comes to modern access control, that comes in usually
233860	237300	one of three different ways. So first you have this. What is
237300	240100	this? What are we looking at in these photos? Can anyone tell me?
242260	245960	Electrified strike. That is correct. So this would take place
245960	249740	of the existing strike plate. And it's a little solenoid in
249740	253280	there. Whenever you apply a voltage to it, it allows the
253820	256560	little strike thing to swivel out of the way and you can just
256560	260060	pull the door open without even turning the handle. What's this?
260640	264860	Mag lock. Yes, magnetic lock. Two-piece construction. You have
264860	268060	an electromagnet and the giant boxy thing on the right. You
268060	271020	have a steel plate and the boxy thing on the left. And when you
271020	274240	apply power, they stick together really, really, really well.
274240	278440	That's also very, very popular. Third kind is an electrified
278440	283280	lock set. This is an example of an electrified lock set. So this
283280	288460	does not use an electrified strike or a magnetic lock plate,
288460	294520	but rather has a solenoid hidden inside of the lock. And I used
294520	297660	to have a photo of this, of a different lock. This was the
297660	300880	official manufacturer's photo. Does this photo bother anyone
300880	309260	else? No? What bothers you about this photo, sir? What's that?
309260	314920	Well, there's a lock. Okay. Red and black wires really in
314920	317580	general should never be designed to go right into each other.
317580	319880	That just seems like bad design. But that is the official
319880	322400	manufacturer's photo. But regardless of all of those
322400	326620	things and all of these cases, what's happening is you have a
326620	331040	source of power, whether that be a transformer, AC or otherwise,
331260	335980	and a backup battery perhaps, if the crap has really hit the HVAC
335980	341620	system, so to speak. And these are powering these secure entry
341620	344620	and exit devices, whether they be mag locks or electrified
344620	349300	strikes. The simplest form can be sometimes seen in your
349300	352540	friendly neighborhood cheap discount jewelry store. If you
352540	355300	have ever walked up to a store where the door is locked and you
355300	358760	have to like knock on the glass or press a doorbell and someone
358760	361220	like presses another button underneath the counter, that's
361220	364340	not access control that we're talking about today. What we're
364340	366840	talking about is something a little bit more common in
366840	370660	enterprise. So this is a better example of what we're talking
370660	374100	about in terms of physical access control systems today.
374100	376420	What we're looking at is a door controller. What is a door
376420	380060	controller, you may ask? A door controller is a fancy term for
380060	384220	embedded Linux device with some relays on it. That's about it.
384540	387600	So this door controller is actually what's in charge of all
387600	391480	the logic that takes place in an access control system. Every
391480	394220	time you use the door, every time you open a door, every time
394220	397900	you close a door, every time you present a card to the reader,
397900	401500	there is a signal or a series of signals of some kind that is
401500	404580	monitored by the door controller and that's making decisions. The
404580	407500	most common type of input into a door controller is what?
407700	412000	Credentials, of course. So I'm going to go ahead in parts of
412000	415520	this talk, I'm going to insult your intelligence a little bit,
415520	418240	not literally, but I like to use analogies. I like to use
418240	421640	analogies because it demystifies how opaque some of this
421640	425620	technology is. I want to really break it down into the simple,
425620	428760	simple building blocks. So if this seems overly simplistic, I
428760	431420	hope that you're not too bothered by it, but I do know
431420	434320	that for a lot of folks it helps kind of drive the point home. So
434800	438240	we are going to, and I'm going to have trouble with this word,
440240	444800	anthropomorphize. Someone help me out here. That, what these
444800	447140	groups of people here just said, we're going to do that to the
447140	452140	access control system. And here are our players. We have our RFID
452140	455160	credential in the lower left there. His name is Alberto. And
455160	458900	we have our RFID reader as a security guard. That executive
458900	461220	manager person over there, that's the door controller
461220	464120	panel. And of course our electrified strike is played by
464120	468640	the door hardware. Pretty straightforward. So, basic idea,
468640	472140	door, the card reader is always going to be interrogating the
472140	474980	credential, whatever that credential is. It's going to be
474980	478100	saying hi, who are you, over and over and over again. The
478100	482620	credential is going to identify itself. It's going to supply a
482620	486240	means of identification to the card reader. The card reader is
486240	489400	going to interpret that response, convert it, and
489400	492300	sanitize it into a format that the door controller can
492300	494620	understand and send that information to the door
494860	498240	controller. The door controller receives that response,
498240	500660	processes some logic. It says, hey, I know who that person is.
500660	503000	I know that card number. I'm going to go ahead and let that
503000	505880	person in and I'm going to fire the electrified strike and
505880	508640	that's going to let them in. Pretty straightforward, right?
508780	512180	That's the whole system in a nutshell. So, credentials are
512180	516280	one type of input that goes into an access control system. Of
516280	518280	course, credentials, we're going to talk about them a little bit
518280	520880	more in depth in a moment. They come in a couple different
520880	524700	formats. They can be something you have, something you know, or
524700	527520	in the case of biometric systems, something you are, such
527520	531940	as fingerprint, iris, facial, all that stuff. These are all
531940	535800	different forms of inputs that go into the door controller.
535920	538400	There is another really common type of input. We're going to
538400	541860	get that out of the way first. It's this. Who can tell me what
541860	546260	this is? This is a REX, otherwise known as a request to
546260	549940	exit sensor. This is the most common use of this type of
549940	554400	sensor. It is basically a fancy name for a motion sensor and
554400	557800	that also gets tied into the door controller. And there's a
557800	560400	couple of different ways that a REX can be set up. The most
560400	563380	common type of way, show of hands, who has ever walked
563380	565700	through a secure door and as you approach the door, the door
565700	570460	unlocks? Yep. So that's using a request to exit sensor. Here's
570460	573780	the basic concept behind it. Here's a request to exit sensor
573780	577360	right over here. So our credential comes, or user rather,
577360	580520	comes along. The sensor says, hey, I see some motion. Someone
580520	584100	is probably trying to leave. Let the door controller know. Door
584100	586700	controller says, hey, there's motion on the secured side of
586700	588980	the door. We're going to go ahead and let them out. Fire the
588980	592460	electric strike. They can exit. Easy peasy. Now here's the
592460	596340	thing. This guy doesn't have a great vision plan. He can't see
596340	600020	very well. So as a result, you can kind of trick him sometimes.
600240	603520	And a lot of folks have probably seen this, but I want to show it
603520	606480	to those who haven't just again to drive the point home. Here's
606600	609000	a couple of examples of how you can do that and how you can mess
609000	618980	with that. So what did we just see happen? We were standing on
618980	622760	the secured side of the door and our friendly neighborhood doctor
622760	627300	Tran himself used not a credential. What did he use
627300	631580	instead to enter? Can of air. That's right. So he's turning
631580	634500	that upside down, spraying it through the gap in the door and
634500	638220	magically the door opens. Here's another example. Research lab in
638220	642980	Philly. I'm showing my colleague how this works and trying to
642980	646040	teach him building owners to standing behind us. And
646040	649920	initially he's using it wrong. And so I have to correct him a
649920	652440	little bit. And notice we're not interacting with the card reader
652440	655320	on the right at all. We're just interacting with the gap in
655320	658660	between to get into that particular lab and he's going to
658660	663620	go ahead and spray that, turn that upside down and doors open.
663800	668160	Well, why does that work? That's really dumb. Like this shouldn't
668160	674460	be a thing, right? And it works all the time. You can do this in
674560	676680	a couple of different ways and we're not going to go in depth
676680	679880	into all of them. But basically the most common type of the
679880	683820	sensor is called a PIR sensor. Anyone know what PIR stands for?
684600	687980	Yes, that's right. Passive infrared. Infrared is really good
687980	694020	at detecting a change in what? Heat. Right. So heat is a 2D
694020	697000	heat map, right? So they're very good at detecting change in
697000	699980	heat. Now the problem with that is if you folks in the audience
699980	703700	saw the sensor and I take one step back or one step forward,
703700	706580	has the 2D heat map that you can see change in an appreciable
706580	711380	way? No, not really. I got to do this, right? So as a result, in
711380	714180	order to prevent users from running smack into the door,
714180	716380	they have to turn the sensitivity up really, really
716380	719580	high so people can get in really, really easily, right?
719600	722600	Because you don't want angry users. So as a result, they're
722600	725620	very, very easy to manipulate. There's another type of sensor
725620	728580	we're not going to get into really much. It's called RCR or
728580	731700	range controlled radar, also known as microwave. That detects
731700	734560	change in distance. It's very good in this forward and
734560	738340	backward direction. Not quite as good as the side to side. And
738340	742220	so these RCR sensors are usually dual technology sensors that
742220	745780	incorporate both infrared and microwave and you have to
745780	749160	activate both in order for it to fire usually. You'll see these
749160	753260	all over the place. They'll be mounted above door frames, on
753260	755740	the side of door frames. Sometimes you'll see them like
755740	758300	in really, really high up places. Like take a look at
758300	762000	where the sensor is here. It's all the way up top in this
762000	766360	corner. And because you have this huge, wide hallway, we
766360	768500	don't actually have to be very close to it in order to trigger
768500	775120	it. Now, you don't have to use CanDare. Here's our colleague
775120	779580	Dave Kennedy. And what he's going to do is he's just going
779580	783340	to use his fancy physical security compromise tool in his
783340	787340	hand. What is that? Yeah, it's a vape. Pretty straightforward.
787460	791040	And it's our favorite door. And he's just going to blow right
791040	793260	through. It's not going to work the first time. So he's going
793260	797680	to give it another shot. And on the second draw, that vapor is
797680	800380	just hot enough and warm enough to go ahead and activate that
800380	803640	door. And we're in. Of course, if you don't vape, maybe you
803640	809660	like whiskey, right? Here's my business partner, Deviant, out
809660	813720	on a night on a town. And he's looking at this ATM lobby. And
813720	816120	he's like, hmm, I don't feel like using my card. I'm just
816120	820040	going to go ahead and do that. And the door will pop open. And
820040	823440	again, you can use a lot of different varieties of
823440	827780	substances to do this. But this is just one type of input in a
827780	831020	access control system. So there's a couple of things that
831020	833600	we need to consider when looking at an access control system. We
833600	836220	have our credentials. And they can come in a variety of
836220	839840	different formats. We're going to talk about that. We have our
839840	842240	readers. They can also come in a variety of different
842700	846300	architectures and formats. We'll talk about that as well. We have
846300	848720	our door hardware, whether they be mag lock or electrified
848720	853500	strike. We have our motion sensors and door contacts. We
853500	856460	will talk about door contacts in a bit. We have our door
856460	858980	controller, which all this is connected to that makes the
858980	862740	logical decision. And of course we have our administrative
862740	866260	software that door controller has to know which users are
866260	870220	allowed to get in and which users are not. All of this is
870220	875400	one happy family, right? Hmm, kind of. So each one of these
875400	878560	links speaks a different language. And that creates some
878560	882180	really fun security situations as we will find out. So when
882180	885940	most people talk about RFID, what they're actually talking
885940	889940	about is only that first link, right? When most people think
889940	892800	of RFID, they're actually thinking of the whole system,
892800	896740	right? They're like, oh, that whole thing is RFID. No. False.
896940	901360	Only that very first link is RFID. Like I said, RFID is the
901360	904760	very tip of the access control iceberg. So whether you have
904760	908900	Prox, MyFair, iClass, MagStripe, who's a what's it, biometric,
908900	912120	doesn't matter. It's still all only talking about that first
912120	915000	link. So let's talk about that first link. Let's learn a little
915000	920000	bit of the history of access control. Who's heard of WeGand?
920620	925280	Yeah. Who knew WeGand was a person? A couple people.
925280	929920	Impressive. So let's learn about John Richard WeGand, a very
929920	936460	badass OG German hacker born in 1912. Immigrated to the U.S. to
936460	940560	study choral conducting at Juilliard, right? Huge music nerd.
941080	943080	And while he was there, you know, in order to reproduce
943080	947000	music, you have to use what? Speakers, right? So he became
947000	949840	really interested in audio amplifiers and through that
950360	952420	electromagnetics. And he went through a couple of different
952420	955820	really interesting jobs. He, for a while, made tape recorders
955820	958900	for the U.S. government and stuff like that. And eventually
959620	962440	he became so interested in electromagnetics that he made
962440	964960	some really interesting discoveries. He came up with
964960	970180	something called WeGand wire. Originally patented 1974. Very
970180	972640	old technology. You can look up the patents yourself. It's
972640	976700	really, really cool stuff. To put it bluntly, it is a little
976700	980360	piece of wire with a soft inner core and a hard outer shell. Now
980360	984320	that may not make any sense. You might be thinking, Bobik, metal
984320	986500	is hard. What are you talking about? Soft metal. That doesn't
986500	989000	make any sense. Well, what we're talking about is
989000	991700	relatively speaking, right? So if you ever take a paper clip
991700	994860	and you bend it back and forth, what happens to the material
994860	998960	right before it breaks? Yeah, work hardening. It gets brittle,
998960	1003260	right? Its characteristics, its physical characteristics change.
1003260	1006140	And you can twist wire and you can do interesting things to it
1006140	1010020	such that the outer shell, the outer layers of the wire become
1010020	1013100	more hard and more brittle than the inner layers. And when you
1013100	1015700	do that to certain iron alloys, really interesting things
1015700	1018200	happen. We don't have to get into the science really, really
1018200	1022200	deeply. However, weekend wire is literally pieces of wire
1022200	1028340	embedded in a plastic card, drum or encoder of some kind that
1028340	1032600	passes by two permanent magnets with a sense coil in between.
1032600	1036060	And as it passes in between, some really cool stuff happens
1036060	1040300	inside the wire. Basically the outer core of the outer surface
1040300	1043960	of the wire magnetizes first, then the inner core magnetizes
1043960	1049280	and as you pass the wire past the second magnet, the inner
1049280	1054120	polarity, the magnetic polarity of the inner core flips and that
1054120	1057520	flip is actually detected as an electromagnetic pulse by the
1057520	1061500	sense coil. And that's actually how original systems worked.
1061500	1066680	This is an example of an original weekend card, okay? So
1066680	1069620	the original access control cards, when access control,
1069620	1073360	modern access control was first invented, were not proximity.
1073360	1076260	They were swipe cards, not mag stripe. We'll talk about that in
1076360	1080140	a moment. And they literally had two rows of wires. The wires
1080140	1084080	physically represented the zero bits and the one bits. So as you
1084080	1087840	slid this card through the reader, they would pass over two
1087840	1090420	different read heads and those wires would physically produce
1090420	1095040	little blips on the line, right? So here we have 26 wires in the
1095040	1098320	card and as you slide that through the reader, there's a
1098320	1101100	data zero and data one line. It's a five volt signaling
1101100	1105740	protocol and every time a little wire passes by the sensor, one
1105740	1108600	of those signal lines is shorted to ground for a very short
1108600	1111100	amount of time and a signal is sent down the wire representing
1111100	1116740	zero or one. This became very, very, very popular. So it was
1116740	1121100	invented in 74. By the 80s, it was considered leading edge,
1121100	1125260	best of the best. And by the mid 90s, this thing was
1125260	1128280	everywhere. It was widespread. Everyone was using it. I mean
1128280	1132840	everyone. To such an extent that by 1996, SIA, the security
1132840	1136400	industry association adopted it as the official standard
1136400	1140300	communication protocol for card readers and door controllers.
1140620	1143520	And everyone began to use it to make things backwards
1143520	1146000	compatible. So I want to show you an example of what weekend
1146000	1148820	wire looks like because it's not something you get to see very,
1148820	1155280	very often. And we're going to place this here. And let's see
1155280	1161800	if we can get our camera working. We'll do... there we
1161800	1168660	are. We'll do this. And we'll flip over to duplicate mode.
1170720	1177460	All right. So what we have here is just a neat little demo tool
1177460	1190650	that we've created. All right. This is an original weekend
1191270	1197830	swipe card reader. And we have a weekend card. Now, for those of
1197830	1200790	you that can't see, you'll notice that as I tilt it, you
1200790	1204890	can actually see physically something embedded in the card.
1205190	1207330	And what I'm going to do is I'm actually going to shine a
1207330	1209710	flashlight through the bottom. You'll actually be able to see
1209710	1231140	the physical zero bits and one bits. So you can actually see as
1231140	1234200	we move the flashlight, there's literally wires embedded in the
1234200	1237260	card. And that's actually what's going to be detected by the
1237260	1240340	reader as I swipe this through. So we're going to go ahead and
1240340	1248080	try that. And that's it. And so this screen here is a little
1248080	1250900	decoder. It's going to take that, those little blips of
1250900	1253480	weekend data and it's going to try to decode it in a number of
1253480	1256440	different human readable formats. Now, here's what's
1256440	1258400	interesting. We're going to talk about this a little bit later in
1258400	1263800	the presentation. Notice how there's 36 bits, but there's a
1263800	1266260	number of different ways to decode them. There are different
1266260	1269420	facility codes and card numbers. And these are all just different
1269420	1273240	ways of decoding the same physical data. So we're in a
1273240	1277080	little bit going to talk about bit formats and how it's kind of
1277080	1279780	a nightmare when it comes to access control. And that's a
1279780	1283600	very important thing to understand about weekend cards.
1283600	1288240	So we'll go ahead and minimize that. And let's talk about
1288240	1290340	another old technology because context is really, really
1290340	1292340	important. You might be thinking, man, we're in wireless
1292340	1294540	village. Why are we talking about weekend? Because you got
1294540	1296260	to know where you came from before you know where you're
1296260	1300900	going, right? So let's take a look at a magnetic stripe card.
1302040	1305960	One of these guys here, right? So we'll again switch back to
1305960	1309620	our camera. Here's our mag stripe card. We'll go ahead and
1309620	1313400	pop that into focus. Increase our exposure so we can actually
1313400	1319800	see what we're doing. All right. So mag stripe, I like to think
1319800	1322800	of it as fancy bar code. Not literally. It's not quite the
1322800	1326420	same encoding, but it is close. What I'm going to use is pretty
1326420	1329220	cool stuff. It's really, really basic, actually. This is
1329220	1332620	magnetic developer, which is just a fancy way of saying
1332620	1335380	really fast evaporating solvent with really, really tiny
1335380	1338560	particles of iron in it. And I'm going to drip this on the card
1338560	1342000	and you're going to again see the physical representation of
1342000	1379760	that credential data encoded on the card. That is not my
1379760	1384020	favorite example, but you can actually see on the left-hand
1384020	1387680	side especially, you can see where that strip has been
1387680	1391940	magnetized and where those iron particles are sticking. Again,
1391940	1395020	these are all just different ways of physically encoding
1395620	1399140	logical data, right? So if you have a card number, say 1, 2,
1399140	1402760	3, 4, 5, 6, there are different ways you can encode it, right?
1402760	1406420	We can use weekend wire. We can use mag stripe. We can use a bar
1406420	1409880	code. We can use a QR code. We can use a key pad. These are all
1409880	1414120	just different ways of physically ‑‑ man, sorry,
1414120	1417560	guys. These are all different ways of physically encoding the
1417560	1421600	same data. And this is what we need to keep in mind when we
1421600	1427000	talk about RFID and access control is ‑‑ let's go back
1427000	1435920	here. There we go. These are all just different ways of saving
1435920	1439320	different types of data on a physical card. How many
1439320	1442860	different ways are there to save data? A lot. This is a
1442860	1445060	really, really awesome website that one of the Proxmark
1445060	1451080	developers created, cardinfo.barkweb.com.au. And just
1451080	1454600	to show you what it looks like briefly, I wonder if I can zoom
1454600	1462600	in. Let's see. There we go. So this is just 70, and this is
1462600	1467280	not all inclusive. This is just 70 different card formats.
1467280	1470540	These are weekend bit formats. And if you look, there's a lot
1470540	1473840	of these that are the same number of bits long, and they
1473840	1478960	all represent different ways of encoding the same data, right?
1478960	1482300	So, for example, I just clicked on a random one. This is ATS
1482300	1486260	weekend 32‑bit. This is 32 bits of data. And they're saying
1486260	1491540	when used with an ATS system, we're going to use the first 12
1491540	1496340	bits as the site code or facility code, and then we have
1496480	1500260	a card number, and then we have some parity bits as well. And,
1500260	1504280	again, we are not going to be dealing with that a whole lot,
1504280	1506860	but what's important to understand is these are the
1506860	1510240	physical bits that are encoded on the card, and the card number
1510240	1514880	is just how that particular vendor decides to decode that
1514880	1518120	weekend information and is something human readable, right?
1518120	1521580	Because a sysadmin or physical security person, they're not
1521580	1526380	going to be sitting there typing in 47, 50, however many ones and
1526380	1529660	zeros for each user to encode their credential, right? They
1529660	1536640	want to just encode card number 4256 or card 555137, and they
1536640	1539640	want to be done with it. So these are just different ways of
1539640	1543140	representing that raw data as something that we can more
1543140	1546700	easily and colloquially understand as we use our access
1546700	1551020	control system. So let's take a look at a modern credential,
1551020	1553700	right? So things ‑‑ that system became really, really
1553700	1556760	popular, and they said, hey, this weekend stuff is awesome,
1556760	1559400	but we have something new for you, right? So we've got this
1559400	1562480	new awesome card reader, it's a prox reader, it's a whatever
1562480	1567140	reader, and the best part about all this is, is you don't have
1567140	1571260	to rip and replace your existing system. You can take it, and
1571260	1573820	it's backwards compatible. You can keep your same door
1573820	1577120	controller, and all you have to do is replace your card readers
1577500	1581180	and your cards, and it just works. Isn't that wonderful?
1581740	1585200	Yeah. It is and it isn't, right? Saves you a lot of money, but
1585200	1588340	it means that even today in 2019, we're still using a
1588340	1592380	communication standard developed in 1974 for transporting
1592380	1596320	credential data. How awesome does that sound? Yeah. Really
1596320	1601120	great. So let's see how things changed over time. So again,
1601120	1603320	we're still just dealing with card numbers. We're still just
1603320	1607140	dealing with different ways of physically encoding that
1607140	1611120	credential data. Let's look inside of an RFID tag, right?
1611120	1616040	What's inside of an RFID card? It's literally a chip and an
1616040	1625370	antenna, and we are going to zoom in and focus here. All
1625370	1628590	right. So here we are. These are two different credentials
1628590	1633310	actually physically placed into the same piece of plastic. So
1633310	1637290	we have a low frequency traditional prox credential.
1637290	1641830	That is actually the thicker antenna in the middle. And then
1641830	1646370	we have a high frequency, high freak, 13.56 megahertz
1646370	1649230	credential. It happens to be I class. That's actually the
1649230	1652730	thinner antenna around the outside. Generally speaking,
1652730	1656950	you're going to find that low frequency readers and cards are
1656950	1661430	going to use more turns, more loops of wire, and the higher
1661430	1665850	frequency uses a shorter piece of wire. So fewer turns of wire.
1665850	1668890	So one of the easiest ways to tell if something is low
1668890	1672230	frequency or high frequency is literally just to shine a
1672230	1676270	flashlight through it and see if the antenna looks like it's low
1676270	1679390	frequency or high frequency without even having to connect
1679390	1690360	it to your prox mark or anything like that. So when we talk about
1690360	1693700	prox, as I mentioned, we are talking about credential to
1693700	1697280	reader communication. So there are different types of
1697280	1700440	credential readers. They represent different types of
1700440	1703980	technologies. Here in North America, we have a couple of
1703980	1706860	really, really popular low frequency and high frequency
1706860	1710820	credentials. On the low frequency side, we have prox and
1710820	1714960	DALA, IOPROX, EM and AWID. Those are less popular, but they are
1714960	1717520	still here in North America and Europe. They have a lot of other
1717520	1721060	credentials that they like to use. On the high frequency side,
1721060	1726540	we have some other common brand names, HID I class and NXP My
1726540	1730860	Fair and stuff like that. And we already talked about this,
1730860	1733960	right? What's happening here? Well, when we talk about cloning
1734160	1737440	a credential, what we're doing is we've basically learned the
1737440	1741120	language that the card and the card reader are speaking. And
1741120	1745160	so what we do is we pretend to be a card reader, right? So we
1745160	1748340	go and we talk to the credential and we say the same thing the
1748340	1752320	card reader says to it and says, hi, who are you? The credential
1752320	1755240	identifies itself and now we have that information. And as
1755740	1759440	long as we can produce it in the same way and reproduce that
1759440	1763420	signal for the reader on demand, then the reader has no way to
1763420	1767300	discriminate between an original and a clone, right? So we
1767300	1770420	approach the reader, we present our credential, we can say the
1770420	1773300	same thing. It's kind of like a replay attack basically, right?
1773300	1777180	That's what a clone is. A clone is a delayed replay attack and
1777180	1780520	everything works as you would expect it to. The most common
1780520	1783680	type of tool that we use today to do this is the Proxmark 3.
1783700	1786340	That's not this. This is the original Proxmark. It's gone
1786340	1789260	through a couple of iterations. Originally designed by a student
1789260	1794820	named Jonathan Westhues back in 2006, really 2004 and then he
1794820	1797780	kept developing it, made the Proxmark 2, made the Proxmark
1797780	1801060	3, open sourced it and then people had this wonderful
1801060	1805220	contraption to drag around with them. Here's mine with the
1805220	1808480	hand-wound antenna that I had to make to make it work. And then
1808480	1811040	eventually it was remixed a couple of different ways. If
1811040	1814100	anyone saw Iceman's talk yesterday morning, he actually
1814100	1816400	went really in depth into all the different hardware revisions
1816400	1820260	that have been out there. But we have the Proxmark 2 and it had
1820260	1823840	some really good antennas. Then there was a Proxmark 3 RDV3.
1823840	1828040	Then now we have the current, in my opinion, best iteration,
1828540	1833060	which is the Proxmark 3 RDV4. This is the same base hardware
1833060	1838120	remixed to be more stable, more efficient in its use of
1838120	1841860	physical space. So it's very, very compact. The antennas are
1841860	1845800	really beautifully built into it and it's really just a
1845800	1849540	delightful, wonderful package. So that was co-developed by
1849540	1854940	Iceman and Proxgrind of the RFID research group. You can buy
1854940	1857580	them at Hacker Warehouse. They're really, really awesome.
1858020	1862120	So yes, you can use a Proxmark like this. You can use it in
1862120	1866040	simulate mode. Here's one of my original Proxmark 3s way back in
1866040	1870520	the day and I can do that. And that's really, really great, but
1870520	1874820	that's not very practical, is it? So let's take a look at an
1874820	1877820	example of what cloning a low frequency credential looks like
1877820	1882220	just so folks can see what I'm talking about. So what we have
1882220	1887140	here is we're going to connect our Proxmark 3. We have some
1887140	1891400	credentials. Once I find the little plastic bag where the
1891400	1912000	credentials are. Let's see. Here we are. All right. So we have
1912000	1915440	our credential. And just to show you folks what we have here,
1915440	1919480	this is a simulated access control system very similar to
1919480	1922140	that more beautiful one and larger one that you see in the
1922140	1925660	case over there. So we have two card readers. We have a real
1925660	1929980	live genuine door controller making all of our decisions with
1929980	1933460	some credentials cached and programmed into it. And of
1933460	1937240	course, what demo is complete without very pretty, pretty
1937240	1943530	lights, right? So we have those two. I mean, it looks pretty
1943530	1953220	good, right? It's not bad. So let's take a look. And we have
1953220	1958180	our Proxmark 3. We have our credential, right? We have our
1958180	1962180	baggage handler that we're going to target. And at the moment,
1962180	1966840	this credential will go ahead and open that door. Ooh, ah,
1966840	1970820	right? If you want to make a door controller go or a door
1970820	1974000	rather and card reader go green, you too can do that. We're
1974000	1977300	running a CTF right now where you too can try your hand at
1977300	1980140	cloning some credentials and seeing how many points you can
1980140	1984100	accrue. So we have our Proxmark 3. We have our credential, but
1984100	1987620	that's not enough. We also need to run our client. So I'm going
1987620	1992860	to very awkwardly try to do that while using this microphone.
1997370	2003090	All right. And if I don't move, it will work. So we have our
2003090	2006610	Proxmark 3 client. This talk is not about how to use Proxmark
2006610	2009330	3. So we're going to go pretty quick. I'm going to use a
2009330	2013250	command called LF search. And actually, I'll make it a little
2013250	2015290	bit easier for you folks to see what I'm doing. I'm going to go
2015290	2018710	ahead and bump that font size up to 20. And hopefully that will
2018710	2022470	be less awful. Is that less awful? Yeah? Okay. I'm seeing
2022470	2025810	some nodding. That's good. So we'll do LF search. And oh, my
2025810	2029270	goodness, we found a Prox tag. Yay. And what we can do is we
2029270	2032490	can just go ahead and grab that raw data. And we can use a
2032490	2039730	different command called LF HID sim and that. And in theory, if
2039730	2047270	all went well, there we go. Green. But that's not ‑‑ it's
2047270	2050650	really easy. Trust me. I know you want to clap because that's
2050650	2053630	the polite thing to do. But I'm sitting up here going, no, don't
2053630	2059390	clap for that. But thank you. So let's talk about something a
2059390	2064030	little bit more practical than that. Let's see here. Oh, that
2064030	2067170	is the wrong presentation. You will see that at the end if we
2067170	2073370	have time. We'll go back here. And we'll jump back. So we saw
2073370	2077230	how we can clone a credential just by simulating it. And there
2077230	2080410	are a lot of different credentials out there. We have
2080410	2084290	Prox by HID. Sometimes their cards are labeled really, really
2084290	2088390	obviously. Sometimes less so. Their readers are really, really
2088390	2091790	easy to recognize if they're original readers. Although there
2091790	2095350	are a lot of third parties that also make readers. There's
2095350	2098390	another brand that they sell called Indala. Those are
2098390	2101930	different credentials, different ways of encoding that same card
2101930	2105270	number data. And of course their readers also look different.
2105270	2107910	They look very cool in my opinion. They have that fun
2107910	2112230	little four lights. And what's really important in my opinion,
2112230	2114690	and this is something I go more in depth when I have more time
2114690	2118170	usually, what's important to understand about these different
2118170	2121510	readers is being able to identify them in advance allows
2121510	2124530	you to tell what tools you need to bring with you if you're on
2124530	2127110	an engagement. You need to do your proper recon on your
2127110	2132030	target. Here's Kantech Tyco IO Prox. They have different tags,
2132030	2135810	different readers. They all have a certain visual aesthetic that
2135810	2140050	works really well. There's other tags, EM. They make them in a
2140050	2142690	couple different formats. They make a couple different readers.
2142690	2145630	Again, we're not going to deep dive into all this stuff because
2145630	2147550	this is just a light overview of some of the different
2147550	2151470	components of the system so you can see how it all works as a
2151470	2154950	whole. We have AWID, Applied Wireless ID. They make their own
2154950	2158350	special tags. They make their own special readers. But all of
2158350	2161730	these things, these are just different ways of encoding the
2161730	2164890	same data. So when we talk about cloning, you know, it's not
2164890	2168570	really practical to hang a Proxmark 3 off of your badge
2168570	2171770	holder. That's not really going to make you blend in very, very
2171770	2175830	well, is it? So instead, we want to have a legit looking badge.
2175830	2178550	And since we can't just take our badge, stick it in a copy machine
2178550	2181870	and call it good, we're going to use the Proxmark 3 and we're
2181870	2186050	going to use another type of credential called the Atmel T5577.
2186450	2189370	This was not a chip that was originally designed for pen
2189370	2193990	testers. This was originally designed for OEMs that were tired
2193990	2197070	of making their own chips. They said, hey, instead of making
2197070	2200330	your own silicon, you can buy our chip. You can make it
2200330	2203090	emulate almost any credential you want. You know, you can
2203090	2205330	change the frequency. You can change the data rates and the
2205330	2207590	modulation. We don't have to worry about all that stuff
2207590	2210050	because it's built into the Proxmark. And the Proxmark
2210050	2215730	allows you to use that same T5577 to recreate almost any low
2215730	2218850	frequency credential regardless of whether or not it's Prox or
2218850	2224610	Indala or IOProx or EM or AWID. It's really, really cool. We're
2224610	2227830	not going to go super deep into cloning other than I'll just
2227830	2231670	show you really quick how that works. Actually, I don't have
2231670	2235970	any T5577s in front of me. So for the sake of time, I'll
2235970	2238470	actually do it with the same credential, which is not as
2238470	2243690	exciting, I realize, because this is actually a T5577. So
2244190	2248290	what I'll do is I will copy this, which is our original
2248290	2255250	enrolled credential, and I will wipe the card first. And we'll
2255250	2259150	make sure it's wiped by doing search. There's no known tags.
2259150	2263530	So it does nothing. Oh, no. We broke our credential. Never
2263530	2269290	fear. Proxmark is here. LF HID clone. And to check our work,
2269290	2272990	we'll go ahead and do LF search. It says it's working. And that
2272990	2275210	is basically how you would make a clone. And you can do that
2275210	2278350	with almost any low frequency credential because these are all
2278350	2282790	different ways. Yes, thank you. These are all different ways of
2282790	2285430	encoding different types of data, different types of
2285430	2288450	signals, but it's still following the same physical
2289190	2292690	communication medium, right? So we're able to emulate different
2292690	2296410	types of cards as long as they're all low frequency with
2296410	2301090	this particular card. And that is really, really cool because
2301090	2303670	you can actually get this in a couple different formats. They
2303670	2307310	even make stickers and implantables. So you, too, can
2307310	2312130	embed a T5577 in your hand if you want. And now you'll never
2312130	2315150	forget your apartment key again. You can just wave your hand in
2315150	2318530	front of the door and the door will open for you. They make
2318530	2322350	them for MyFairCards as well. So if you want to open your hotel
2322350	2328390	room with your hand, you can do that as well. Now, in the field
2328390	2331710	we're not using a Proxmark. Proxmarks only work for very
2331710	2335030	short distances. In the field what we do is we take a reader
2335030	2339110	and we weaponize it. Ooh, ah, doesn't that sound great?
2339130	2341610	Doesn't that sound hackery and cool? Well, it's actually very,
2341610	2346570	very simple. Readers, remember, they take power and they take
2346570	2350630	credentials and they spit out zeros and ones. That's it. It's
2350630	2353310	not a bidirectional system. It's very, very simple. So that
2353310	2355830	reader, once it gets that credential information, it's
2355830	2360370	just sending that down the wire to the door controller. So when
2360370	2363930	we talk about long range readers or weaponized readers, all we're
2363930	2368210	doing is really just taking a long range reader that is used,
2368210	2371810	say, for parking lots, for garages, any application where
2371810	2374470	you don't want the user to have to get within two inches of the
2374470	2378810	reader and you install like an Arduino or a Raspberry Pi or
2378810	2381630	something just to record those ones and zeros. That's basically
2381630	2385190	it. It's not a very complicated system, but it allows you to get
2385190	2389350	very reliable longer range reads out of the device. I have to
2389350	2392070	apologize. I realize I'm going pretty fast, but I am worried
2392070	2395610	about getting everything done in time. So if you have questions,
2395610	2397890	please forgive me. I'll do my best to answer them at the end
2397890	2401590	of the talk. If you watch TV, you might have seen a show
2401590	2405990	called Mr. Robot. Who's seen Mr. Robot? Yeah, they use a long
2405990	2409930	range reader in the show. It's actually fairly accurate how
2409930	2412290	they do it, although it's a little bit dramatized. They go a
2412290	2416710	little bit over the top, right? So here we are. There we go. We
2416710	2420110	won't make it quite so loud. Here's a scene that a lot of you
2420110	2423670	folks might remember. They have their long range reader and, you
2423670	2427710	know, he's getting himself psyched up. He's prepping and he
2427710	2430150	does something that in my opinion is unnecessary. It
2430150	2433310	attracts undue attention to yourself, but it drives the
2433310	2436230	point home for the non-hacker folks out there, right? He kind
2436230	2439310	of bumps into the guy physically and is able to read that
2439310	2442150	credential. Of course in real life you don't have to do that.
2442150	2443870	You don't have to get that close. You don't have to
2443870	2447010	physically almost assault someone to get that credential
2447010	2450570	information. And it's very easy to get credentials because
2450570	2454070	credentials are usually very, very, you know, obvious, right?
2454070	2456750	People are hanging them off their hip. You see them in
2456750	2459210	trains. You see them in, you know, when people are standing
2459210	2463190	in line. Very easy to get to. You see them where people are
2463190	2470830	their most vulnerable. I wish I could say that I was better than
2470830	2476050	the idea of not doing this, but I have to say that if you've
2476050	2479110	ever been to a bathroom, a stall, you might have sometimes
2479110	2484130	seen like a toilet seat cover dispenser, right? To make you
2484130	2486950	feel a little bit better about using a public restroom. So you
2486950	2489850	can actually buy those toilet seat cover dispensers and you
2489850	2493890	can put RFID reading electronics behind them and then you go
2493890	2496310	into the bathroom stall and you just kind of stick it with
2496310	2499450	double stick tape as a convenience, right? You're
2499450	2504450	offering a hygienic product to everyone. And in exchange for
2504450	2507570	this toilet seat cover, all you ask is for a copy of their
2507570	2510730	credential. And it works out well. People seem to be really
2510730	2514890	happy with that exchange. So what about high frequency,
2514890	2518130	right? What about these smart cards, these high end secure
2518130	2521050	credentials, right? Well, again, I'm going to insult your
2521050	2523310	intelligence a little bit because I think it's helpful to
2523310	2526290	understand the main difference between low and high frequency.
2526290	2529490	So if we pretend our low frequency credential is a piece
2529490	2533810	of paper with a number written on it, right? We understand that
2533810	2537670	we don't care if that number is in English or if it's
2537670	2541630	obfuscated in some sort of weird wingdings type language. We can
2541630	2544470	just take that piece of paper and stick it in a copy machine
2544470	2547070	and as long as we produce another piece of paper with the
2547070	2550290	same markings, it's going to work, right? So that's basically
2550290	2553510	what low frequency is in a nutshell. As long as we're able
2553510	2557010	to reproduce that signal, which is relatively easy to do, the
2557010	2559410	reader is going to be able to talk to it because that
2559410	2563450	credential information itself isn't protected really. It's
2563450	2565630	just using a different communication medium. It's
2565630	2569870	basically just a very fancy bar code. Now what we do when we
2569870	2572450	talk about high frequency credentials, I'm going to shut
2572450	2574910	this off for the moment. When we talk about high frequency
2574910	2578270	credentials is we're going to take that piece of paper that
2578270	2581750	has our very sensitive, secure credentialing information. We're
2581750	2584170	going to fold it up. We're going to put it in an envelope. We're
2584170	2586610	going to put that envelope in a safe, alright? And that's
2586610	2591090	basically what a high frequency smart card is. It's a digital
2591090	2595610	lock box. It's a digital safe for sensitive information and in
2595610	2599130	this case it happens to be RFID. So this is actually a really
2599130	2603150	cool example or analogy in my opinion because this particular
2603150	2608990	safe has a serial number plate on the side and it has a
2608990	2613710	combination to open it. So similarly, if you imagine that
2613710	2617050	you could use a special algorithm and pre-shared secret
2617050	2620150	key to based off of the serial number, which is on the outside
2620150	2623290	of the safe, calculate what the combination is going to be, you
2623290	2625850	can unlock the safe and get to the credentialing information,
2625850	2629270	right? So if you're designing an access control system, you
2629270	2632430	wouldn't use the serial numbers of the safe as the credential
2632430	2635190	data, right? Because anyone can read that. You would try to
2635190	2638550	protect it in some way. And when we talk about high frequency
2638550	2642830	credentials, whether it's iClass or MyFair or Desfire, that's
2642830	2646610	what we're talking about. We're talking about taking a
2647130	2649930	credential information, putting it into a block of data and that
2649930	2655450	block is read protected by a key, by a password, by some
2655450	2659670	authentication mechanism of some kind. So by way of example,
2659670	2662750	let's for example talk about MyFair Classic, very, very
2662750	2666130	popular credentialing format used by a lot of transit
2666130	2670470	systems, by a lot of events and by a lot of access control
2670470	2675150	systems in Europe and abroad. So again, we're not going to get
2675150	2677010	too technical into it because I don't think it's actually
2677010	2681010	necessary to understand how the technology works as a whole.
2681210	2685650	Here you have a MyFair credential memory map, right? So
2685650	2688830	you have your credential and then the memory is broken up
2688830	2693110	into different sectors and blocks. And in order to read
2693110	2696470	those different sectors, you have to have the right key. So
2696470	2701750	when you do cracking of MyFair, when you run MyFair dark side
2701750	2704390	attack or the nested attack or this or that, these are all just
2704390	2709590	different methods of recovering these keys that are on the card
2709590	2713890	that protect the information encoded onto the blocks, right?
2713890	2717510	So you would not use the serial number, which happens to be
2717510	2721110	encoded in block zero. You would not use the serial number to
2722570	2725990	run your access control system. Instead, you would store your
2725990	2728910	credential in one of these other blocks and you would protect it
2728910	2731650	with a key. And again, this is how all these different
2731650	2734430	credentialing formats work. There is some method of
2734430	2738570	authentication that is used that unlocks the card and that's
2738570	2741450	what the reader is doing. That moment when you present your card
2741450	2744390	to the reader, it's doing a little handshake, right? There's
2744390	2748090	some mutual authentication that's taking place and it's
2748090	2751250	unlocking the card and it's reading protected memory inside
2751250	2755050	the card. So in order to clone that particular card, you
2755050	2758710	actually have to figure out how to unlock it first. And so you
2758710	2761730	have to either find the key, whether it's leaked or cracked
2761730	2765670	or otherwise or find a way to brute force the key in order to
2765670	2769030	clone it. We're not going to go in depth into how to do those
2769030	2773790	things because again, this talk is talking about high level how
2773950	2779110	a modern access control system works. So let's talk about
2779110	2782170	another way that these things can be abused, right? So we've
2782170	2785810	talked about how we have low frequency and high frequency
2785810	2789790	credentials. But how does one switch from low frequency to
2789790	2793690	high frequency? It's easy when you only have one system or one
2793690	2797270	door because you go up to it on a weekend, you rip out all the
2797270	2800030	stuff and you replace it and you're done, right? But imagine
2800030	2803690	you're a company. Imagine you have hundreds or thousands of
2803690	2808110	doors and hundreds or thousands of users. Is it reasonable to
2808110	2811910	expect that in one weekend during non-business hours, you
2811910	2816710	could go in and rip and replace everything? No, absolutely not.
2816710	2820410	That sounds incredibly infeasible and impractical. So
2820410	2824390	they make these things called migration readers. And I wish I
2824390	2827550	had jammed a photo of a migration reader in here. I
2827550	2830970	apologize that I don't have one at the moment. But imagine you
2830970	2835350	have, it actually, this is a migration reader. This is an
2835350	2838570	example of a migration reader. It reads both high and low
2838570	2841810	frequency credentials. So again, by way of example, I'm going to
2841810	2846010	go ahead and power this system on. I will grab the credential
2846010	2854240	for it. And to show you that these are two different
2854240	2858360	technologies, we remember that the airport credential, that was
2858520	2862460	a low frequency prox card. What I'm going to do is we're going
2862460	2866860	to pop back over to our prox mark and here we are. Here's our
2866860	2870740	research assistance credential, Louise McDougall. And her
2870740	2876400	credential, if I run my HF search command, you will find
2877920	2884630	once it switches all the FPGA code, let's see if we can get
2884630	2887550	that into the right spot. There we go. So this is an I class
2887550	2890710	credential. This is a high frequency smart card type
2890710	2894170	credential. These are two different technologies and yet
2894170	2899170	we have both the old credential and once that door closes, we'll
2899170	2902950	try our high frequency I class credential and we'll see that
2902950	2906410	they both unlock the door. This reader can talk to two different
2906410	2910130	technologies, both old and new. And the reason that exists is
2910130	2913810	the idea is, okay, don't worry, you guys want to upgrade to our
2913810	2916970	newest, latest and greatest technology. We got you covered.
2916970	2919210	What we're going to do is we're going to sell you our migration
2919210	2924130	readers. They can read both your old cards and the new cards and
2924130	2927790	you'll slowly upgrade your readers at your own pace. And
2927790	2931410	once all those readers are upgraded, remember meanwhile
2931410	2934910	everyone's old credentials, they're still working, right?
2934910	2938290	Once you've upgraded all the readers, then you can take
2938290	2941130	everyone's credentials again at your own pace and you can
2941130	2944990	replace them, right? Makes sense. Now here's the thing.
2945050	2951070	After you do that, your fancy new reader can still read old ass
2951070	2957310	credentials. So what that leaves you open to is what I call a
2957310	2962030	format downgrade attack. This is something where you would take a
2963550	2972150	secure credential such as a CEOS credential which is, hi.
2972150	2976370	Datagram everyone. Oh, nothing. Just came up, said hi and left.
2976370	2980750	All right. So you can take your secure credential and maybe you
2980750	2984370	can't clone it but you can find a reader that reads it and
2984370	2988610	remember, what does every reader use as a communications protocol
2988610	2992470	to send credential data back to the door controller? WeGand,
2992470	2996390	right. It still converts it to the same end format. So you can
2996390	2999650	take this high security credential, you can read it with
2999650	3002250	something besides the Proxmark, you can read it with a regular
3002810	3006070	reader made by that particular company and then you can take
3006070	3011170	that WeGand data, you can save it onto an older format card and
3011170	3015370	now you can downgrade the format of the card to something that is
3015370	3018690	more easily clonable and manipulatable and the door
3018690	3022530	controller will treat that card the same way because there's no
3022530	3027530	way for the door controller to know the difference between the
3027530	3029630	different types of credentials that were presented at the
3029630	3032290	reader. The reader doesn't give that information to the door
3032290	3036230	controller. The door controller just sees 26 bits of WeGand,
3036230	3040750	right. So that's also another important consideration. If you
3040750	3044330	have questions about this, please feel free to ask. I'll do
3044330	3048530	my best to clarify it. I know we're jumping around a lot. So
3048530	3051950	let's talk about door contacts and sensors. We were talking
3051950	3055490	about different types of inputs into physical access control
3055490	3062770	systems. Whoops. There we go. So what we're seeing here is a tall
3062770	3068330	door and we're going to use our mirror and it's really hard to
3068330	3075030	see in this particular photo, but as we slide our mirror over,
3075030	3082070	what we see here, let's see if it works, is the very edge of a
3082070	3085750	little door contact and what that is, that's a little
3085750	3088810	magnetic read sensor that tells the door controller the state of
3088810	3092610	the door. How is that used? Well, that's often used as a way
3092610	3095610	of detecting forced entry. So remember that door controller is
3095610	3098910	always monitoring a bunch of different types of inputs. So
3098910	3104010	for example, let's say you have a door that you're monitoring
3104470	3108590	and you have a card reader on the secured side and you have a
3108590	3112330	motion sensor like this on the other side, right? So what the
3112330	3116310	door controller does, it says, okay, if I detect that the door
3116310	3123010	is opened and there is no valid card read and there was no motion
3123010	3126230	detected before the door was opened, what do I assume
3126230	3134810	happened? What's that? I heard it. Forced entry, right? So
3134810	3138870	logically, again, the access control system says, hey, this
3138870	3143610	door has been opened. The door contact sensor is no longer in
3143610	3147450	contact. I'm assuming the door is open. No one presented a card
3147450	3151850	first and no one exited. So then it triggers an alarm condition.
3151850	3155350	So again, by knowing that that's how the system is designed, we
3155350	3158930	can take advantage of that. So what we're going to see here,
3158930	3163610	here's a rec sensor. It is not used to automatically unlock the
3163610	3168330	door. It is instead used to decide if there's a forced entry
3168330	3172050	alarm or not. So what you're going to see is I'm going to use
3172750	3177910	canned air and you can tell from the noise, where are we? We're
3177910	3181550	in a server room, right? So we use the canned air to trigger
3181550	3185150	the motion sensor and then we just slip the latch with some
3185150	3189930	plastic. And because of this process, that video, you just
3189930	3192530	saw an entry. But what did the door controller think took
3192530	3197810	place? An exit, that's right. By simulating motion first before
3197810	3200870	bypassing the door, we told the door controller that we're
3200870	3204090	actually leaving instead of entering and so no alarm was
3204090	3208130	triggered. How do you find door contacts? One of the easiest
3208130	3214030	ways is to use a tool like this. This is really cool. This is a
3214030	3217890	door contact sensor. That's what I call it. It's actually just a
3217890	3223850	little magnet on a swivel. I'll show you what it looks like.
3223850	3229690	Here it is. And basically any time it comes near a magnet,
3229690	3232890	this little guy here points in the direction of the magnet and
3232890	3235810	you can just kind of wave this around the edge of the door and
3235810	3237930	anywhere where there's a magnet in the door, it will tell you
3237930	3240710	that's where the door contact is. So if you're not as
3240710	3248050	fortunate as being able to say just use a mirror to look into
3248050	3252750	the side of the door and see that that door contact is there
3252750	3258690	like this, and again, what we're looking at is right here. There's
3258690	3263310	our door contact. By the way, in this example, we're about to try
3263310	3267430	to break into this data hall. We see the door contact. What's the
3267430	3273210	easiest dumbest way to bypass this door contact? Magnet, yeah. I
3273210	3276190	didn't have a lot of fancy tools with me. We were overseas. So
3276190	3280050	what I did is I just took out my hotel key card and I bent it at
3280050	3283930	90 degrees just to create a little shelf and I taped a
3283930	3286990	magnet to it. I taped a magnet to it and I shoved that in the
3286990	3291650	door and that was enough to bypass that sensor. So here our
3291650	3294450	door into the data hall is opened but according to the door
3294450	3297450	controller, according to the access control system, what is
3297450	3302050	the current state of this door? It's closed. That's right. So
3302050	3305050	these are all over the place. You'll see them on the top of
3305050	3308550	frames. You'll see them on the sides of frames. Here's a really
3308550	3311550	close-up photo of a door contact. What have we done to
3311550	3315110	this door contact? Yeah, we stuck a magnet on there. But
3315110	3319190	what did we do to make it extra clever? Our tape is in the shape
3319190	3323890	of a circle. So unless I would have told you that, hey, this is
3323990	3326810	a door contact that we bypassed, your average user is
3326810	3330030	not going to notice that. And these are the small things about
3330030	3333710	modern access control systems besides RFID that you want to be
3333710	3338710	aware of in order to know, okay, what is the lowest, easiest path
3338710	3343530	of entry. Oftentimes it's not the RFID card. It's finding a
3343530	3347590	combination of bypasses to make the system behave or think
3347590	3351770	differently. So we've talked about RFID and we've talked
3351770	3354950	about how all these different credentials, whether they're mag
3354950	3359410	stripe or smart card or high freak or low freak, these are all
3359410	3362590	just different ways of encoding the same data that is stored on
3362590	3366490	the card, right? And that's still sent over WeGand, right? So
3366490	3369310	we talked about this. We talked about how this is all just
3369310	3373130	different ways of doing the same function. But once that data
3373710	3378290	leaves the reader, it's still usually WeGand. Now, there are
3378290	3381930	other communication protocols that technically exist. They are
3381930	3386190	not very popular. And even the other ones that do exist, with
3386190	3389270	the exception of one protocol, which we will talk about,
3389270	3393690	everything in red here, these are protocols that transport that
3393690	3397170	credential information without encryption, without any
3397170	3400730	protection. You can just connect to the wires and read that
3400730	3404750	information. And this has been done for years. Like over ten
3404750	3407950	years ago, Adam Laurie and Zach Franken, they came up with
3407950	3410510	something called the Gecko. The Gecko was something that you
3410510	3413330	would install behind the reader and it was a literal man in the
3413330	3416970	middle. You would connect it to the WeGand data wires and you
3416970	3420050	would try to read that information as it goes across
3420050	3424910	the wires and then replay that information. And that's a very,
3424910	3427450	very old technique. You don't even need a special tool to do
3427450	3430430	it. You can use an Arduino or anything you want that can
3430430	3437370	record and replay two minutes. Holy crap. They said 80 minutes.
3437370	3452240	Someone said it was an 80-minute talk. Is that not correct? Oh,
3452240	3455580	well, that's unfortunate. Okay. Someone in the audience said
3455580	3458240	that it was on the schedule for 80 minutes, so that's why I had
3458240	3469590	adjusted my talk. Okay. That's what the schedule says. That's
3469590	3475870	what people are saying. All right. All right. Well, I will
3477090	3480050	show you this last thing and then I guess if you have more
3480050	3483510	questions, unfortunately, we'll just have to ‑‑ okay. So
3483510	3485810	everyone is looking at their phones and they're saying 80
3485810	3490910	minutes. So I'm going to ‑‑ who's the next talk? Are they
3490910	3494530	here? Okay. All right. So we're going to finish up this one
3494530	3497810	section with apologies and then if you have more questions,
3497810	3501130	please find me afterwards. So we can intercept the data. It's
3501130	3503690	really, really easy. There's a couple different tools to do it.
3503690	3506990	There was the Gecko. There was the BLE key a few years ago. One
3506990	3510330	of our friends made an even better tool, Kenny McElroy,
3510950	3514930	OctoSavvy on Twitter, he created this tool called the ESP key and
3514930	3518390	the ESP key is the interception tool that you install behind the
3518390	3521170	reader and it's a literal man in the middle, right? Look at that
3521650	3525790	cool hacker looking guy, right? So that man in the middle is
3525790	3528770	going to monitor those communications and as that
3528770	3531670	credential information goes across the wire, we can replay
3532130	3536110	that information. So what I'm going to do is we're going to
3536110	3540410	skip through a couple slides as the very last thing and this is
3540410	3544970	brave. I'm going to try to show you a demo of how this all
3544970	3547310	works. You're going to watch me install one of these keys in the
3547310	3550450	video and while that's happening, I'm going to try to
3550450	3557670	set up my demo here and we're going to see if it works. Oh,
3557670	3562630	video paused so I can't do that. So I'm going to fast forward
3562630	3567850	through it. So we have our ESP key. I'm going to pop that out.
3567870	3571090	I'm outside of a server room door. I have not disconnected
3571090	3574750	the reader from the door controller. I'm just getting
3574750	3578570	those data control wires out of there. I've got my power. I've
3578570	3581910	got my ground. I'm just using a punch down tool to punch those
3581910	3587890	wires down onto the wall there. And once it's all said and done
3587890	3590410	and we're going to fast forward just a few seconds. Here we go.
3590410	3594330	You can see our ESP key is turned on. And we're going to
3594330	3602710	feed that back into the wall. And we're done. So this is a
3602710	3607370	bold demo attempt in the wireless village. I'm going to
3608230	3614650	see if this is even a possibility. If I'm able to
3614650	3619550	connect to my ESP key or not. Or if someone is going to screw
3619550	3623370	with it instead. Fingers crossed. Yeah, demo gods are not
3623370	3633600	smiling upon us today. We'll try two more times. Nope. Yeah, of
3633600	3638380	course. Wi-Fi village can't connect to any Wi-Fi. Such is
3638380	3651040	life, right? All right. And last time. Nope. So in any other
3651040	3654620	space but this one, we would be able to connect to our ESP key
3654620	3660720	and be able to replay, intercept and replay that credential
3660720	3665660	information without interacting with the card reader at all.
3665660	3669640	Later on, I will try to have this working. I don't know how
3669640	3673560	possible that's going to be with all of this stuff going on in
3673560	3678700	the airwaves right now. But you get the idea. We can replay the
3678700	3683300	information and that works. So let's see. I think that's going
3683300	3686980	to have to be it. I can't think of ‑‑ we're going to shut
3686980	3691380	this off. Let's see if there's any last minute great things
3691380	3696600	that we can talk about in 30 seconds. Oh, yeah. I'll share
3696600	3699940	one thing. There's an easy fix for interception. It's a new
3699940	3703640	standard. It's called OSDP. If you install a new system, you
3703640	3708700	absolutely 100% should be using OSDP. It protects the panel to
3708700	3714060	server communication. It allows you to encrypt and secure that
3714060	3718720	communication between the reader and the door controller. It's
3718720	3724280	bidirectional so you can do cool things like preventing eaves
3724280	3728620	dropping. It can do ‑‑ if you want to learn more about it,
3728620	3733420	go to securityindustry.org slash OSDP or ask me more questions
3733420	3736900	about it later. And then with sincere apologies, we're going
3736900	3740760	to call that done. And I'm going to go ahead and put my contact
3740760	3744640	information up on the slides here if you have any questions.
3744760	3749740	We'll do this. We'll scroll all the way down. And there you go.
3751200	3758900	Thank you. I'm really sorry that was so much information that we
3758900	3762260	couldn't get through. As I said, this is normally two days worth
3762260	3765940	of material that we tried to cram into just a few minutes. So if
3765940	3768900	you have any questions, please come find me over there while
3768900	3772060	Woody sets up his next awesome talk. Thank you again.
