Most of those virtual-keyboard things are specifically designed to make it difficult to automate their use... this is to stop trojan's from recording or re-using your bank account authentication details.
The keyboards are usually implemented in Javascript; I've seen two different kinds:
- The keys are in random locations inside the virtual keyboard (in order to stop a trojan from recording the click positions)
- As in (1), but the keys change position on each click.
Usually, the virtual keyboard produces a one-time hash value dependent on the initial position of the keyboard keys so that simply sniffing the HTTP traffic does not help much (unfortunately, I have seen really insecure ones out there).
While these virtual keyboards do not really add a lot of security (it's still just a secondary secret key you must remember) they are genuinely annoying... and can be by-passed.
(I just remembered seeing a virtual keyboard that was a naive replacement for the user's password in a login form. You can easily by-pass that by talking to the back-end directly).
Generally, my approach to this kind of problem would be to use Javascript on the client side (perhaps using Mozilla::Mechanize) to determine the positions of the keys, and to respond to changes. Unless it's obvious that you can figure out the hashing algorithm yourself given the inputs and outputs of the keyboard over time, there's not really a lot of options.
As this is a sensitive area w.r.t security, I will not post example code immediately. Perhaps you could show us what you have achieved so far (leaving in the details of the particular site, but not your login details) ?
-David |