start	end	text
1420	9440	Hey everyone, how you doing out there? I am DeviantOlef. I am not particularly cool,
9440	15980	but I get to do things that are cool. Specifically, many people in the hacker community and online
15980	22100	know me as a lockpicker and a physical security person. I'm not going to lie, it's a cool gig.
22100	27800	I get to break into buildings, that's my job and I get paid for it, but my knowledge in that area
27800	33700	was pretty archaic for a very long time. Mechanical locks, safes, you name it, I'm there,
33700	40120	I'm your guy. RFID and electronic access controls, however, that's the direction that a lot of things
40120	47220	are moving, right? Using little boop-boop access cards. I didn't know a whole lot about that and I
47220	52320	decided it was time to learn. If you've ever gotten interested in doing some RFID and credential
52320	57280	hacking but you haven't learned yet either, well, how about I teach you what I've figured out so far
57280	63800	and you can take it from there. Sound good? So when we're talking about electronic credentials,
63800	68520	what do we actually mean here? Well, again, a lot of you have seen buildings like this, right?
68520	73220	You have an access control card or some kind of token, you present it to a reader, you hear a
73220	79360	beep, the door unlocks, you get to go inside. What's going on when you use a reader like that?
79360	83040	That's what we're going to dig into. And what if you want to use credentials like that
83040	87840	maybe improperly or maybe do interesting things with them? Well, instead of using a conventional
87840	93020	reader, you can use a reader like this. This device right here, we're going to use it a lot
93020	98540	in this presentation. This is my Proxmark RFID hacking tool. I'm going to explain how it works,
98540	102220	you're going to see some basic commands and capabilities, and if you want to get started
102220	107140	later, I'll give you an overview of what you want to look for online. So this is a picture of me
107140	111820	with what kind of credential is that? Can anyone guess? It's not a work badge. No, that's a hotel
111820	116740	key. This is me dumping memory out of a hotel key so that I can make extra room keys for where
116740	121260	I'm staying. I'm actually going to show you at the end of the talk how I copy my hotel keys,
121260	126120	and it might be not exactly what you're expecting. All right, before we get too deep into the
126120	132100	hardware though, let's talk about the actual technology driving it. Radio frequency identification,
132100	138180	RFID. What exactly is going on? Is this like, you know, I can put on my Walkman and tune a radio
138180	144800	station and I can, oh, I'm listening to the radio. No, it's nothing like that. RFID is a very small
144800	150140	distance technology. It doesn't involve broadcasting from one element to another.
150200	154240	Now, if you look at things that are part of an RFID system, you've got some kind of tag,
154240	158160	some kind of reader, and you crack them open, you say, well, wait, there's there's an antenna
158160	164200	inside the tag. There's an antenna inside the rear. Deviant, you told me that it's not broadcasting
164200	170920	and receiving, but it sure looks like that to me. No, these antennas are not used for transmission
170920	176640	of data. These antennas are used like your phone. If you do wireless charging of your phone,
176640	181680	anybody ever do that with their devices? Right. Inductive coupling is what we're talking about
181680	186820	here. So if you put a charge in one coil of wire and bring another coil of wire near it,
186820	191640	that other coil of wire develops a charge. That's how wireless charging works. That's also
191640	198380	how RFID communication works. The reason is because of that inductive coupling, right?
198380	204160	You can send and receive signals. And again, they're not broadcast signals. It's actually
204160	210120	communicating in a very interesting way. So I want you to imagine something. I want you to imagine
210120	216440	you're kind of locked in a house and you can't go outside and, you know, you don't have Internet,
216440	220780	you don't have phone, you don't have any real way of communicating with the outside world.
220780	224500	What if you needed to send a message to someone else?
224780	230800	This might sound a little hokey, but imagine the utility company providing you with your water.
231020	236260	That water pipe leading to your house? Well, someone at the utility company is monitoring
236260	242440	that water, right? They have to send you a bill. It might be slow data rate, but you could
242440	247840	communicate with someone at the water company just by turning your water on and off. You could kind
247840	252060	of send them Morse code because they're watching your water usage and then it goes down and then
252060	258680	it goes up and then it goes down. This is how credentials communicate with an RFID reader.
258880	265420	Remember that inductive coupling where the card itself, these credentials don't have any batteries.
265540	270720	There's no power in this card. The only time they get power is when they go near the reader and that
270720	277620	wakes them up. That's how they power up and wake up. What else do they do? They actually modulate
277620	283600	their power draw. I'm going to pull more power and then less power and then more power and then less
283600	290440	power. That's how RFID communication works between a credential and a reader. Modulating that power
290440	295440	draw, it's like you're a person in a house turning your water on and off trying to get someone to
295440	300580	listen to what you're saying way out at the power company or the water company. Now there's a couple
300580	307600	of terms that get really confused and we need to just talk about this right away. RFID is
307600	313800	what we're hacking on here today. How many of you have ever heard of NFC? Probably a lot of you.
313800	319140	It's in your cell phones these days. If you have contactless payment or anything like that,
319140	325160	boop boop boop, well that's NFC. Oh, my phone is NFC enabled. And some people don't quite understand.
325160	333320	They say, well, RFID, that's like NFC, right? It's the thing in my phone? Kind of, but not exactly.
334080	343400	Let's make a big diagram. RFID is any kind of inductive coupling based communication using a
343400	349020	coil of wire and a reader and a coil of wire in a token of some kind. If you're inductively coupling
349020	354600	and modulating your power draw to communicate, that's RFID. There's a lot of ways to do it,
354600	359940	though. There's a lot of different implementations of RFID. The oldest that's been around forever is
359940	367000	low-frequency RFID, often used for old-school access control or sometimes inventory tracking
367000	373600	in a retro way. These are not really complicated devices. There's not a lot of power from the
373600	378660	reader going into the credential, and the chip itself that's powering up can't do a whole lot.
378660	382780	We're about to learn how very simple and rudimentary those chips are.
383000	388420	Now, there's also high-frequency RFID. That's up in the megahertz range. You've got more power to
388420	394240	the chips, more functions and features on that chip, a lot more you can do. Not going to get
394240	399140	into it in this talk, but there's even ultra-high frequency, way up in the 900 megahertz range.
399260	404820	These are not generally used for access control. This is where you see a lot more asset tracking,
404820	409440	and if your luggage ever gets tracked by your airline and you get little alerts on your phone,
409440	415380	they're using UHF RFID. So then we've got a whole chart here, but there's no NFC on it.
415380	424360	Is the whole thing NFC? Is it just a different word? No. NFC is just one small subset of
424900	432140	high-frequency RFID. It's a very small piece of the puzzle, but it's become ubiquitous in the
432140	436920	marketplace, in the landscape, because it's what's in all of our phones. NFC is the direction
436920	442300	most tech is moving. Many times you'll hear NFC referred to as contactless smart cards,
442300	449160	because those chips support modern feature sets. So how is RFID typically used in access control
449160	455080	environments if you want to get into a building? Well, think of it this way. A lot of really basic
455080	462340	RFID, really simplistic old-school tech, it's nothing more than a folder. A folder that contains
462520	468460	a piece of paper. Inside there's just a simple credential string, a simple bit of data that's
468460	474400	here's who I am, and that's it. And this is not like a locked folder. There's no padlock on this.
474400	479600	It's just a folder that anyone can look at, open, read the numbers, and then close it again.
480240	484620	When you think about this in terms of access control, it's kind of crazy. It's like walking
484620	489700	up to a building and just holding a piece of paper up, saying, hi, I work here. Can I come in,
489700	494400	please? Am I authorized to be in this building? Here's a little scenario for you. I'm going to
494400	498860	paint you a picture. And if you can imagine all these different players, right? So someone's going
498860	503760	to come up to this building and they want to get in. That someone is an RFID credential.
503940	509420	And they're about to talk to this guard at the door. That guard is the reader. The guard,
509420	515000	you'll find out, doesn't make a lot of decisions. Those decisions are made in the building by the
515000	520940	boss lady up here. The boss, she is the door controller. She has all the logic. She has all
520940	526400	the command and control structures. She is in charge of unlocking the door hardware, the doorman
526400	531700	there in red. So what's going to happen when all these pieces interact together? Well, let's step
531700	539160	through it. The reader, first of all, is always looking to talk. The reader is always just offering
539160	544900	power in a little bubble. It's offering energy to anyone that comes near it. Because again, if I
544900	550520	bring a card near a reader, that card has to wake up. So the reader is always looking for credentials,
550520	556820	saying, hello, is anyone there? Hello, hello, hello. And then if a credential shows up by the
556820	563060	reader, what happens? Well, the credential gets power. It wakes up. And old school credentials
563060	567840	only know how to do one thing. They just know how to show people, hi, this is my number,
567840	573080	this is all I am, this is all I can do. And the reader is fine with that. In access control,
573080	577300	you take that simple string of data, that's called the PACS payload, or the Physical Access
577300	582600	Control System payload. You take that payload, and the reader doesn't know who you are. The reader
582600	587320	on the wall doesn't know if you're authorized or not. It doesn't care. It's just going to take
587320	592880	whatever you gave it and throw it up the wire to the door controller. It's the door controller's
592880	598280	job to say, oh, let's see what this is. Is this person authorized this time of day, this building?
598360	603540	Okay, yeah, they're authorized. Cool. And the door controller, the boss lady, she tells, okay,
603540	610800	unlock, the door opens, let you in. That's access control in a nutshell. Now, when we think about
610800	616820	this though, remember, those credentials, especially old school credentials, don't have a lot of
616820	623580	protection to them. So we can clone and copy these credentials very easily. Let's talk about how that
623580	629600	would work, right? Well, here we have our credential, right? Our credential sees a reader, wakes up,
629600	635140	spits out its number, and hopes for the best. The thing is, these credentials don't know who they're
635140	640080	talking to. They don't know if they're talking to a reader that's attached to a building or if
640080	645440	they're talking to maybe an interception device. If I come along with something like my Proxmark
645440	651820	device, remember, this can act like a reader. Well, my Proxmark device can offer power into the world
651820	656920	and say, hello, who's there? Hello. And if I have a credential on it, that credential will wake up
656920	662860	and say, oh, I'm in front of a reader. Here's who I am. Here's my number. And this card just doesn't
662860	668220	know any better. This card doesn't have any logging capability or audit capability on it.
668240	674300	If a person goes ahead, accesses a building where they belong, now what have I done? I've listened
674300	680660	in on their credential data because they gave it to me. I can come along later, walk right up to
680660	687260	that reader, and then I can replay that data. I can simulate being that credential. And if that
687260	692960	credential is authorized to open up a building or open up a locked system, there you go. That's all
692960	697880	you need to do. Would you like to see a demo of that? It's pretty straightforward and simple here.
698400	701400	All right, let me fire up the Proxmark environment here.
702960	707800	So this is actually a lock designed to hold a shotgun in a police car in America.
707800	714640	Here's the credential that operates it. So if I pass it in front, boom, that opens up just fine,
714640	720880	right? Well, what if I'm not presenting it to that reader? What if I present this credential
721400	727340	to my Proxmark tool? And if I do a quick search function, low frequency search,
727340	733180	what do we have here? Wow, look at that. We've got a whole bunch of data. Again, this card wakes up,
733180	739080	spits out who it is, and says, okay, I'm done. And here we have up here, we have an EM style
739080	745680	credential. EM is a credential made by the Swatch Group. Very popular use in kind of low cost access
745680	751780	control systems. Once I have that unique ID, if I want to use a low frequency command, and we're
751780	758820	working again with EM chipsets, this is an EM410 style system, which is a very popular EM chipset.
758820	767100	So 410X. If I want to simulate a card, how would I simulate a card? EM410. Okay, so if this is my
767100	772060	syntax, I just need to simulate the ID number, just plug the ID number right into the command,
772060	781740	low frequency, EM tag, 410, simulate this ID, paste, boom, simulating, simulating, simulating.
781740	788120	So what's happening now? This Proxmark is no longer acting as a reader. This Proxmark is now
788120	793240	acting as the credential. It is pretending to be the credential. And if I bring it in front of the
793240	801540	locker, there you go. Simple as that. Get yourself a shotgun out of a police car. Now, of course,
801540	806060	this looks a little weird. I wouldn't want to walk around a police car and kind of like start
806060	811160	pushing this into windows. This looks odd. It would look a lot better if I wanted to steal
811160	815600	something out of a building on a test that I'm doing, if I could be carrying a little white card
815600	822700	like this. So let's go ahead and do that. Let me take a blank card that I can put on my reader here.
823640	829720	Now, if we want to check and see what is on this card, search for it. Nope, no tags found,
829720	836060	nothing found. All right, but we do have a reprogrammable chip. Okay, so instead of running
836060	842480	that simulate command, what if I want to clone that badge data onto a blank card? Well, let's
842480	850780	see if we have a nice little clone command. Sure enough, I do. And what does it want? It just wants
850780	858500	the unique ID. All right, let's go to clone, unique ID. There's our badge data. We'll put this right
858500	866080	on the proxmark. All right, tag written. Let's see if that works. Instead of walking around with my
866080	871980	laptop trying to unlock a police car, what if I just have a little innocuous white tag? Doesn't
871980	880000	look like anything special, does it? But what does it do? Works just like the original tag would,
880000	886060	because whatever was on this tag, we've copied it now onto this one. So that's the kind of thing
886060	891840	you can do with a tool like this. RFID hacking tools are really common on the marketplace.
891980	896960	And if you want to clone simple credentials like the ones you see here, you don't need something
896960	902340	as high-tech as the proxmark at first. There are a lot of really cheap tools that are on the market.
902340	907180	The famous blue cloner. It looks like this little fist gun. There's a different one that has a
907180	912600	little more verbose display on it. But these cloners are out there. You can do a lot of these
912600	917960	attacks on the low-end credential technologies, low-frequency technologies, older technologies,
917960	924300	with pretty cheap hardware. But I'm not gonna lie, the standard of the industry is the proxmark3.
924300	929860	What is the proxmark? Where's the history? If there was a proxmark2, was there a proxmark1?
929860	935520	Yeah! The original proxmark was made by someone named Jonathan Westhues, and it was made as a
935520	942120	student project just to demonstrate when RFID was becoming on the market really new, and companies
942120	947240	like Texas Instrument and others were saying, oh, this is super secure. No one could ever clone our
947240	951960	technology. It's brand new. It's impenetrable. Jonathan Westhues said, that kind of looks pretty
951960	956160	easy to do, actually. I see how you're doing inductive coupling. I could do that. So this is
956160	960460	the original proxmark, and it went through revisions over the years. He released a second
960460	965660	version of the project and started publishing more, but really it came into its own, and the
965660	970320	hacker world got a hold of it when Jonathan Westhues gave it to everyone in the community.
970320	975980	He open-sourced it in the proxmark3, and there started to become kits where people could buy
975980	982000	the parts, solder the board, they would actually hand wind their own antennas, actually tuning the
982000	988040	copper. Eventually, enough people liked this technology, and RFID became so common, and
988040	993360	hacking on it became so typical, that people started making ready-made kits. They were commercial
993360	1000240	antennas, the boards were pre-populated, but again, it was all still the original proxmark3 code
1000240	1005640	that people were working on as open source at this point. We started to see the hardware being
1005640	1012340	repackaged, so Elekhaus released the RDV2, which was like these nice integrated antennas, very well
1012340	1017960	tuned, you didn't have to fudge around with weird chunky antennas anymore. Then you have companies
1017960	1025560	making like the proxmark3 Easy, or the proxmark3 Evo. These weren't as good. They were trying to
1025560	1031500	maintain that proxmark3 name, but honestly cut in a lot of corners. Frankly, it looked like the
1031500	1037420	was going to kind of really go in some bad directions, until really amazing people,
1037420	1044540	principally Iceman and some others from the RFID research group, manufactured the RDV4. They
1044540	1050540	designed a complete revamp of the hardware package, and they've been rewriting the code base as well
1050540	1061340	for years. This is a really gorgeous unit at this point. There's really nothing else like it on the
1061340	1067120	research. Now there is, of course, a software component. You see that I'm tethered to a laptop.
1067140	1073500	You can run a proxmark in standalone mode with a little battery. It doesn't have true functionality
1073500	1079180	unless you're connected to an actual software environment, the client application that
1079180	1084300	controls the proxmark itself. You can run it on Windows, you can run it on Mac, you can run it on
1084300	1089240	Unix, you can even run it on your phone nowadays with a little Bluetooth module, which my proxmark
1089240	1094560	has. That's why it looks a little different and extra blinky. Now that's not the only tool on the
1094560	1099800	market if you're doing RFID hacking and attack like we do in the field, right? So if you've ever seen
1100060	1104720	a long-range RFID reader, you know, we're not talking again, it's not broadcast, but if you've ever
1104720	1109440	seen a parking garage where they have a reader that you can be a foot or two away from, this is
1109440	1114780	called the huntpad. We weaponize these long-range readers, and you can be about half a meter away
1114780	1120080	and still get a credential grab out of someone. This is what it looks like in the field if we're
1120080	1125240	trying to grab someone's credential to break in a building later. Here's a colleague of ours
1125240	1130380	named Dennis, and he's going to sit down, and in his backpack, he's got that huntpad. So he looks
1130380	1134540	like a person, oh, I'm just checking my messages. Oh, you're here? Oh, I'll come meet you. But what
1134540	1139360	happened? Well, the gentleman next to him had a credential in their pocket, and then Dennis was
1139360	1144660	able to grab that credential without getting that close to him. So there are a lot of ways we can
1144660	1148600	use this in the field. We do this all the time, trying to break into buildings. I'll get near
1148600	1153680	employees on trains. I'll get next to an employee in a restaurant. I will get near someone when
1153680	1158640	they're out there, most vulnerable. And if I have my backpack or my laptop bag, and it's got a
1158640	1163700	huntpad in it, I can grab that credential, and then we can recode it, rewrite it, simulate it,
1163700	1169900	clone it, play it back later. Now, some credentials try to anticipate this, right? There are some
1169900	1175380	technologies where they say, well, that RFID thing, it's not that secure. If you get near the
1175380	1180160	card, it'll just release its information. Well, what we're going to do, if you want to secure
1180160	1185640	technology, our card is better because we scramble all the data on the card, and it makes it hard to
1185640	1192300	copy. Let's think about that for a second. The credential reader wants credential information,
1192300	1197600	right? And if you have their special brand of credential reader, well, it knows how to
1197760	1203000	de-scramble the card. Here's a credential, and it talks really funny. It says, hi, my number ends
1203000	1209860	with 47, and my facility is 16, and my code starts with 33. That's kind of a dumb way to communicate,
1209860	1215820	but the reader's like, okay, sure, I understand what you're doing here. The reader fixes it, and
1215820	1220820	then passes that PAX payload up to the boss, and the door controller sees it as a regular credential
1220820	1227120	string, and unlocks the door if they're authorized. Now, that's the whole idea of the security of this
1227120	1232020	scrambled card. They say, well, you need the special reader, and without the special reader,
1232020	1236760	which we sell, you know, that company says, well, you got to buy our reader because it understands
1236760	1246740	the scramble pattern. However, let's think about this. Do I have to understand someone's language
1246740	1252460	if all I want to do is replay what they're saying? What if I just put a tape recorder up to someone
1252460	1257400	who's speaking, and I played that tape recorder later? I don't have to know what the language is
1257400	1263640	if I can copy it all in one raw dump. Remember that guy? We said a guy holds up his... Hi, I'm this
1263640	1268480	person. Can you let me in the building? What if that paper has something funny on it that I can't
1268480	1274100	read? I don't understand. What if it's in symbols? I have no idea what this paper says. You know what
1274100	1280300	I can still do? I can still put that paper in a photocopying machine and make a duplicate of it.
1280300	1285880	I don't have to care what it says as long as the reader on the building understands what it says.
1285880	1292720	That works just fine for me. Let's look at some scrambled data and talk about copying that data.
1292720	1298140	So here we have a different type of credential. This is old, old tech, by the way. Motorola
1298140	1303960	originally made this scrambled kind of card. They called it Indala. Indala's been around forever.
1303960	1308760	It's actually been acquired by HID, the corporation. Motorola doesn't make it anymore.
1308760	1314900	But if we did a quick search on our Proxmark tool, what do we have? Oh, there we go. Look,
1314900	1318880	we've got some data out of this card. And the Proxmark is even smart enough to say that
1318880	1324920	that looks like Indala. And now the Proxmark will try to de-scramble it. It'll say, I think
1324920	1330380	this could be the internal ID. I mean, this is probably the card number and facility code.
1330380	1336720	But none of that really matters to me. I can look at this big string. That's the raw dump.
1336720	1343920	This raw card data, as long as I've got that, if I want to take one of those special blank cards,
1343920	1350980	if I want to clone an Indala credential, LF Indala clone, what do I need? Do I need all
1350980	1357980	the de-scramble patterns? Not if I don't want to. There is a dash R. There's a raw switch.
1357980	1364400	What does that do? You can just throw raw bytes and shove them back into this card here.
1364400	1371920	So what are we going to do? All right, LF Indala clone, and we're going to go raw mode. I don't
1371920	1377420	care about the scramble. I'm just going to shove all those bytes right back into this other card.
1377420	1384540	Preparing, block written, done. Now this card should be the same as this card. Let's check
1384540	1392860	them out and see. Here was our original card. Let's search for that. Okay, there's our Indala output.
1392860	1400120	What about the card we just copied? If I search for that, there's our Indala output.
1400120	1406500	I don't know about you, that looks like the exact same card to me. And in fact it is. If a building
1406500	1412500	was using Indala credentials, I can absolutely walk up to the door, present my new copied card,
1412500	1417520	and these are indistinguishable to the reader and to the access control door controller
1417520	1425140	on the inside. So that's how RFID kept evolving over the years. New ideas, new ways of packaging
1425140	1430700	the data and scrambling the data and formatting the data. They were evolving all the time,
1430700	1437520	but ultimately it's still just inductive coupling with a little RFID chip. So how many different
1437520	1443340	types of credentials are there on the market now? Well, let's look at a couple of categories here.
1443340	1446660	Let's look at low frequency and high frequency. That's what we said we're going to talk about
1446660	1454120	today. There's a lot of each, I'm not going to lie, like a lot, a lot. But they all work the
1454120	1460980	same way. They all just present some user data. Especially, let's talk about low frequency, right?
1461020	1467140	If we want to simplify things, there's a couple of ways to break this down. On the low frequency
1467140	1473840	side, first of all, there is one chip kind of to rule them all if you want to hack on these systems.
1473840	1479780	And you've been seeing it as I've been writing cards on my Proxmark here. This little Atmel card.
1480060	1487960	What is this? What is the T5577? What's going on there? This is a chip that can be reprogrammed
1487960	1495280	to act like all kinds of other RFID credentials. This is part of the Atmel data sheet. Atmel is
1495280	1502200	now Microchip Corporation. So you can see this is a configuration block that we can program using the
1502200	1507540	Proxmark. And you can program all kinds of switches on this chip. You can change it to be
1507540	1513400	Manchester encoding or phase shift keying or frequency shift keying. Anybody who does RF work,
1513400	1518440	you understand there's a lot of different ways to format data. You can package the data scrambled
1518440	1525600	or not scrambled or reversed or raw. This chip can pretend to be all kinds of different credentials.
1525800	1531640	It's, you know, I can reprogram this card over and over. I can pretend to be a HID Prox credential
1531640	1537180	from the HID Corporation. I can pretend to be Motorola's Indala. You just saw that happen.
1537180	1542740	I can pretend to be another type of technology called Ioprox by Cantech, right? I can be an
1542740	1549600	EM credential. That's what we saw when I opened up the shotgun lock. Applied wireless, Jablatron,
1549600	1556740	Farpoint, Pyramid, the list goes on and on and on. This one card can pretend to be
1557300	1563980	tons of different PAX type credentials, different low frequency physical access control credentials,
1563980	1570300	even really outdated ones that no one uses anymore. It can be all those. Well, that sounds
1570300	1575980	cool, right? Like, is this a hacker tool? Is like, did Atmel make this just for hackers who want to
1575980	1584140	do RFID attacks? No, it's not that cool of a history. The reason this chip exists, and there's
1584300	1589100	a family of these chips, right? There's the older generation that, in fact, Temec made the Q5,
1589100	1596540	the T5555, and then there was the 5557, the 5567. The 5577 is one of the latest generations
1597100	1604480	of a chip the industry uses to make up for the fact that some things are just archaic in the
1604480	1611760	marketplace. Remember I said Indala used to be made by who? Motorola. Motorola sold this back
1611760	1619240	in 2003 to HID. The Motorola factory is not making more Indala chips. They are out of that game.
1619240	1625160	But HID still has customers, right? HID still needs to service these old installs. That's where
1625160	1630700	Atmel came in. Atmel said, hey, you've got a really old chip. You've got Visa 2000. You've got Honeywell,
1630700	1636880	Nexkey, Guardall. You can still support your old customers. Just use our chip and reprogram it as
1636880	1643520	you need. Well, the industry uses it for legitimate purposes. We can use it for really cool hacking
1643520	1649680	purposes because, again, this chip is meant to act like all the other LF credentials on the market
1649680	1654420	that you've probably ever heard of. So now you might be saying to yourself, neat, that's awesome.
1654420	1659300	Are high frequency tags just as simple? Like, this is a high frequency tag that I've got here on this
1659300	1665800	little key fob. Is it just as... is there one special card that can copy all of these? Not exactly.
1665800	1673800	So on the high frequency side, tech has gotten better, right? We do have more power coming out
1673800	1678760	of the reader. As the megahertz, the clock frequency, there's more waves of energy coming
1678760	1684520	out of the reader. So these chips can actually use more energy to perform more advanced functions.
1684520	1688760	Because of this, there's a whole lot of work the industry has been doing to implement
1688760	1694640	secure features, to implement encrypted sectors, to implement key exchange. They're often called
1694640	1700840	contactless smart cards in many instances. But there are data standards now. There are
1700840	1705940	working group standards that have been put out. And you'll actually see, you can read data sheets,
1705940	1711140	you can understand the commands that you use to interact with these cards. They're not hidden
1711140	1717300	in secrecy the way they used to be on the old obscure low frequency tech. Now there are different
1717300	1724420	types of NFC and contactless smart cards. For the most part, you're usually dealing with type
1724420	1731700	2 and type 4 in a lot of kind of phone situations. Sometimes type 5 for some access control things.
1731700	1738800	Type 5 is no longer supported by smartphones. Apple killed support for 15693. But let's break
1738800	1743220	it down a little bit. Why is this better? Why is this supposedly more secure? Well,
1743220	1748540	when you have more energy to play with, the credentials can actually use locking and
1748540	1753140	unlocking of different sectors. There are segments of memory on these credentials
1753140	1759480	that need to be unlocked with a key in high secure environments. How is that implemented? Well,
1759480	1763320	you know that guy who says, here's my credential, here's my paperwork, can I be let in?
1763440	1769380	Imagine taking that piece of paper, and instead of just showing it to anyone who walks by,
1769380	1774620	you put that piece of paper in an envelope. And then you put that envelope in a secured banker's
1774620	1781020	bag. And then you put that zippered locked bag in a safe. And that's how you transport your
1781020	1787780	credential around. That's a much better way of going about security, right? So if you have a
1787780	1793020	secure building, you still have a reader. The reader is looking to talk. Hello, hello, is anyone
1793020	1800020	there? Hello. And now a high frequency credential comes up with secure segments of memory. It will
1800020	1804860	still introduce itself. It'll say, hi, you know, I'm Susan. This is my unique identifier. But that's
1804860	1809920	not the security token. To do security, this credential goes, hmm, can I trust you or not?
1809920	1814720	And they do a little exchange. The chair is against the wall. John has a long mustache. Let's do a
1814720	1821460	secret handshake. Okay. Now the credential says, okay, I'm unlocked. I trust you. Then it will
1821460	1826980	unlock and offer that PAX payload, that credential data that is important for the access control
1826980	1833600	system. The reader passes that along. The boss lady looks at it and says, oh yeah, this user?
1833600	1838840	Cool. They're authorized. Go ahead. Open that door. And the door unlocks. That's the way
1838840	1842840	it's supposed to be done in high frequency environments.
1843080	1851600	How secure is this process really though? When done correctly, it's pretty good. I'm not saying
1851600	1855720	that the encryption hasn't been broken on certain technologies. There are a lot of credentials out
1855720	1860660	there where the master keys are known and the implementation of the encryption was weak and
1860660	1866300	has been broken by hackers. But let's say you have a brand new technology right off the line
1866300	1872120	that hasn't been broken yet. Is it a hundred percent secure? Well, it depends how it's
1872120	1877920	being implemented. Let's look at a memory dump from a credential. This is an actual dump of
1877920	1886460	sectors of memory from an unlocked high frequency card. Now that first block, block zero, remember
1886460	1893100	when the card first wakes up, it does introduce itself. It says, hi, you know, I'm Susan. You
1893680	1899620	a unique identifier called a chip serial number and some manufacturer data that identifies what
1899620	1905040	type of card it is. That's public. That's not encrypted. Anytime you get near a reader,
1905040	1910560	the card offers that as part of its initial handshake. But the rest of the memory on the card
1910560	1916500	is potentially encrypted and all locked up. And you can't get to that memory unless you do the
1916500	1920800	handshake correctly. And we can see on this particular memory dump, there's some interesting
1920800	1925580	stuff in here. There's definitely PAX payload data. There's credential and access control data
1925580	1932040	in some of these sectors. And those are the locked sectors, right? So how secure is this
1932040	1938660	in the real world? Well, if you do it the right way, it's great. If you use that safe and you say,
1938660	1943520	all right, you got to unlock the safe and unlock the bag and take the envelope out and pull out
1943520	1948540	the paper. That's wonderful because that credential data is very well protected with an encrypted
1948540	1955060	system. But what do you notice about this safe? There's that serial number right on the outside
1955060	1962060	of it, right? Think of that as block zero. That is the first thing the card will present to people
1962060	1969940	whenever you see it. That is not encrypted. That is not secured in any way. There are systems that
1969940	1977820	use that as the security token. Let's see what it looks like if we want to just read a high
1977820	1984680	frequency chip. What happens if I get near a high frequency card? HF search. All right, we're
1984680	1990220	searching around. Oh, there we go. This card woke up. This little credential woke up and said, hi.
1990460	1994560	And it gave me some information. Now, it's not a lot of good information, right? It just tells me
1995100	1999820	this is my unique ID. This is the CSN or the chip serial number, the unique ID.
1999820	2005420	And we have some manufacturer data. And the Proxmark tries to interpret what that is. Maybe
2005420	2012240	it's a MyFairCard. I can tell you it's actually an NTAG NFC type credential. But I don't see the
2012240	2017260	rest of the data on this card. I don't get to figure out what is contained in those locked
2017260	2026080	sectors. The thing is, in many instances, I don't have to care. There are lots of technologies out
2026080	2035040	there where they only use the CSN. This is really common in any kind of product where they advertise
2036020	2040860	interoperability and compatibility with other systems, where they might say like this Samsung
2040860	2046780	deadbolt. They say you can enroll new credentials. We ship you a few credentials. But if you want to
2046780	2052020	use your student ID, if you want to use your work badge, if you want to get more credentials,
2052020	2058440	you can enroll more credentials. Use your phone. Who cares? That's great. I love that you're helping
2058440	2065220	people out there, Samsung. But do you think Samsung has spent the time to figure out how
2065220	2070080	every one of those different high frequency credentials works and where it stores its
2070080	2074930	security payload? And is it encrypted? Is it not? How do you do the key exchange?
2075240	2081280	They don't have time for that. They want the user to have a smooth, seamless process. If I want to
2081280	2088760	enroll my hotel key into my home deadbolt, why not? Sure, let it work. They do this by only
2088760	2094920	caring about the CSN, the chip serial number. It's like this. If you have this building where
2094920	2100520	the reader is looking to talk, a high security credential comes up to the reader and says,
2100520	2106280	hello, I'm Susan. And this credential is ready to do that crypto exchange, right? Are you going to
2106280	2110820	unlock the safe? Are you going to take out the piece of paper? And they say, okay, let's start
2110820	2116200	handshake. The chair is against the wall. What's happening? This reader literally doesn't know
2116200	2121220	what's happening. It doesn't know the encryption. It doesn't know what technology that is. And it
2121220	2125760	doesn't care. It says, I got your name. Your name is Susan, right? All right, let me just tell the
2125760	2131380	boss you're here. Hey, Susan's here. And because the system is set up to say, well, the CSN,
2131380	2136180	the chip serial number is supposed to be a unique ID. That's probably fine for security, right? No
2136180	2141100	one can change that. Sure. Susan, we know a Susan. There's only one Susan in the world. Let them in.
2141100	2149560	Go ahead. What's the problem here? The problem is that you're not using any secure memory segments.
2149560	2156680	You're not accessing any of the secure functions on the chip. You're just using the CSN as an
2156680	2163500	authenticating token. You can clone that almost as easily. Again, I don't have to be a reader that
2163500	2169160	has all kinds of crazy crypto functions. I don't have to know how to unlock this credential. If the
2169160	2174580	credential immediately gives me its CSN the moment I see it, they might want to do a bunch of
2174580	2180360	encryption. I don't care about the encryption. The credential says, well, I don't know how to talk to
2180360	2186900	you, and it leaves. Do I have to do encryption if I walk up to this building? No. What's the building
2186900	2191700	expecting? It's expecting just a little chip serial number. And I say, hi, yeah, guess what? I'm Susan.
2191700	2198000	Why not? Consider me Susan. And is Susan authorized? Sure, Susan's authorized. In systems that want to
2198000	2204560	be as smooth as possible as an operating experience, they're only relying on the unencrypted CSN. And
2204560	2209760	they rely on it because they say, well, no one could... there's no way to change the CSN. It's
2209760	2215600	not like I can rewrite that block zero on this token. It's burned in at the factory.
2215980	2220680	Well, that doesn't mean I can't rewrite it on something else. Just because you're not supposed
2220680	2225940	to be able to rewrite the CSN doesn't mean you can't. There are a lot of credentials out there
2225940	2232820	now on the shady kind of places on the internet where it'll say block zero, changeable, UID,
2232820	2239020	changeable, clonable cards. This is tech that's out there now for people who want to hack on RFID.
2239700	2248860	So what we have here, this is a little NFC-enabled padlock, right? So if I want to unlock this,
2250320	2257920	present the token, that works. But part of the functionality on this lock, they advertise it as,
2257920	2263260	ooh, it's super extensible. If you have other credentials, you can enroll new credentials.
2263260	2268480	So I've taken a card that didn't come with this lock, but I've decided to program it into the
2268480	2280790	lock instead. All right. And that works as well. Cool. Now, do you think this technology is the
2280790	2286810	same as these other technologies here? No, it just happens to have a high-frequency chip inside
2286810	2293750	of it. And that means it has a CSN that'll spit out whenever you're near a reader. So if this
2293750	2302810	padlock is operating in CSN mode only, let's go ahead and do a CSN cloning attack. So we had this
2302810	2309650	right here, right? This was the serial number that spat out when we were scanning this tag.
2309650	2314870	I can actually tell you that a lot of these systems don't even use the entire serial number.
2314870	2320170	I'm just going to grab the beginning of it. And now we're going to use one of our reprogrammable
2320170	2326110	cards. So here we have a magic card, sometimes called a magic reprogrammable MyFair card.
2326110	2334910	So I'm going to say high-frequency. We're doing a MyFair credential here with set UID. And what
2334910	2343330	I want to set it as? Well, I want to copy the UID that I know works. Old UID was 1234. That's
2343330	2350990	going to be written over. New UID. Okay, this now has the same CSN, the same unique identifier,
2350990	2355170	as this card. I haven't copied the rest of the credential, nothing of the card contents.
2355170	2366780	I've only copied that UID, that CSN string. Let's see what happens. Green light, lock is open.
2366780	2371920	And I know this sounds crazy, but that's how it works on a lot of these systems.
2372500	2377140	Manufacturers want to put product in the marketplace that has maximum compatibility.
2377320	2382380	So here we have a reader by RF Ideas. This is a high-frequency reader. It's, you know,
2382380	2387780	it's sold as a super secure solution. And they even say, like, look, our reader is so awesome
2387780	2391380	because it works with, look at all these technologies. Look at all these different
2391380	2395820	high-frequency card types. There's like 20 cards here. How many does it support?
2395820	2401520	Supports all of them. Awesome. How does it achieve that level of support? Because it's
2401520	2406820	operating in CSN mode. All of these chips, yeah, it's just chip serial number, chip serial number.
2406820	2412420	Does it support any secure memory unlocking? Yeah, with two. And one of them, by the way,
2412420	2418220	Legic Prime is super broken and outdated now. German hackers broke it like 10 years ago.
2418220	2423500	So this amazing solution that supports all these credentials, wow. But are you really
2423500	2429180	supporting anything securely? Or are you just reading the unencrypted portion of a card that
2429180	2436140	was never meant to perform a security role? Now, better standards are emerging. There are
2438120	2442740	interoperability proposals. The LEAF standard is a good one if you want to research into this,
2442740	2448020	where they're going to say, look, all credentials should try to store the credential payload in the
2448020	2453600	same sector. And you should try to unlock it in this fashion. And this is how you manage keys.
2453600	2459660	And this is how you interoperate between different systems. We're not there yet. So right now,
2459660	2466040	if you buy a product and it advertises, oh, this can operate with all these different card types,
2466040	2471620	be skeptical of it. Okay, so you want to start getting into this, you want to start doing some
2471620	2475640	of these attacks, maybe getting a Proxmark or even a cheaper device that you're starting out
2475640	2479220	just to learn about this, you're going to need blank credentials, right? You want to get some
2479220	2483820	reprogrammable credentials to do some hacking, some cloning, some attacking. What are your options?
2483820	2489420	Well, on the low frequency side of the house, we've talked about the T5577. That really is the
2489420	2494080	gold standard now. And it's available in plenty of form factors. You can get cards, you can get
2494080	2499400	little fobs, you can get it as stickers that go on your cell phone case or something. You can find
2499400	2505480	them in all different shapes. For high frequency, for those NFC and other functions like that,
2505480	2511320	remember, NFC is a pretty open standard. You can read the ISO standards, you can pick up
2511320	2519320	reprogrammable tags. The NTAG family is one of the biggest ones. So you'll see NTAG 216 or NTAG 215
2519320	2525320	or NTAG 213. What's the difference there, by the way? Just memory size. The only difference
2525320	2531140	is how much storage capacity is on the tag. They were all released at the exact same time by NXP.
2531140	2535540	They have the same feature set. They have the same write endurance. The only difference is
2535540	2540000	how much memory they have. So go ahead and get the 216s. You get the most space on the cards.
2540020	2544420	But the really fancy stuff for the hacking of areas of the chip you're not supposed to be
2544420	2549260	able to modify, that's where we get into those Magic cards, right? And there's different varieties
2549260	2554000	out there. There's the old MyFair Classic, which is a very common type of credential that's a
2554000	2559200	little outdated now. That's been around for a while, the Magic MyFair card. But they even have
2559200	2564240	newer ones, Magic DesFire cards and so forth, where you can write that block zero. You can modify
2564240	2571640	things you're not supposed to be able to modify. So this is all accessible stuff. Every new
2571640	2576880	technology comes out and it's secure for a while, and then researchers and hackers learn how to
2576880	2580580	break that implementation, and you've got to get to the next page. You've got to get to the next
2580580	2586160	level. So if you want to learn more about this, if you want to do this kind of stuff, pick up some of
2586160	2591780	these rewritable credentials and start trying it. By the way, I noticed this chart's not really to
2591780	2595280	scale here. Those sticker dots are pretty tiny, right? They're smaller than the fobs. Let's fix
2595280	2601060	that. Also, what's that at the end there? That's also not to scale. Let's fix that.
2601520	2606360	You know what those are? Ever heard of these? That's right, those are implantable credentials. Those
2606360	2611260	are biohacking implants that you can insert between the first and second metacarpal of your
2611260	2617860	hand, or really anywhere on your body if you like, and they are T55 chips, or MagicMyFair chips, or
2618720	2625340	NTAG216 chips, and I can speak with experience here because both my wife and I have these in our
2625340	2629560	hands right now. We have had them injected, we've hacked on them, we've played with them, we've
2629560	2635740	reprogrammed them, and we use them for all kinds of purposes, right? One time my wife, you know,
2635740	2640340	wanted to get into a building. We had a copy of her ID written to her hand, so she was able to
2640340	2644140	access wherever she needed to go in that facility without carrying cards around.
2645140	2650220	What do I do most of the time? I don't go into high secure... well, sometimes on pen tests I will
2650220	2653980	write a badge to my hand and then people can't figure out why I'm... how am I getting this
2653980	2659060	building? You don't have a card on you. For the most part, I use it for hotel rooms. I like to
2659060	2664640	crack the implementation of whatever security is on my hotel key, clone it, and write it to my hand,
2664640	2668900	get myself in that room, and then I go to the next hotel. And again, they're rewritable,
2668900	2674240	so I can erase my hand and I can rewrite it the next time I travel and write the hotel key for
2674240	2679700	that door. So I think this is really neat stuff. If you want to get into that, well, look for a
2679700	2685020	talk at the DEF CON this summer in the U.S. where we hope to talk about this for biohacking and
2685020	2690740	implantables. But all of these chips, they are really well known and they're understood by the
2690740	2694440	hacker community now who are developing these toolkits and these different ways of interacting
2694440	2699940	with them. If you want to learn more about this kind of technology, if you're excited about this,
2699940	2704700	couple of names I'm going to give you. Babak Javadi, one of my longest time friends,
2704700	2710120	one of my business partners, great guy in the access control space, and our colleague Iceman,
2710120	2715780	right? So Christian Ehrman, this gentleman, he is responsible, again, for much of the RFID
2715780	2721280	research group's project work. He's responsible for the design of the new Proxmark. And he runs
2721460	2727360	a Discord. There is an open Discord server. Anyone can join, anyone who wants to learn about this.
2727360	2731620	It's a wonderful community of hackers that just share information. They say, hey, I've got this
2731620	2736800	new chip. I don't know what it is. I think it's low frequency. How do I decode it? And people
2736800	2740280	would start jumping in and say, well, let's try this. Try these commands. And someone else says,
2740280	2744780	oh, those commands need to be rewritten. And the open source Proxmark gets, the code base gets
2744780	2749980	updated all the time. These are the people doing it. This is the community that is right on the
2749980	2754900	bleeding edge of this technology. And if you want to join us, we want to see you with us.
2755280	2758620	Again, I was never the cool kid. But when I hang out with these guys,
2758620	2763120	I feel like I can do cool stuff sometimes. And I guarantee you can too.
