Trouble for OV chipkaart?!?

We are on the verge of introducing a new payment system for public transport in the Netherlands. This so called ‘OV Chipkaart’ uses an RF-ID based payment system and is already deployed on a small scale. In less then a year it must be deployed nation wide.

http://commons.wikimedia.org/wiki/Category:OV-chipkaart?uselang=nl

As with all huge government IT projects, the stakes are high. We all know the government does not like to lose face, especially in large IT projects. This project already suffered from delay, but as it seems now this delay might be a blessing in disguise … as the OV-Chipkaart system uses Mifare classic (*) …

I guess we will soon hear more about this …

* source wikipedia: The OV-Chipkaart is based on Philips (currently NXP Semiconductors) Mifare technology. The regular cards (anonymous and personal) are Mifare Classic 4K cards with about 4 Kilobytes of available storage. These cards are locked for both reading and writing with keys only known by the card vendors. The temporary passes are cheaper Mifare Ultralight cards that do not employ encryption or keys, and can be read by anyone.

Update 21:00 Someone pointed out the OV-chipkaart FAQ (translated from dutch):

Q: Is the OV chipkaart protected?

A: Yes, because the OV-Chipkaart could potentially contain great value, we selected a chip that already uses a high security level (mifare). Besides that, additional security measurements are taken ‘in the application on the card’ as well as on the terminals.

Note: So I guess we have nothing to worry as they added some additional proprietary security measurements …

