On the Insecurity of
Microsoft's Identity Metasystem CardSpace

Sebastian Gajek, Jörg Schwenk and Xuan Chen. Technical Report.
HGI-TR-2008-003. May, 2008.


English Press Release
German Press Release

Abstract
Microsoft has enrolled a user-centric identity metasystem encompassing a suite of various protocols for identity management. CardSpace bases on open standards, such that various applications can make use of the identity metasystem, including, for example, Microsoft Internet Explorer 7. We therefore expect Microsoft's identity metasystem to become widely deployed on the Internet and a popular target to attack. We study the security of Cardspace and show that the browser-based protocol is susceptible to attacks, where the adversary steals the security token. Consequently, we prove evidence that users are impersonatable and the one who potentially suffer from identity theft. We confirm the practicability of the attack by presenting a proof of concept implementation. Finally, we discuss countermeasures, addressing both the CardSpace identity metasystem and the protocol.

A high-level description of the CardSpace protocol flow
The quintessence of Microsoft's identity metasystem protocols is to call the identity provider to issue a security token for the authentication with a relying party. In a high-level description, the CardSpace protocols proceed as follows:
High Level Schema
Demonstrator---How to steal a CardSpace Security Token?
Our demonstrator has been successfully tested on Windows XP SP2, running Internet Explorer Version 7.0.5730.13, and exemplarily designed to steal a CardSpace security token from http://sandbox.netfx3.com, a test site provided by Microsoft. The proof-of-concept attack makes use of dynamic pharming, where the main frame, i.e., frame0 hosts in frame1 the script stealing the token, and the legit site target to attack in frame2. In a nutshell, it proceeds as follows:
Attack Schema

How to use our demonstrator
Before you proceed, please make sure that you are able to login to https://sandbox.netfx3.com. You might need to update your .NET Framework and create a personal CardSpace Identity Card. Logout and close your browser after you have successfully logged in.
Further, you must download our root certificate, representing the fact that the adversary may have retrieved a valid certificate or the average user does not validate the certificate. Place the certificate in the "Trusted Root Certification Authority" (in the negative case you have to manually choose the certificate storage location).

To reproduce our attack, you need to create a round robin entry in the DNS server for the domain "sandbox.netfx3.com" with two IP addresses: Our IP 134.147.40.84 (simulating the adversary) and the legitimate IP 66.129.68.21 (simulating the relying party). Make sure that the next IP address for the domain is our server's IP address.
Note that we have already set up a DNS Server with the appropriate configuration. You need to replace your current DNS Server with the IP address 134.147.40.84 and remove possible secondary DNS Server entries. Next, go to https://sandbox.netfx3.com/root_page.htm with your Internet Explorer 7. Our pharming page will be loaded into your browser (sometimes the first attempt may fail with a 404 error so you need to restart your browser and try again). You will see two frames. The first frame (frame1) contains a simple text box and the button "Login again". The second frame (frame2) will load after a short delay and contains the original login page. Please wait for the text "I'm listening" to appear in the upper text box, before you proceed with CardSpace login. After having logged in, the text box shall reveal your security token. Next, copy the content from the text box to your clipboard, log out and restart your browser. Once again, visit https://sandbox.netfx3.com/root_page.htm. Now paste the security token content into the text box, and click on the button "Login again". You shall now be logged in without sending your original token via the Windows CardSpace interface. The latter step simply mimics the fact that the adversary has impersonated you!

Frequently Asked Questions

Q: Do EV SSL certificates protect against the attack?
A: Maybe, if the user checks the SSL indicators of his browser. However, usability studies have shown that most users simply ignore SSL warnings, or may not be aware of the subtleties between a "normal" certificate and an EV certificate.

Q: How can the adversary control the DNS name resolution? Is this a realistic assumption?
A: In the last two years, many attacks have been described and observed "in the wild" that employ DNS Spoofing for which the term "Pharming" has been coined. Examples include


Q: Does the attack work without a SSL certificate for the outer frameset?
A: Yes, it does with the exception that the browser indicates that there are some problems with the server certificate. As mentioned before, the average Internet user ignores the warning.

Q: Do other standards/frameworks like SAML or Liberty Alliance offer better security?
A: We have not analyzed the other protocols yet.

Q: How can Browser-based identity management systems prevent such attacks?
A: In the past, the cryptographic burden to verify the peer player has been put into the arms of inexperienced users: They were asked to verify the validity of SSL server certificates, without being able to understand even simple technical details of the underlying technology. This is cumbersome because a plethora of root certificates (not all for SSL) are installed in the Windows OS, whereby root authorities enforce different policies to issue server certificates. Against this background, some provisions have been made by introducing EV certificates and restricting the number of trusted root certificates, and improving the security indicators of IE. However, the basic concept to make the user verify the server remains.
Our proposal is to reverse the roles, and to automate the verification. This can be done, e.g., by using SSL client certificates, even if they are self-signed. They allow a server to uniquely identify the browser. Another candidate solution is the "Strong Locked Same Origin Policy" recently introduced by [Karlof et al., CCS'07]. If the policy would be enforced, the browser would be capable of automatically detecting Pharming and Dynamic Pharming attacks based on the public key of the SSL certificate.

For more details, see the Technical Report.

Additional information:
What is Windows CardSpace?
Complete technical report
How to change DNS server settings for Windows XP
How to change DNS server settings for Windows Vista
Studies of IT-Security (german)

Please contact Christoph Löhr or Xuan Chen for questions regarding the technical implementation.