October 2006 Archives

Tue Oct 24 18:44:18 2006

Random vs. coincidence

Some time ago, I discovered a pattern in the Transactionnumber (TAN) one-time pad given out by Citibank Germany to their customers. As the name suggests, a one-time pad should contain random values, not linear increasing ones. That was not the case.

The whole story would not be worth telling if Citibank had actually cared about my reports when I contacted them. But they didn't care and still don't. (well, they finally did, see below for the Update)

Juergen Schmidt and Daniel Bachfeld from Heise publishing supported my at first unsuccessful attempts to inform Citibank of the problem. Not that Citibank did anything about it. The full article is published at Heise Security UK. A German version can be found here.

Most amusing is the response from Mr. Stahlschmidt of Citibank to Daniel Bachfeld from Heise (I never got any feedback from Citibank, I'm just a customer).

Sehr geehrter Herr Bachfeld,

vielen Dank für Ihre E-Mail. Die TAN-Generierung der Citibank beinhaltet
selbstverständlich eine Zufallskomponente. Dabei handelt es sich um eine
zeitbasierte Komponente, die in den Prozess der Generierung von TANs
einfließt. Da hierbei fortlaufend sich ändernde "Zeitpunkte" einfließen, ist
die Generierung der TANs letzten Endes zufällig. Es ist somit
ausgeschlossen, dass sich eine TAN aus anderen TANs errechnen lässt.

Die Einbindung der Zufallskomponente Zeit erklärt, warum die einzelnen TANs
in aufsteigender Reihenfolge sortiert sind - schließlich nimmt die Zeit als
Zufallsgröße während des Prozesses der Generierung zu. Dabei wird jede TAN
unabhängig von den vorigen ermittelt. Der Zahlenraum - der je nach TAN-Liste
wie auch in Ihrem Beispiel beschrieben sehr unterschiedlich dimensioniert
sein kann - ist durch das unterschiedliche Anwachsen der Zeitkomponente
bedingt. Sprich: Die statistischen Häufungen von gleichen Differenzen
zwischen einzelnen TANs sind zufällig und somit je nach TAN-Liste
verschieden. Etwaige gewonnene Erkenntnisse über Abstände zwischen einzelnen
TANs aus einer TAN-Liste lassen sich somit nicht auf eine andere TAN-Liste
übertragen. Insofern ist das von Citibank angewandte
Zufallskomponenten-Verfahren sicher.

Mit freundlichen Grüßen

Rüdiger Stahlschmidt

Citibank Privatkunden AG & Co. KGaA
Unternehmenskommunikation
Kasernenstraße 10
40213 Düsseldorf
Fon +49 (0)211 8984-959
Fax +49 (0)211 8984-164
mailto:ruediger.stahlschmidt@citigroup.com
http://www.citibank.de
So, they are adding GetTickCount() to the last TAN? This explains the variance in their increment. We can only hope that they will never upgrade the hardware they are doing it on, otherwise the time difference between two TAN generation calls may not be enough to be above 1.

And finally, some links to related material. The differential analysis stuff was done using some scripts by Florian Walther that can be found here.
Bindview (now Symantec) used the same method in 2001 to analyse TCP initial sequence number generation. Even Cisco fixed their generation algorithm afterwards and that's TCP sequence numbers, not replacements for your signature.
I never expected to come across a case where Cisco is the example of a good vendor response and the worldwide largest private bank is the counter example.
The best related link award goes to Citibank itself. On the German online banking FAQ page, they state that HBCI is too complicated and therefore PIN/TAN over SSL is good enough. But may be a HBCI terminal is able to generate random numbers.

Update! Today (24.10.2006), I received the following Email forwarded from Daniel Bachfeld (Heise) containing a message from Citibank. And you know what? They will be using a random number generator from now on!

wir möchten Sie informieren, dass die Citibank für die Generierung ihrer TANs ab
sofort einen Zufallsgenerator verwendet. Dies bedeutet, dass die Nummern in den
von nun an vergebenen TAN-Listen rein zufällig sind.

Mit freundlichen Grüßen                                                            

Rüdiger Stahlschmidt


Posted by FX | Permanent link