Some of you may have noticed, I'm not David Litchfield. So, I'm not David Litchfield. He's supposed to be speaking now. This is David Litchfield. Okay, I'm undercover. So, I won't be offended if you all get up and run away now. I was basically in the bar last night and I was told David wasn't going to make it and someone heard me speaking and they said, Oh, you're British, you'll do. Just get up on stage, do something. Because all Brits look alike, right? Yeah, and sound alike. And we know about cricket, by the way. Allegedly. By the way, what is the most feared question that an Englishman faces by a yank? Because I think he would rather die than answer it. Anyone else? What? No. No, but thank you for the money. Would you please explain the rules of cricket? Would you explain the rules of cricket? I mean, the rules of cricket was the question. So, yeah, if you want to run away, alternatively, if you want to get on the phone and quickly tell all your friends to come in and fill up the room so they actually pay attention to my CFP next time, I'd be delighted. So, this talk is called Aliens Clone My Sheep. You may have already seen it as RF Idiots. When I sent my CFP in, I had this great idea that I was going to do some really wacky talk about cloning. It must be aliens because I'm being told it's not humanly possible to clone RFID chips. So, since I'm cloning them, obviously it's the aliens. But since my CFP kind of vaporized, I didn't get a chance to prepare it. So, I've just changed the front page and the rest of it is pretty much the same talk as I've given on RFID. So, if you've already seen that, again, I will not be horribly offended and have the goons track you down if you leave. So, feel free. Damn, they're all leaving. Are the slides going to be on the website? Or is the video? The whole thing is videoed, so I guess it will be on the website. You can come and watch it in about a year's time when they get around to posting it, I guess. The slides, yeah. I'll create a PDF and make sure it gets posted, yeah. So, you're free to leave now. So, I'm sorry. I haven't had time to plug in either. Okay. Right. Quick introduction of who I am. Until fairly recently, I worked for a company in the UK that does secure hosting. We buy up ex-military nuclear bunkers. And convert them for civilian use. They're pretty cool. You get to see where the UK government spent all our tax money on hiding underground in dark holes with lots of very thick concrete walls. But, you know, very high tech. So, they spent millions and millions of pounds doing these places up. And then, as soon as it was ready, they closed them down and sold them to us. Thank you, Mr. Government. As you probably know, I'm a DEFCON goon. Oh, duh. Yeah. Yeah. And recently, I've been doing stuff on Bluetooth, RFID, but I'm now a full-time freelance. So, although I'm still involved in the hosting company, I don't work there day-to-day. So, I'm available for freelance work. I do weddings, bar mitzvahs. So, normally, when I'm speaking to a more corporate audience, I try and give an explanation of the kind of stuff we get up to at events like this. And I've got a little video. I'm going to show you. I'm almost embarrassed to show it here because we've got, you know, people like Deviant and Mouse and so on who are expert lockpickers. This was just a little attempt that I made when staying in a hotel recently in Miami. But it has a couple of other relevant issues. So, I'm going to show it to you anyway. And one of them is the law. In the U.K., they've just changed the Computer Misuse Act. So, it used to be illegal to break into computers. What's happening now is it's illegal to develop tools that may be used to break into computers. So, basically, what this is doing is looking at, well, what if you applied that logic to the physical world? If we applied the exact same logic to the physical world, would that make things like paperclips and pliers illegal tools? So, this is just a sort of quick illustration of that. The other thing is that I talk about... You know, not believing what manufacturers tell you. You should always check the security for yourself. And just because someone says something's secure doesn't mean it is. And don't discount the obvious. You know, go for the simple attacks first. In this case, this hotel in Miami was not just some old dive. It was a brand-new, state-of-the-art hotel. And so, it had a brand-new, state-of-the-art hotel safe in it. And I'm going to show you a little video of when me and the safe had a little fun together. Now, one of the other things I do when I'm speaking on Bluetooth is I have a couple of other co-presenters, okay? And we have a kind of competition going. Who can get the most hands raised in the audience? And you can't just say, raise your hand, because that's lame. You have to actually ask a question that's relevant to the subject you're about to discuss. So, I've come up with one which I think is going to get me ahead in the competition. So, my question is, raise your hands. How many of you have ever stayed... How many of you have ever stayed in a hotel? Excellent. I win. How many of those have ever used the hotel safe? Wow, lots of you. How many of those believe that it's secure? None of you. So, why do you use it? That's crazy. You're all insane. Okay, so anyway, this little video, it won't take long, is just showing me when I got left alone in my room. And I had time to fiddle with my safe, you guys. The voiceover is taken from the website. So, this is the manufacturer telling you how marvelous their product is, while we have a look at their product. So, here we go. Through the past three decades, we have developed the largest line of in-room hotel safes in the world, specifically designed with the particular needs of the hospitality industry in mind. Our safes are available in a wide variety of dimensions and colors, with either electronic or mechanical locking systems. Manufacturer continuously researches the development of new features, functions, options, and designs for its products. From removable core locks to a variety of electronic systems with digital keypad, credit card readers, or chip cards, manufacturer offers you products in the forefront technology. Our safes are installed in the most prestigious hotels and cruise lines throughout the world, which have recognized manufacturer for its quality, warranty, and superb technical service. Our uncompromising pledge of satisfaction to the client.... Uncompromising quality. so if you ever get your minibar and your safe confused you know where to come so yeah who's the criminal there me, the guy that made the paper clip or the guy that made the safe I can't figure it out ok so what we're really here to talk about and again if some of you want to jump up and run from the room screaming I'll understand is RFID and what I'm going to talk about is not the low level technology how RFID works but some of the stuff I've found with actually using it against itself so again don't believe what the manufacturers say, see what we can do with it ourselves and how we can bypass stuff using the actual devices without building extra circuits and so on, the original talk was RFID hacking without soldering irons and that's the main point here it's important to understand a little about how RFID works and in this case we're looking at passive chips that get activated by the reader so RFID is a little bit of a misnomer it's not actually sending a radio signal what it's doing is interfering with the signal coming from the reader so the reader creates a field an energy field, you put the tag into it it charges up from that field and then it shunts its own antenna and interferes with the antenna of the reader and by modulating that interference it sends a message so it's not actually sending out RF, ok? that's relevant because it limits the range at which you can attack these things from so it's not like you can just get a bigger antenna and a great big amplifier and expect to attack it from hundreds of feet away that's just not possible because you can't deliver the energy so that's the only reason I mention that stuff ok, so we've got two basic classes of RFID tags that I've been looking at the dumb ones and the smart ones so the dumb ones they just spit out an ID so a number, say I'm tag number 1234, possibly some data blocks. The smart cards, the smart ones are essentially smart cards. You just remove the contact chip to put an antenna in its place and you have a smart card that can talk RFID. But they behave just like a traditional smart card and those are used for things like payment cards. We have a system in the UK called the Oyster, which is the London Transport debit or prepayment card system and the new biometric passports, which we'll look at specifically as well. So the kind of things that it's getting used for, animal ID is probably one of the first. We're now seeing it in things like hotel keys as a replacement for the mag stripe. Car immobilizers, everyone's familiar with that. Events, things like ski passes and so on, one-off event passes. And one of the things I'm really interested in is the human implants, so actually sticking these things in humans instead of in humans. Anyone here implanted, by the way? Don't laugh. There's probably several. If they knew that I was doing this talk, I'm sure the room would be full of people with implants. If anyone knows someone or there is someone here that has an implant, particularly a Verichip implant, I would really like to drag you up on stage and see what we can do with you. If there isn't, I do have the equipment. If there isn't, I'll have the equipment with me, so. Okay, so looking at actually installing human implants, I don't know, is that too blurry to read at the back there? Yes? Okay, so in the wrong section, he's saying, the guy, the big, burly guy is saying, we want to implant this tag in you. And the little kid's saying, oh, that violates my rights. So he says, okay, we want to implant this tag in you, and it's also a cell phone, a digital camera, and an MP3 player. He's going, cool. Which I thought was pretty funny. I guess not if it's blurry. Okay, so here's a guy. The guy at the top is a journalist, works for a Spanish radio station. He's reporting on a beach where they've set up a scheme where you can have a prepaid digital wallet, and all of the vendors along the beachfront, so the ice cream parlors, the bars, the deck chair sellers, and so on, and nightclubs, and so on, will all subscribe to this system. And you can have a chip implanted in your arm, and you go and put money on it, and the idea is you then go to the beach, and you don't have to take your wallet with you where it's going to get stolen from the beach. You can leave it safely in your hotel safe, for example. Seemed like a good idea at the time, I guess. The guy at the bottom is working for, I believe, the Mexican government, and what they're doing is, they're implanting people, and you need the implant to get access to certain parts of the government infrastructure, so buildings, and certain restricted areas. And the reader in this picture is recognizably a VeriChip reader. So that's the technology they're using. And again, I will discuss that specifically. So the whole premise of these dumb tags which do ID only is that they have a unique ID. So it's absolutely guaranteed to be the only one of this tag with that number, right? If you go and read the manufacturer's websites, the white papers and all the descriptions will describe in great detail how their patented algorithm cannot be cloned, cannot be cloned, impossible to clone, blah, blah, blah. So, of course, we've seen people have come out with devices that will actually clone these. So last year, Jonathan West, who gave a presentation here, he built a device that would clone these. It's called a VeriChip. He's since come out with a do-it-yourself kit. So this kit, you can download from the link there. And for about 20 bucks worth of components, you can build a device that will clone the chip. So we all know it can be done. So what happens when something like this happens? The industry, of course, always has a defense. So I like to sort of imagine what happened last year when Jonathan gave his presentation, and there was probably some kind of kid from VeriChip here who saw the presentation, went back and went, oh, my God, it's game over. You know, they're cloning our chips. And the bosses say, well, that's not a problem. Don't worry. We'll come up with something. We'll sort it out. So this is what they came up with. So we're now into semantics world. We don't have to worry that they actually open doors and they are effectively the ID, because they don't look like the original. So not a problem. Second line of defense, if that isn't good enough. Some of you may remember or may have heard of, there was a talk going to be given at Black Hat Federal that got pulled at the last minute. There's no one from HID here, is there? No? Okay, I'm safe. So IOactive, they produced a cloning unit that would do the same thing for HID devices. And mysteriously, at the last minute, pulled their talk. And the two have been sort of pointing fingers at each other and saying, you told me not to talk. No, I didn't tell you. Blah, blah, blah. So full story is there. Whether they did or didn't, I don't know. I believe they've sort of kissed and made up now. But they still haven't given the full talk. But the bottom line is that a reader can't see what the device looks like. So effectively, if it's spitting out, spitting out the same ID, it is that tag. So when I was researching this talk, I did some searching on the internet. And there are loads of these things. This is not a new problem. They've been producing devices that can clone tags for years. And in fact, this last one on the bottom right is a weekend sort of do-it-yourself circuit from Circuit Seller. Build yourself an RFID cloning kit. Over the weekend. But as you can see, none of them look like the original chip. So not a problem. We're all safe. Nothing to see here. So I took that as a challenge. I like a challenge. Can I get away from the whole semantic argument and create a true clone that really looks like the original and has the same ID? So first to do that, we have to actually understand, you know, what makes up an RFID tag and how do you send the ID? The thing with these circuits is that they don't need to understand what they're seeing. They see a signal. They record it. They play it back. If I'm going to try and program a device to be an arbitrary ID, I really have to understand what that ID looks like. So the nice thing is that we're using industry standards. ISO 11784 tells us exactly what this ID looks like, how it's constructed. So the way it works is if the reader and the tag communicate with certain parameters that match, then the exchange will take place. So they use a particular frequency, 125 kilohertz in the case of the dumb tags, 1356 typically in the case of the smart tags. They'll use a particular data bit rate, which is going to be the radio frequency divided by some factor of two. And they'll encode it in a particular way, so Manchester or biphase. And then you obviously have the actual data pattern. So if we look at an example, if you were to take an animal tag and read it on a dumb reader that doesn't try and interpret the data, what you would get is eight bytes of data. And you then have to do a bit of tweaking. So you reverse it. You reverse the nibbles. You do a bit of left shifting and so on. So I've put these examples into the slides just so that you can follow it right through from beginning to end. So here's an example. 8-bit raw ID. Turn it back to front. Reverse each nibble. And then I end up with a number which I can pull the three fields out of. So I've got the application ID, 8000, that says you're an animal. Country code, F65, which you then right shift and convert to decimal. That will then be a number which is, if it's below 900, that's an ISO standard country code. If it's above 900, then it's an icar.org. Manufacturer code. And you can just go to icar.org and download the table and look them up. So in this case, the chip is Digital Angel, which is now known as VeriChip. And they will then program the national ID. So this is what gives you the uniqueness. You've got control of the country code and then the individual country or manufacturer has to control the unique ID. So obviously, if I want to create an ID, I just reverse the decoding process. So I take the 64-bit ID, add a header, add some bits. What they've got here is the header is nine zeros. So to make sure you don't accidentally get a header in the data stream, they chop the data up into four-bit chunks and add a one in between each chunk. So it's impossible to have nine zeros in a row. So now we have 128 bits of raw data with all the headers and everything we need in it. How do we deliver it? So I thought about this from the manufacturer's point of view. If I was a manufacturer getting into this industry where there's a plethora of new standards coming out and all these different RFID applications, what I would do is make a sort of super tag that could be programmed, set the parameters, make it behave the way that each application wants it to behave because that will make my ongoing cost much, much lower. So if I can think of that then obviously manufacturers can too and indeed when I searched the market I found a couple of tags that actually matched that requirement. So there's one called the Q5. Q5 you can independently configure each of those parameters. So you can set the bit rate, you can set the modulation. It has 224 bits of data storage that I can put my ID into and you can tell it how many blocks to dump when it wakes up. So the way these things work is when it goes in the field it will just sit there constantly barfing out its ID. Hightag2 made by Philips is the same idea except they've just got three sets of parameters that they call public mode. So public mode A is a particular modulation and a particular bit rate and the data constructed in a particular way and that matches the animal tags. The second type is door entry system. And the third type is car immobilizers. So the three sort of common uses of the system. So great, we found some tags that potentially could be programmed to be another one. So then I had a bit of luck. I started writing software to look at this stuff and I discovered that my own office tag was indeed a Q5. So I now had a device that I could potentially program to be another device. So all I have to do is figure out the bit rate and the modulation and so on that I need to set. Give it the data and so on and we're off. So I'll give you a demonstration of sort of what happened next. We're going to look at first an access control system. Is that readable? Is there any way we can do anything about the focus on this, these projectors? It's the projector, okay. Blame the projector. Okay, so what I'm going to try and do is, this is my door entry tag. I'm going to try and reprogram this. So open this. This door entry system. So what I've got here is an example entry system. So I've got some logic, a little battery. This would normally be connected to a door opener, but I've put it onto an LED so you can see it lighting up. And a reader. Actually, how many of you flew here? I flew here with this. So you can imagine going through security was fairly interesting. I actually carry it in my hand luggage because if I put it in my checked-on luggage, I'm really concerned that they're going to find it and take one look at it and take my bag out the back and blow it to smithereens. So I carry it in my hand luggage to make sure I can actually explain what the hell it is, right? So I was going through security and there was a couple in front of me with a newborn child. And they had a whole shitload of stuff with them. They had bags. They had nappies. They had milk. They had prams. They had everything. So anyway, they start pushing all this stuff through and the wife goes through and the baby goes through and the bag of nappies goes through and everything goes through and all that's left is the husband and the milk. And the guy behind the scanning machine says, well, you can't take fluids on board. And he's like, well, we've got a newborn baby. We're going on a 12-hour flight. We really need to take the milk. We need to take the milk along. So he calls over his supervisor and the supervisor says, yeah, of course, they can take milk on. That's exempted. That's fine. But you have to first prove that it's real milk. So I'm thinking, okay, what kind of milk is that? And the husband then has to taste each bottle and prove that it's real milk, which he does. So obviously he loves his wife and he takes a sip of each bottle. And, I mean, who knows what they get up to normally. That's the usual problem. Anyway, eventually the milk goes through and the husband goes through. But by now, as you can imagine, a bit of a sort of backlog has built up at the scanner. And in the meantime, my bag's been sitting there for a while while he's drinking milk with all kinds of shit on the screen. You know, boxes, batteries, circuit boards, wires. And now we've got the supervisor. We've got the original guy. We've got the guy who runs the screen. And we've got this big crowd of agitated people who just want to get through and me standing there. And I'm thinking, you know, if only the ground would swallow me up now, everything would be cool. So I'm thinking this is, you know, this is going to be trouble. And these three guys are just staring intently at this screen. And eventually one of them sort of looks at the screen and he looks at me and he goes, there's no fluids in there, are there? No, fine. Okay, on you go. Take your little bomb thing with you. So the world we live in now, everyone's ticking the fluids box, but if you have something that actually just looks like a bomb, that's fine. So I'm just going to quickly wire this up so you can see what I'm doing. Okay, so the way this works is hopefully you can see the little red light. If I use the right tag, so this is the real tag, if I do that, red light comes on. Yeah? Can you all see that at the back? Yes? Red light off, on. Is that good? Okay, so if I use my own tag, nothing happens, right? This is my door entry tag for my office, so it's not going to open this door. So plan A is I try and reprogram this to open this door. So this is what's called a keyboard wedge. This is a really cheap little reader. Stick it in the USB port. You present a tag to it. And it just acts as if you've typed it at the keyboard. So if I do that, that's my tag number. So I'm now going to try and write the tag with that. So this is a little off-the-shelf reader-writer compact flash. I've got a flash unit. Stick it in a PCI adapter. Get all this crap out of the way. You should get bigger podiums up here. Okay, so these tags are sold under one of the brand names that's used is unique. Okay? Because it's got a unique code, right? So I've written a little program called unique. So in theory, I've now reprogrammed this tag to have the ID of the other tag. So if I go back to my door. See the light? Can you see the light? And I'm in. So if that was your door and you just walked out of the office and I walk past you with my little scanner. You can scan your key as I go by. Or potentially I could wire up a door. Or a couple of gates. And you walk through them. And I get all the tags that go through. And then I have a nice little supply of tag numbers to get into buildings with. So that's door entry systems. The other demonstration I was going to do is animal implants. Or in particular, cow implants. I live in the country. We're surrounded by cows. So I was going to bring my cow, Daisy, along. But she got stopped at security at Heathrow Airport. Something to do with fluids. I think. So what I brought instead is my little mouse friend here. I've brutally implanted him with a chip. This is a little handheld veterinarian's scanner. Incidentally, has anyone here got a dog or a cat that's implanted? Okay, my dog was implanted. I have a... A female dog. She's about four years old now. And when we got her as a puppy, we had her implanted. And the tag was put in the back of the neck. I think that's the normal place. So when I got this, I thought, oh, I wonder what her tag number is. I'm going to see if it's compatible and scan it. So I scanned it. And I couldn't find it. And when I got a bit more confident that I really knew what I was doing and it should actually work, I tried again. And I scanned it. And eventually I did find it. And it was here. Okay. So it's just above her elbow. So it was put here. It's now here three years later. So if you're thinking of getting an implant, choose your location carefully. These things travel. It could get uncomfortable. Okay. So basically the way this works is you press scan. It'll go beep, hopefully. What I'm going to do is plug it into a screen so you can see what I'm seeing. There. So it is in that screen. So please keep that in mind. Mm-hmm. So noú Fingers crossed? Mia? We're owe nobody a lot of bail in the camera. I can if you are seeing this. So if I scan our front... Let me just make this bigger a sec. If I scan the mouse... So you'll see it gives us, or you may not see, because that's bad. So it says it's an FDXB, it's country code 968, and that's the ID, 47, etc. So what I'm going to do now is try and reprogram my tag. Now when I first started doing this, you know how when you're playing with something you get it right a few times and you get a bit overconfident and then you start trying all sorts of other things and then you get it wrong and then you find you've bricked your device. I'd managed to do that to this card fairly quickly, so not only could I not clone cards anymore, but I couldn't even get into my own office building anymore. So then I discovered, well, actually I can just buy blanks on the web. So I bought 10 blanks. And pretty soon I'd bricked all of those too, so I couldn't do any more research. And I was on a train on a really long journey, and I really wanted to get this fixed and carry on working on it. So I kind of put my mind to it, and eventually I did come up with something to fix them. So before I reflash it, I have to reset it. I actually found the master sort of reset to get it back to normal. So I wrote a little program for that. So that's now reset. I can reprogram it to be the mouse. Actually, well, when I said at the beginning we're going to do, I'm trying to emulate the same form factor. So I'm going to go one step further. I've actually got one of these implanted in my wrist. So I'm going to reprogram myself to be the mouse. So just to show you there's nothing up my sleeves, as they say. So if I scan myself now. So scan my wrist. Nothing happening. Let's just scan the mouse again. So I've got his ID. So country code 968, that's the number. So that's the number. 8,000, because I'm going to become an animal. 968. Unique ID. I'm going to write that. Okay, so it's waiting for a blank. Okay, so in theory I've now reprogrammed my wrist to be the mouse. So if you remember this number, 4708897. Just clear the screen. Do the scan. So I am now that mouse. Can you spot the difference? My wife can't. Say again? I'm a different form factor. I'm a different form factor. I'm a different form factor. I'm a different form factor. I'm not a true clone. It's true. I'm working on it. Oh, actually, no, I'll feed him up. That'll be easier. Okay, so the other demonstration that I was going to do, but it's basically the same thing, and since we don't have any real humans to try it against. One last call. Is there anyone here with a VeriChip implant? No? Okay, so I wanted to clone a VeriChip. Now, I believe that I can do that because they're using the exact same standard. Okay. But they're selling it as a security device. So there must be something about it that's unique and difficult to reproduce. And yes, there is. Remember I said it's a three-digit country code? VeriChip go to four. Ooh. So that's it. It can't be cloned. Because it's got four numbers and the standard says three. And actually, that's true of commercial software. I've gone to commercial vendors and said, can you program me a chip with a four-digit country code? And they're like, why would you want to do that? And actually, no, we can't. Our software won't let us do that. Obviously, mine, since I wrote it, will do whatever I tell it to. So if I put a code 1022 in, that's VeriChip's unique code, and it will quite happily. There's actually room for, I think, about six digits in that field. So even if they add another one, it's not going to save them. So as far as I can tell, that is their security mechanism. I have cloned chips, and I have used readers to read VeriChip clones, and it's come out fine. So what are the threats behind that? Obviously, if I can read other people's implanted chips, I can track them. If I can track them, I can target them. I can impersonate them to gain access or spend their money on the beach once I've run out of money from their wallet. Gain access to restricted areas. And actually, it works both ways. So impersonating someone isn't always just to get you in somewhere. It can also be used to prove that you are somewhere where you're not, of course. So if we were to start using these devices in things like probation, you know, proving people within the country, I could start offering a service, if anyone wants to contact me afterwards, where I just pop into the police station for you. And obviously, worst case, smart bombs that only go off when the right person or the right number of people or the right class of person comes along. Okay, so how do we protect against that? Simple answer, don't use just straightforward IDs. Put something else on top. The biometric passport is a very good example of that. We've got up to 48 items of very valuable data stored in there. Fingerprints are going to be out in the UK passports in 2010. It's already got your image, your facial image. Potentially, it's going to have the document that you used to get the ID in the first place, so your birth certificate or whatever document you produced, home number, phone, profession, and so on. Some very, very sensitive information. Incidentally, people ask me, how do you tell if you've got a chip in your passport? The clue is this little logo here. That's an international standard. If your passport has that logo at the bottom, then you've got a chip in it. If you're from the UK, there's another clue, which is there's this damn great chip in it. Looks like that. Not all countries, it's that visible. Sometimes they're hidden in the colors, some countries have a thick plastic page and it's embedded in there. We've got some stuff in there. We need to protect it. How do we protect it? They do two things. One is, unlike the unique ID devices, they do exactly the opposite. They deliberately don't give a unique ID. They don't want me to be able to say, I've seen that passport before. I know that Joe Schmoe is now stood in front of me. If I ask the passport for its ID and nothing else, it will just give me a different number every time. Sudo. It will give me a random number. The other thing is strong authentication. So before I can read any data from the passport, I have to actually log in and authenticate to it. And I do that using a standard called basic access control. The important thing to understand about basic access control is, you don't have to do it, but if you do it, you have to do it according to the standard. So every country will follow the exact same procedure for locking down the passport. And they use a three days. So you have to have a standard algorithm for that. In addition to that, you can encrypt the content. That's called extended access control. I haven't seen any passports doing it. But if you do it, it's up to you. There is no standard how you do it. So the standard that defines the passport application says, you may do this, but you don't have to do it in any particular way. So I don't think it's going to be particularly useful until that standard is agreed. And once it's agreed, it's going to be widely known and therefore presumably anyone can do it. But if we look back at basic access control, you see it's using three days. So anyone know what kind of cipher three days is? Broken. Well, maybe. It's a symmetric cipher, right? So you have the same key on both sides. So unlike public key where you have a public private key, both sides have to know the key. So in order to be able to read this passport, I have to know what the key is. We've got all this super safe data. So we're going to store our key somewhere really safe, right? Yeah, we print it on the passport. So the way you derive the key for the passport is you read the MRZ, which is the machine readable zone. You take the passport number, the expiry date and the date of birth. You glue them together and that's your key. That's the same for every passport in the world. So I'll give you a quick demo. I'll give you a quick demonstration of that. I'll just have to quickly edit my config file. So again, I'm using a commercial off-the-shelf reader. Runs at slightly higher speed. Now, normally the procedure would be you hand this to the guy at the passport control. He swipes it through an MRZ and then he reads it. I don't have one, so I'm going to type it in, but I've pre-typed it so you won't fall asleep while I do this. Okay, so it's logged in. It's read some data. It's now reading the rest of it. So you can see it's got the basic name, date of birth, passport number and so on. It's now reading one of the biometric files. So that's the image stored in the passport. As you can see, I was much better looking when that picture was taken. Actually, that's my son's passport. He's not allowed to travel when I'm speaking. In fact, he was actually in Estonia last week. Nothing to do with the problems they've been having out there, I assure you. And I was a bit worried, what am I going to do for my talk? I don't have his passport. So I arranged that my flight left the day he was coming in. And I called him up and I said, Hey, you're flying into Gatwick, I'm flying out of Gatwick, I'll meet you. We'll have coffee, it'll be nice, we'll have breakfast. It's his birthday next week, I'll give him some attention. So he shows up and I meet him at the gate and he's like, Hi Dad, how are you? And I'm like, oh, I'm great, yeah. Let me see your passport a second. Oh, cool. Anyway, see you, I've got to go, catch my flight, bye. So I've got his passport, he's going nowhere. So basically, I've read all the data out there. I now have an exact digital copy of the data that's stored in this passport. It's already been demonstrated, you can just write that back to a blank. There are no anti-cloning mechanisms. And it will be indistinguishable from the original. There's also no anti-brute force mechanism. So if I didn't know the whole of that number, I could say, put two question marks there instead. And it'll just keep trying. So you've got a challenge response, challenge response, fail, fail, fail. And I'm going to be in there in a minute. So one of the questions I get asked is, okay, so you can read it, but you can't change it. So what's the big deal? And until recently, the answer was, well, you can change it. Because on the passport, the way it works is, these files, there's a cryptographic hash. So they're all signed. So I read the file that has the name and address and so on. Okay. So I read the file that has the image. I read another file that's called the security object. Security object has within it a certificate and a bunch of signatures. And what you do is you check the signatures against the signatures on the files and then you check the signature against the certificate. And if they all match, then you know it's genuine. Can anyone spot the deliberate mistake there? Okay. The thing I'm checking and the thing I'm checking it against have both been delivered to me by the thing. Yeah? So why don't I just sign it with my own certificate? And put the new certificate on the device. Okay. So there is actually a cure for that now, which is good. There is a thing called the PKD, the public key directory. So that you can now connect to the PKD and you can download a certificate and you can check that the one on the passport is actually the valid one. That's only true of April this year. These things have been out, what, three, four years now in some countries. There are 28 countries. There are 28 countries participating in this type of passport program. And yet there's only 15 countries currently using the PKD. I think they only ratified the design for the PKD in sort of July of last year. So I'm very dubious as to, you know, how wide this and how well this project is actually maintained. But anyway, before that happened, I had a look at how hard it would be to create a fake certificate and do the signing. So this is one I pulled off a New Zealand project. This is my passport. And this is my forgery. So if I flip between the two, you can see the only thing that's changing is the crypto modulus. Very easy to produce a fake that looks the same. So again, the threats that come from this. We found that the key data, because there's no anti-brute forcing, if you can obtain some of the key data through other channels, then you can reduce the brute force to such a small space that it's actually doable. I believe in Holland, they've got it down to two hours. So they can actually brute force an arbitrary passport in about two hours. Two minutes? The other thing is passport profiling. So even though I can't read the passport, I can probably tell where it came from. So without logging in, because of the implementation differences, I can say that's an American or that's an Australian or that's an English passport, which again could be bad. Okay, I've got to wind up really quickly. So this software, everything I've used today, it's published, it's open source, it's on rfidiot.org. Feel free to download it. The hardware I use is available also from that site. You'll probably find some suppliers in the US that are going to be cheaper than buying them from me. But if you want to buy them from me, that will help support further research. It interfaces to those manufacturers, so ACG, FROSCH, PCSC devices, so OmniKey, for example. And there's a cool project coming along called OpenPCD, which is a completely open source implementation of an RFID reader. I'll take one question before I wind up. Where's the bar? Yes? Why do I have a chip in me? Okay, I'm crazy, but I'm not that crazy. It's not really, it's in my watch strap. Okay, that's me, I'm done. Thank you. Thank you.