14 Responses to “Trouble for OV chipkaart?!?”

  1. Francis says:

    Two things. One get a http://www.difrwear.com/ wallet. They work and is still a decent wallet. I’ve got one for my key cards at work. Never mind the rest of us don’t….

    As for the security on the Mifare, only the “basic” security (read: no security”) and the “mark 1” cards (I think.. they’re old about 10 years but still in use.) are problematic. But mainly to the extent that they can be cloned. But it doesn’t sound like the temporary passes really need much protection. As for the other type, we can only hope they used AES and do a fair amount of fraud checking in their db. And if possible rotate encryption keys over time. Having the cards expire are a good idea. From that talk you linked us to, it looks like the newer cards should still be ok. For now…

  2. DWizzy says:

    Oops, guess my previous comment wasn’t submitted.

    Congrats on making the news again, just heard on the radio about “the guy who found out about insecure voting computers” visiting a conference where two german hackers showed how to hack the technology used in the OV-Chipkaart.

    I suppose indeed a demonstration will be the next thing, as in my experience, TLS isn’t susceptible for technical problems.

    Francis: the DIFRwear wallets aren’t the cheapest, and their design doesn’t seem 100% ‘watertight’ to me. I use a cheap anti-phone back from Hong Kong and for added sillyness, some aluminum foil in my wallet.

    I thought it was spelled RFID, by the way.

  3. Barry says:

    Dwizzy: that is Rop, not me 😉 Dutch media woke up and are on to it …

  4. DWizzy says:

    Wait, there is another voting computer hacker? 😉
    Just noted the Volkskrant article.

  5. Eelco says:

    This news became the main article in the ‘Volkskrant’ this morning…

    I am curious if it is actually possible to abuse the system with knowledge about the Mifare chips. In my opinion it should be possible to block copied cards by implementing a simple anti-fraud system that writes and reads a random value everytime the card is exposed to a node. Also, it should be possible to detect cards that have illegally upgraded value with server side generated checksums, transaction logs, etc. The risk to get caught would be high… but hackers being able to tamper with the system is of course a highly disturbing thought for those who liked the OV-chipkaart in the first place.

  6. Henryk Plötz says:

    Of course it’s possible to prevent misuse by ‘simply’ managing and verifying all information in a back-end server. However, that would mean that all reader and verification devices would need to be constantly online. As previous research by a group of students (Pieter Siekerman and Maurits van der Schnee) at the University of Amsterdam has shown, at least some of the readers in the ov-chipkaart system are offline and synchronized at most once per day. And also by completely relying on the backend system for security you would lose most expected benefits of using Mifare classic over Mifare ultralight. If you would do that, you might as well only store a database identifier on the card and do an online lookup for the corresponding entry on every transaction.

  7. henk says:

    >However, that would mean that all reader and verification devices would
    >need to be constantly online.

    For many readers that wouldn’t really be a problem. Quite a lot of them are deployed at stationary locations in stations (for entry to the tracks, or when buying a ‘virtual’ train ticket at the NS ticket machine).

    For mobile readers (in busses and trams) a UMTS connection might be an option. Otherwise, the bus might do a synchronize over wifi when passing along some major stop. That wise synchronization might be done several times during a ride. Someone doing some major fraud will run the risk that the fraud attempt is discovered when still being on the bus.

  8. Karsten Nohl says:

    As Henryk points out, the problems of the OV-card don’t just arise from insufficient cryptographic read protection (or complete lack thereof for the temporary passes), but also from the overall system design.

    To resolve some confusion about our talk we issued this statement:
    http://www.cs.virginia.edu/~kn5f/OV-card_security.html

  9. Barry says:

    Hello Henryk and Karsten,

    Thanks for your comments. I was already wondering what car system used mifare 😉

    The current status is the responsible company (Trans link systems) is claiming ‘no harm is done’ in respect to the OV-Chipkaart, and that there are ‘other security measures’.
    Furthermore they brought out a press-statement saying “Trans Link Systems assigned TNO to perform independent research to confirm our claims”.

    Read that sentence again: independent research, to confirm our claim. Is the outcome part of the assignment?

    Anyway, I seriously hope both the assignment and the outcome will be fully published….

    It would be a lot better if the government took over and had the investigation done themselves by TNO or the Dutch Bank.

  10. Barry says:

    Some of the top Dutch IT security specialists wrote a statement about the OV-Chipkaart situation. Will try to translate some of it later ….

    Infrastructuur voor openbare diensten vereist veiligheid en transparantie

    Het Nederlandse OV-chipcard systeem waar de afgelopen dagen veel over te doen is geweest is gebaseerd op de Mifare chips van leverancier NXP (voorheen Philips Semiconductors). Er is al eerder angetoond dat de beveiliging van de simplere wegwerp-kaarten te kraken was. Toen ging het om de “Mifare Ultralight” kaarten, en het gevonden lek is inmiddels gedicht. Op de wat duurdere en naar verluidt veiligere kaarten is voor zover wij weten de ‘Mifare Classic’ chip gebruikt. Deze chip is in staat om de communicatie met de lees-/schrijfeenheid te versleutelen. De kaart gebruikt daarvoor een ongepubliceerd versleutelingsalgoritme. De werking van het gebruikte algoritme is achterhaald door Duitse onderzoekers, waardoor de gebruikte sleutellengte van 48 bits niet meer voldoende is om de veiligheid te garanderen. Het is nu mogelijk om alle mogelijkheden te doorlopen om zo de sleutel van een kaart te achterhalen. Dit wordt verergerd door het feit dat de ‘toevalsgenerator’ op de kaart uit te weinig verschillende mogelijkheden kan kiezen en de implementatie hiervan daarnaast grote fouten vertoont: dezelfde toevalsgetallen worden te vaak opnieuw gekozen.

    Hoewel op dit moment niemand een volledig uitgewerkte aanval kan laten zien, zijn de getoonde problemen dermate ernstig dat wij allen verwachten dat praktische aanvallen tegen deze kaart op afzienbare termijn uitgevoerd kunnen en zullen worden. De onderzoekers die de fouten ontdekten hebben er in hun presentatie ook nadrukkelijk op gewezen dat partijen die van deze chips afhankelijk zijn de komende maanden zouden moeten gebruiken om op andere chipcards over te schakelen om zichzelf en anderen te beschermen.

    Het optreden van Trans Link Systems, het bedrijf achter de OV-Chipkaart, is weinig vertrouwenwekkend. Het bedrijf heeft eerder, in de discussie rond de opslag van reisgegevens, laten merken zich niet veel aan te trekken van maatschappelijke kritiek. Ook na deze nieuwe onthullingen heeft Trans Link Systems op alles simpele antwoorden: Gebruik van OV-chipkaart veilig, niets aan de hand, kaart blijft veilig, slechts een piepklein stukje van de beveiliging in het geding. Zonder te pretenderen alle ins en outs van het systeem te kennen menen wij dat dit een gevaarlijke opstelling is omdat de nu gevonden problemen naar onze mening wel degelijk de kern van de beveiliging van de OV-Chipkaart raken. De problemen zijn serieus en vragen om een professionele respons, die niet slechts uit ontkenning en bagatellisering bestaat. Omdat reizigers geen keus hebben en hier veel overheidsgeld mee gemoeid is moet de infrastructuur van dit OV-Chipkaart project niet enkel aan een gesloten gezelschap met eigen belangen overgelaten worden. De huidige cultuur van geslotenheid is onverstandig, achterhaald, verkwistend en zelfs beledigend tegenover alle burgers die terechte vragen stellen over de manier van omgaan met hun geld en gegevens (en daarmee belangen).

    Met de huidige OV-chip vergelijkbare RFID-chips met betere en openbaar gepubliceerde versleuteling zijn – ook bij dezelfde fabrikant – te koop en kosten naar wij begrepen hebben in de orde van anderhalve Euro per stuk in plaats van 50 cent. De beveiliging hiervan berust niet op zelfbedachte speelgoed-cryptografie maar op peer-reviewed, gecertificeerde en bewezen algoritmen. In hoeverre er nu nog op deze chips kan worden overgeschakeld en wat daarvan in de rest van het systeem de kosten zijn kunnen we niet beoordelen, maar het koste wat kost handhaven van de huidige kaarten kon ook nog wel eens heel duur worden.

    Om de precieze impact van de nu getoonde zwakheden te beoordelen is een onafhankelijk onderzoek nodig. Trans Link Systems heeft, naar ze zelf aangeeft, TNO aan het werk gezet om e.e.a. uit te zoeken. Hoewel men zelf al bij voorbaat zeker meent te weten dat alles in orde is, staat er in een verklaring letterlijk: “Trans Link Systems heeft TNO verzocht een onafhankelijk onderzoek uit te voeren om deze conclusie te bevestigen.” Naast de merkwaardige definitie van ‘onafhankelijk onderzoek’ lijkt ook de onderzoeks-vraagstelling op het eerste gezicht op een gewenste conclusie aan te sturen. Onderzoek door TNO is in principe een goede zaak, maar dan dienen opdracht, werkwijze, methoden en uitkomsten volstrekt openbaar te zijn. De persverklaring hieromtrent van Translink is wederom weinig vertrouwenwekkend.

    Al in 1883 publiceerde de Nederlandse cryptograaf Auguste Kerckhoffs een aantal stellingen. Onder andere beweerde hij dat cryptografische systemen niet afhankelijk horen te zijn van geheimhouding van het algoritme, maar alleen van de geheimhouding van de sleutel. Dit principe is in de cryptografie algemeen aanvaard. Doordat de werking van een systeem in een wetenschappelijk discussie kan worden bekritiseerd kunnen zwaktes worden opgespoord en verholpen, liefst voordat een systeem breed wordt ingezet.

    De lessen die uit de omgang met stemmachines getrokken kunnen worden zijn in brede zin ook hier relevant. Want als het helemaal mis gaat met de OV-chipcard dan zullen alle Nederlandse burgers daar uiteindelijk de rekening voor betalen. En dan zou de samenleving, net als in de kwestie met de stemcomputers, alweer leergeld betalen voor de keuze van een fabrikant die meent op eigen houtje en zonder een open review proces iets “heel erg veiligs” te kunnen bedenken waarvan ze vervolgens “uit oogpunt van veiligheid” niemand willen vertellen hoe het werkt. Ook nu weer zegt Trans Link Systems dat er “vele aanvullende veiligheidsmaatregelen” zijn, maar wil ze niet zeggen waar deze uit bestaan. Deze manier van beveiligen wordt vaak ‘Security Through Obscurity’ genoemd, en het is in technische kringen al sinds jaar en dag bekend dat deze filosofie vaak leidt tot hele dure mislukkingen.

    De overheid moet in zaken die ons allemaal aangaan een actievere rol spelen en moet aanspreekbaar zijn als het gaat om transparantie en veiligheid. Met de recente steun in kabinet en Kamer voor het gebruik van Open Standaarden en Open Source Software (zie het actieplan “Nederland Open in Verbinding”) wordt het belang van transparantie in ICT langzaamaan in bredere kring erkend.

    Georgi Gaydajiev
    Rop Gonggrijp
    Job de Haas
    Bart Jacobs
    Hans van de Looy
    Martijn Oostdijk
    Melanie Rieback
    Maurits van der Schee
    Andy Tanenbaum
    Marc Witteman

    De ondergetekenden zijn allen beveiligingsonderzoekers, vaak met specifieke expertise op het gebied van privacy, chipcards, RFIDs en embedded systemen. Bart Jacobs is hoogleraar informatiebeveiliging in Nijmegen en Eindhoven, Andy Tanenbaum is professor in de informatica in Amsterdam.

  11. johans says:

    The disposable OV-chipcard ‘daycard’ system has now been broken by a student in Nijmegen. The daycards are Mifare Ultralight cards without any crypto. But being able to use these without any limits basically defeats the whole system with the Mifare Classic cards. Background: http://media.rtl.nl/web/components/actueel/rtlnieuws/psp/extra/2008/ovchip.pdf

    The concept is not new btw. a good security analysis of the daycard system was published last year by some students from Amsterdam. They provide a lot of details about the card and don’t just hint about the hardware circumvention that was now published; but also state that it’s easy to reset and reuse standard issue daycards after each trip. See http://staff.science.uva.nl/~delaat/sne-2006-2007/p41/report.pdf

  12. Barry says:

    Thanks Johan.

    I wrote an update on the blog about all this.

  13. Xenia Bakker says:

    there is a difference between the disposable chipcard and the personal, of course.
    The disposable one has been hacked and used, the personal one has only had its security breached by the two German men. In a very convincable way, however!

    When presented with this news the city of Rotterdam replied: “We trust the chip, it has been in use for 10 years. It is ‘proven technology’.”
    Ah. No worries there, then.

    I published a Dutch article today on this, if anyone is interested. It is targeted at the general public but does explain about cryptographics and how the chip was hacked. It also refers to the lettre mentioned above. See http://sync.nl/hoe-de-ov-chipkaart-werd-gekraakt/

  14. Muttley says:

    Well I am confused here in Melbourne Australia the state government is going to spend around AU $1 billion dollars on a new rail and tram ticketing system using you guessed it MiFare cards.

    I’ve sent the details of this blog and other references to the fact this card system has been compromised to newspapers, talk back radio and politicians result nothing zip zero response.

    It will be hilarious if they go ahead with the system with this card. Looking on the bright side I will be able to get a free ride on trains and trams here. Humm thinking about it perhaps its better I keep quiet about all this.