Widespread use of smart phones by employees to perform work related activities has introduced the idea of using these devices as an authentication token. As an example of such attempts, RSA SecureID software tokens are available for iPhone, Nokia and the Windows platforms. Obviously, mobile phones would not be able to provide the level of tamper-resistance that hardware tokens would, but I was interested to know how easy/hard it could be for a potential attacker to clone RSA SecureID software tokens. I used the Windows version of the RSA SecurID Software Token for Microsoft Windows version 4.10 for my analysis and discovered the following issues:
Device serial number of tokens can be calculated by a remote attacker :
Every instance of the installed SecurID software token application contains a hard drive plug-in (implemented in tokenstoreplugin.dll) that has a unique device serial number. This serial number can be used for "Device Binding" and the RSA documentation defines it as follows:
“Before the software token is issued by RSA Authentication Manager, an additional extension attribute (<DeviceSerialNumber/>) can be added to the software token record to bind the software token to a specific devicedevice serial number is used to bind a token to a specific device. If the same user installs the application on a different computer, the user cannot import software tokens into the application because the hard drive plug-in on the second computer has a different device serial number from the one to which the user's tokens are bound”.Reverse engineering the Hard-Disk plugin (tokenstoreplugin.dll) indicated that the device serial number is dependent on the system's host name and current user's windows security identifier (SID). An attacker, with access to these values, can easily calculate the target token's device serial number and bypass the above mentioned protection. Account SIDs can be enumerated in most of the Microsoft active directory based networks using publicly available tools, if the “enumeration of SAM accounts and shares” security setting was not set to disabled. Host names can be easily resolved using internal DNS or Microsoft RPC. The following figures show the device serial number generation code:

device_serial_number=Left(SHA1(host_name+user_SID+“RSA Copyright 2008”),10)
Token's copy protection:
The software token information, including the secret seed value, is stored in a SQLite version 3 database file named RSASecurIDStorage under the “%USERPROFILE%\Local Settings\Application Data\RSA\RSA SecurID Software Token Library” directory. This file can be viewed by any SQLite database browser, but sensitive information such as the checksum and seed values are encrypted. RSA documentation states that this database file is both encrypted and copy protected: “RSA SecurID Software Token for Windows uses the following data protection mechanisms to tie the token database to a specific computer:
• Binding the database to the computer's primary hard disk drive
• Implementing the Windows Data Protection API (DPAPI)
These mechanisms ensure that an intruder cannot move the token database to another computer and access the tokens. Even if you disable copy protection, the database is still protected by DPAPI.”
The RSASecurIDStorage database file has two tables: PROPERTIES and TOKENS. The DatabaseKey and CryptoChecksum rows found in the PROPERTIES tables were found to be used for copy protection purpose as shown in the figure below:
Reverse engineering of the copy protection mechanism indicated that:


In order to counter the aforementioned issues, I would recommend the use of "trusted platform module" (TPM) bindings, which associates the software token with the TPM chip on the system (TPM chip for mobiles? there are vendors working on it).
http://www.comms.engg.susx.ac.uk/fft/crypto/initial_securid_analysis.pdf
It is obvious that this protection cannot work by design. Good research article though.
You mention that you couldn't find a way of updating the LSA secrets, so how did you manage to get the "copy" of the token working?
Did you just clone the VM (and thus have really two instances of the same VM) and leave the "update the LSA secrets" part as a "exercise to the reader"?
I think the article is very interesting and provides a lot of useful information, but I don't really see (maybe it's just me!) that is shows a complete end-to-end attack.
Thanks a lot for the great work and for publishing it!
BTW: it is not suprising that soft token can be cloned, it is much more suprising that people think it cant (and RSA claims it cant).
As long as you do not use hardware platform binding methods (TPM or similiar) is simply conceptually imposible to bind code to a untrusted host.
And the more integrated you are, the less you need a "soft token" at all, just go for a smartcard. Oh I forgot, the vast revenue from the endpoint security market ....
Bernd
You cannot clone a SecureID with the device serial number. Specifically, the seed used to generate all IDs is not published in DNS and AD.
Given rootkit level access to a PC, you can extract the seed. You can then make the extracted seed work on other machines using the device serial number, which at that point you'd never need to discover remotely because -- heh, you have rootkit level access.
If you interpreted the above research to imply that you could remotely discover enough about a user's token to clone it, this is clearly not the case. However, I made the same mistake too. Perhaps Sensepost would like to clarify their research to prevent future misunderstandings.
1) Attack one based on bypassing token bindings: In most cases RSA the software token "provisioning" file is emailed to the users. If an attacker can capture that email then he can use the first mentioned method to change his system configurations (hsotname , SIDs), thus successfuly "import" the provisioning file and activate the token.
2) Attack two assumes that the attacker has compormised the victim's system remotely or gained physical access to it in order to extract the required DPAPI blobs and LSA secrets and replicate the token in a simulator (cain provides one) or another copy of RSA software token.
This article proves that two factor security can be duplicated if someone has physical access to the laptop. This is often the case when leaving your hotel room in a shady country... We've all heard horror stories.
You mention that this does not reflect a complete end-to-end attack. I'd like to point out that this is not a research project. It was performed during a real-worled assessment in a time-frame of 5 days. Updating LSA Secrets would be theoretically possible - a point I believe we mentioned.
BTW: it is not suprising that soft token can be cloned, it is much more suprising that people think it cant (and RSA claims it cant).
As long as you do not use hardware platform binding methods (TPM or similiar) is simply conceptually imposible to bind code to a untrusted host.
And the more integrated you are, the less you need a "soft token" at all, just go for a smartcard. Oh I forgot, the vast revenue from the endpoint security market ....
Bernd