 So I got a warning so I will not cover any US products or any US company issue and I'm not here to give a demonstration but we will go over the technology a little bit agenda for my speech today something about the motivation why we got this electronic passports what does the government think about electronic passports some basics and probably you you heard about this cloning thing who of you guys knows about cloning passports only few so I will cover this and how to use a clone passport to attack the systems like the reader and the inspection database behind we will cover some stupidity on the basic access control and the extended access control the extended access control seems to be the silver bullet against cloning and doing everything nasty with it and some unexpected risks at the moment so all of you guys know what is the motivation to get biometric into the passports and for the visas this is actually the recovered visa they found at ground table so I don't know if he's still on the watch list but they found some evidence that he is involved so that was the main motivation to raise the security for the US borders and to improve the border security by using biometric solutions there was this initiative so the government after 9 11 got a dream and the dream is telling so we have to divide high-risk travelers from medium-risk travelers and lowest travelers if one of you guys come in the first time to the states they have to create a file on you put your fingerprints in and a picture of you so you are at this moment a medium risk travelers at the moment you're crossing the border about 100 times a year and nothing happens and you're not on the watch list you are a low risk traveler and if you are coming from a suspected country or you have a common name like Mohammed at something like this you end up on a watch list and be investigated as a high-risk travelers and the government dreams about this automatic multi biometric entry gates so there's a normal passenger just waving his electronic passport putting his fingerprint on it or looking with his Irish scan into a camera and the magically the door opens and he is in while for the medium and high-risk travelers the door stays closed and they have to check an inspection officer and the officer is making investigations and by the way it saves a huge amount of money on personal especially for European entries asking the security notes and all the security stuff over the time and these are general and global print shops they know how to produce micro ink they know how to make counterfeit safe banknotes they know how to use special holographs and putting it in and making special sewing on your passport cover and gluing it together so it cannot be split anymore and stuff like that but as a known for IT security know how do they have a history on IT security on cryptography no so they have never done actually an IT security project so what's coming out is this security print shops are going to ask the smart cut industry and now we got a problem the smart cut industry is focused on selling their products and advocates multi-purpose use so some of the original ideas for the electronic passport you would have a multi-purpose use we will get the identical design for the national ID cards this card can be used for electronic banking for e-government you don't need to go to your DMV you just put in your ID card and to a reader on your PC and you can cryptographically signed electronic signatures and don't go in person anymore even in Estonia they made this year they have something like multi-purpose smart card based ID card they made this option so that the citizens are allowed to vote using their ID card and normal PC and use it for email encryption and ID and travel document as passport and of course for electronic payment sounds it nice one card that fits all and let's have a look of the design goal so they want to use cryptography in PKI the best thing is we put all biometrics that's possible into this card if you got more biometric you got a higher safe level and of course it would be 100% secure and improve the facilitation something like a minimize time spent on ligament revelas once again sigmetting low and high risk revelas and minimize immigration time are all wonderful and then they came up with a design approach from the IKO and the IKO was setting up a standards group and all this group is stuffed with printing experts so they know how to make secure passports but even know IT security expertise and pretty soon they discovered oh we need some experts on the crypto we need to do crypto at the first design approach there was no cryptography so they thought oh we just put in the files into a storage and that's it and the very first IKO design doesn't care about cryptography and this scares even some experts at the governmental level and said no no no we cannot use we have to use cryptography otherwise it will be a nightmare so but no one knows anything about implementation and the whole thing now what was driven by RFID manufacturers and of course no one looked at risks and design goals you all know this keep it stupid and simple but they unfortunately don't know it and by the way the industry got a new standard for biometric encoding oh we got new encoding we have to put all this together into this passport and the next problem they found out was they got a problem with patterns typically if you store biometric data you are looking only for some points of interest like from your fingerprint and generate via tractor algorithm a type of hash and this hash ends up in a database so they don't put actually a full picture of a finger printed to a database they're just putting in the hash so it makes things easy to compare it's always easy to compare about the hash and look for collision but it's a tiny difficult to compare images even if they're put from different angels and angels and stuff like that so and as well as IKO decided to store if the facial image of the passport order like it as a JPEG or JPEG 2000 and they decided doing the same with the fingerprint the problem was all the most hash algorithm was patented by one or other company and if they want to use it on a global basis they have to do a decision for one hash algorithm unfortunately all this hash algorithms don't fit with the national fingerprint databases so every country is operating their own fingerprint database and using a slightly different hash algorithm and up to this time it was for instance not possible to compare a fingerprint from a US citizen using a hash from the FBI database with a European Europol database because they got complete different values so they decided just make a picture of the fingerprint and put it into the passport and we got here some compromises but we all know compromises don't work with security at all so let's have a smart x-course how the e-passport looks today and how the e-passport is implemented from the German point of view by the way all this pictures are public domain I put the reference behind so actually as far as I know I can use it for this talk so the e-passport is most likely called MRTD this stands for machine readable travel documents and is known as electronic passport the specification was one done by this experts groups from the IKO and the enrollment was planned on it on a global basis this is one actual picture from the e-passport from Germany they decided to embed the RFID tag into the cover and not into the data page normally you have one of this plastic covered page where for instance Great Britain or Australia put things in the RFID tag and they decided we don't need a shield the passport could be readable even if the passport cover is closed by the way this is one of the decisions why the Germans can microwave the RFID ships in the e-passport and the British can't and no one sees the marks from the burning if the RFID tag is embedded into the cover if you do it with a British passport you most likely melting some plastic on this page there's an alternative method of storing data so right now it's possible to store biometric data or hashes as a 2D barcode under the facial image and we have this line it's called MRZ that stands for machine readable zone and this will play a second role for authentication and cryptography if you look deeper at the electronic passport so let's look for the data layout of the electronic passport they invented a huge branch of new coal names we have to deal with the LDS that stands for logical data structure and the data is stored in DGs DGs data groups some of the data groups are mandatory other optional some of this data groups are like slightly controversial discussed for instance that the British wants to have an Irish image inside the data group the German decided not to use Irish images you can look for the actual health status if you do the immigration and you can check if someone was consuming drugs or alcohol it's not a problem GB but probably in Germany so and it's not illegal in Germany to travel to travel drunken as soon as you're not driving the car and so they decided not to use the Irish image in Germany we have a special file that's called EFSOD SOD stands for security object data and this is a file that holds the cryptographic signatures and we have the EFCOM you can compare to a directory that lists the existing data groups all data is stored in VR encoding like ASN1 but it's not ASN1 that's important and the data group 2 up to 4 uses CBEFF for encoding this is a common biometric file format it's specified in ISO 1, 9, 7, 8, 5 we have in Germany some unique security features so normally if you activate an RFID ship you've got a unique ID this unique ID is fixed for each RFID transponder ship and this unique ID is needed for anti-collision unfortunately with this unique ID you are trackable and traceable without knowing so just to install read at the gate they know who you are and that you are holding a passport and stuff like that so they decided to to prevent tracking of the owner of the passport without access control by generating random serial numbers for this RFID ships so actually they produce a special tag and the special ISO 14443 tag can jump after it gots started or awaked by the radio field and use the random number generator and use this random number as unique ID and by the way you can use this random number generator just to put in any ID you like so another way to cloning RFID ships and the problem is Ikea MRTD specification don't require a unique serial number so by the way some countries will generate random ID and random serial numbers some countries don't so for instance some guys from Belgium and some guys from Australia highly trackable and traceable without a shield and carrying a device that identifies they exactly and for the Europeans offer the experts of the Germans and the British it is slightly a bit more complicated to track them but it's still possible but for the first phase you get this unique ID and they put in a method it's called passive identification and this method is mandatory for all passports and this method is the proof that the passport files are signed by the issuing country so if you get an passport each issuing country is operating your own CA and this CA is signing the hashes of the data of your passport and with this private key signed the public key can prove at the border control or at the entry if this data are manipulated or original that's all in theory and the document signer key is retrieved from the public key directory that's operated by the CAO and useful only if country would CA is known so actually this public key is right now as far as we know hardcoded in the R4D readers they read the passport and the inspection. This is a slide showing how the signed data works so we have all these different data groups then hashes generated over each of this data groups and over a list of all these hashes they are generating a type of master hash and this hash over the hashes of the data group is signed by the country CA and stored at the EF sort. By the way who of you guys thinks putting a passport on the monitor is a secure and safe way to hide it? Isn't it a nice idea? No one can read my passport because we put in a cryptography so they have this method it's called basic access control and actually they're using the credentials they are printed on top of your passport so to grant access to the data after the inspection system are authorized the authorization is done through the machine readable zone so what they're actually doing is they are generating over the document ID and your six digits date of birth and the document expiry date and triple S key and using it for identification against the passport to read your data that are stored on the passport and that's exactly what they're doing to protect the privacy of the passport holder even some European passports for instance Belgium don't have basic access control they can be just read by walking through and yeah so what do we have with the basic access control so the access key is printed on top of the passport and what politics is always denying oh it's illegal to make copies of banknotes it's illegal to make copies of passports who of you guys experienced that his driver's license or passport was put on the Xerox machine because you want to rent a ski or you want to check in a hotel and it's highly crowded and yeah we got some up and they're just making a Xerox and you don't know what's happened with this document anyway all this data needed for accessing the machine readable zone is as well stored in many private databases like airlines banks and so on credit history and no one knows what's happened to this database if there's identity theft or someone breaks into the database and retrieves all this data and as soon as this data unknown there's no protection for your facial image for your biometric template you can just tracked traced and read from behind so and you don't need to do a full read of the passport it takes sometimes up to 40 seconds but if the data unknown you can just start with the basic access control handshake and you are still traceable so the random unique idea is simple worthless if you have access to the data you need for generating the access key or to generate the first phase of communication to your electronic passport and access to the content of the logical data structure data would want it to is possible even access to the SODS possible so you can try to run a brute force attack against them the company signing CA after my last talk last year at blackhead I mentioned this I make a small demonstration and they are telling us oh yes but you know basic access control was just today today and we will have in the future extended access control this will take care of all this needs and this is a highly cryptographic thing and you don't have to worry about your privacy anymore so what's the idea of extended access control the extended access control should prevent the unauthorized access to biometric data unfortunately it's not international standard so each country decides what data they want to share with what exact country and it's implemented by the individual issuers and only share with those countries are allowed access so in theory for instance if Germany wants to share the fingerprints and the biometric data with their citizens between the states they're setting up a deep project for exchanging certificates and algorithms and putting in additional software into the readers and they are pointing out that access is only possible the certificates from the suing countries so if at the point of entry at the port or at the airport the inspector wants to read your fingerprint by the way it's a gift image and you need to get a certificate from the suing country and they are telling all the time this certificate is only valid a really small amount of time and only at this small time slot you are able to read the biometric data from the passport hmm unfortunately just imagine you're a train conductor and you have to check if the tickets are valid and if the passengers on the right train and if the ticket are for the right term date and time but you don't have a clock so how do you check it how do you check if the ticket is valid and we got the same problem because they forget to implement a clock inside the machine reader travel document so you've got a small amount of time you got a certificate for unlocking the passport and for reading the biometric data but the MRTD does not have any reliable and secure time information and without this time information once the CV is captured all MRTDs which has been read using a CV certificate that's the name of this unlocking certificate issued earlier could be accessed without any problems and the MRTD could not verify the validity of the timestamp from the CV certificate because he don't have a time signal he don't have a time date so he cannot check but you know the politics are telling you we are safe we have only a issued certificate for a small amount of time even they're going to save the last time of access and if the next CV certificate has an earlier date it's going to reject so if someone is using a full CV certificate there's an issue for this an issue date far out in the future the path is rejecting all earlier CV certificates so what possible attack could be just faking GPS or just faking GPS time signal for the data center they are issuing in Germany the CV certificates and trying to put the clock of the servers up to 280 and if they're not using windows or Unix machines and don't have this problem this is 32-bit clock overwrite and year 2000 problem most probably they can issuing certificates from the year 2080 and deactivate all issued passports with extended access control because after they fix the time all the passports get deactivated the next problem is a vote regime could misuse the CV certificate to obtain fingerprints from the passport holder you know the fingerprints are stored as a GIF image so you can make fake fingerprints and this is fake fingerprints it's possible to produce false evidence and the next glorious idea was we're using X 509 certificates but it's not possible to revoke certificates from the MRTD so CRL is effective not existing and everyone verifies seems to be secure but it's not possible to revoke a certificate so why do we clone passports last year we got a huge media attention on this and they are telling us cloning a passport is just normal behavior there's nothing dangerous on it and you don't have to care about this because it's all cryptographically signed so the normal text inside the passports are actually read only and data could only be retrieved from the issued passport and one idea is just retrieve the data from an issued passport just read it then you have to microwave your original R4D ship from the from the state and now the clone tech behaves like an official e-passport and that's where the fun part starts but what the industry is not understanding I had long phone conversations with the head of research and development from an e-passport reader company and she is just not believing oh if something is not put in the right way we are triggering an exception everything will be fine but you can put in an exploit and extend your official passport and putting in some malware inside the MRTD and the nice thing about this exploits this that could attack inspection systems as well backends or databases behind this and you can imagine what's inside this database behind your passport inspection system and I guess they are using some standard of the shelf components like oracle or dv2 so what's happened if someone is using a drop database or an alter table or just changing some data inside now let's have a closer look to the inspection system first of all there came this all inspection system should be evaluated what does it mean no one is telling us what does it mean to evaluate an inspection system right now they're using off-the-shelf PCs and off-the-shelf PCs are far too complex to be formally validated for correctness otherwise we don't have to deal with malware with viruses with crashing operating system and stuff like that then that is how to use JPEG and JPEG 2000 we all know JPEG 2000 is a very complicated format you can easy produce huge images allocate a huge amount of memory it's easy to exploit I put in some CVE numbers we found about JPEG 2000 exploits and we got this nice tools like Metasplot and other toolkits that make it really easy to put in some shell code in your passport isn't it nice and that's a vendor actually a vendors design of an e-passport inspection system you know it was designed for Windows XP even not for Vista so and actually we found no security improvement to the software the stack is still executable and imagine what's happened if you just ask an officer oh did you mind putting in this USB stick into your inspection system and make it double click on this program you think they're going to do it but they're putting your passport on a reader and there's a difference it's just memory 72 kilobyte memory that's got read into his machine and executed that's a nice thing they just don't look for the procedure so actually the LDS is passed part by part and after the whole structure from the passport is read into the reader into the inspection system it can be validated just after this so they have to build all these hashes inside the machine and then after they have decoded this highly complex tree of ASN1 BN coding after they got through all these different stages and highly complex processing units and I know what I'm talking about we have implemented this e-passport design and it was damn hell of coding because they don't care about standards so after all the thing is decoded and passed and not exploited and all the structures are happy as they can validate so first they read the data then they pass the structures after this they have to decode the payload and finally this they can verify the document cryptography it's something like you go to an ATM you put in your card then you get the cash and after you got the cash you put in your pin number and they are telling you is it right or not cool isn't it I would like to have such ATMs so and right at this moment many vendors are happy if they can read the passport from a different vendor so they have actually the problem to read the passports and no one has checked for illegal structures or even for some malware onto it the next problem we have to deal it our biometric data so it's this moment data should be reduced to hash only but fingerprints are still thought as pictures so reverse engineering of fingerprints is possible and this is compared to any best practice in IT security don't give up your credentials and even don't make them public available and we got this nice chaos of standard so all the experts from the Ikea now only have to use as and one you know how as and one works normally you have a legs you generate a grammar you put in your data structures in C and they're putting in into it this or you make a formal description of the as and one data structures and as and one generator is generating a parser for you and an encoder so you got two pieces of software and then you put your payload through this encoder you got the data encode in as and one and after what you can put it to the parser it's like valid XML and you got it back in your C data structures but unfortunately they don't ask a student in the first semester who knows how as and one works they have done it a different way they make the encoding by hand and they make as mistake without generating a legs they saying oh we have to put encodes this in this specific byte pattern and the structures actually not valid as and one so it looks like as and one it's 90 percent like as and one but you cannot use an formal as and one encoder because it's not like as and one they just don't understand how such meter formats encoders are working the next problem is we have a lot of redundant meter formats for biometric data and they use JPEG images but they encoded the JPEG image in a different meter format like the CB EFF common biometric file format you know why oh the industry for from the smart cut and already came up all we designed a cool format no one is using it we have to put it into the passport the next problem is if a signing he got lost the whole country is doomed I'm pretty sure sooner or later some of these keys got lost not in the US probably not in Germany but they are far too many countries outside we have sometimes problems with the structures in the countries sometimes we got the country that converts to a work to regime we have sometimes political instability and in some of these cases it's most likely that a signing he got lost and then anyone can produce this false passports and the whole design was made by politicians and not by T security experts and of course it's possible to manipulate data so I went with a short version of this presentation to to a K meeting or to the security document word and I got a huge amount of very interesting quotes the first one trust us we are the experts we know what we are doing the next was a nice quote from one we removed the standard from the Ikea website now we are safe the next standard is it's for my own State Department in Germany so the world was using the primary purpose of the passport he read it there's no security risk at all and the next I really like I really like this the R3D ship will be protected by security features of the printed paper in the passport wait a minute why why do we make this R3D passports we want to raise the level of counterfeiting passports with biometric data and normally the R3D ship would increase the security and not needs to be protected by the printed paper of the passport so where's the need for an R3D ship if the ship must be protected by the printed paper why can't my person protect it by the printed paper as well and we just forget all this R3Ds I don't know and the next quote is one of my favorite once again after I gave this presentation it's a security document wrote in London a couple of high-level passport security experts are here and they're denying there's any problem and after I gave this I got that really nice quote it's right that their security flaws could harm an IT system but we have to keep in mind the E-passport is a security document and has nothing to do with IT systems but it runs on Windows XP so isn't it funny and if they don't change their thinking about IT systems and structures and how to audit the state things and where the risks and pitfalls I don't know how can they I don't I have no advice for them they are experts out in every country they are IT experts they are experts on structures and encoding but if they don't listen to them it's not our fault so and that was pretty much my update for the last year what we have done on electronic passports and we can start the question and answer session first that's here and after I'm finished here I think I'm moving to the Q&A room for additional question and answers so yes yes the question is why are you still keeping the R3D on the passport if there are some questionings and one of the besides is they wasted so many taxpayers money they just can't tell us oh sorry we are wrong by the way we wasted billions of dollars worldwide but we have to live with them so I think it's about personalities and reputation of the print shops and it has nothing to do with IT security and anti-terrorism and counterfeit documents yes I have done some tests with okay so the question was what happened if manipulated pictures get through an RFID reader or get through customs so I've tried this with some manipulated images at a conference I'm not going to tell what conferences was and not the vendor but actually one inspection system gets in an infinite loop reading the things and another just crashed so we got a blue screen and if you are able to get a blue screen you're most able to put in exploits everyone is welcome to prove I can't check you with any US passports but if some of you guys have one of this US passports properly you will be here next year at my position and presenting us the ultimate if inspection database take over world domination inspection owned applet just to apply to a new S passport I can't do it but I don't know if I inspire some of you guys next question yes actually they don't know how to do it they don't ask anyone who knows anything about IT security so and they had such huge time pressure and they want to do it all on their own so the group from the IKEA was a pretty closed group and they don't want to get as many external experts in because it was so complicated at that specific level the industry wants to push in so many different standards and so many different encodings they just want to keep the group as small as possible to make effective working so that was my point and I got a quote from a German passport manufacturer and he is telling me oh I know we know the whole thing is junk the whole standard is junk but we have to live with it and we cannot change it anymore next question yes can you speak up a little bit yes there are many parallels one of the problem is every time you want to create a protocol or security protocol by a committee and by compromises and not by public discussion you end up with such a mess like this IKEA passport so my advice would maker see of it put it on the internet make a public discussion ask the group for experts ask the security experts and not make a design by committee mostly the crowd is just smarter than you are next question okay and thank you