I got a Yubikey last year at RSA Europe (thanks Stina), obtained the AES key and
have done some Python programming with it.
But I'm stuck with this:
Assume a website which uses the Yubikey OTP to 1) authenticate users and
2) validate transactions. Classic example of such a site is an online
banking site. User generates an OTP to logon, and then has to generate
an OTP for each financial transaction.
A web browser trojan could insert it's own transaction like this:
- I generate an OTP (OTP1) with my Yubikey
- The trojan intercepts and stores OTP1 together with a timestamp,
doesn't send OTP1 to the website, but makes the browser display a fake
error message (404, server load to high, Yubikey error, ...) prompting
me to generate a second OTP
- I'm fooled by the fake error, and generate a second OTP (OTP2) with my
Yubikey
- The trojan intercepts and stores OTP2 together with a timestamp, and
sends OTP1 to the web site
- Web site grants me access.
- After an amount of time equal to the delta between the 2 stored
timestamps, the trojan starts a transaction (invisible to the user) and
uses OTP2 to validate the transaction.
- When the user starts his own transactions, the trojan pases the OTPs
on to the website, but delays them with the same timestamp delta to
avoid post-exploitation detection.
I cannot device an algorithm to detect this fraud on the website, if the
Yubikey is the only authentication and validation mechanism used.
Any ideas?
Asking the user to reinsert his Yubikey to force each OTP to have a session
counter equal to 0 (and thus prevent above scenario) is not a good idea,
because then the user is accustomed to have to reinsert his Yubikey.
The trojan could just do the same and ask the user to reinsert his Yubikey.
Didier
-----
Didier Stevens
http://blog.DidierStevens.com