I'm using Form authentication with Cookies and I'm reading about replay
attacks.
Is there any way besides using SSL to protect the cookie?
SSL doesn't protect against replay attacks per say but instead encrypts the
channel to make snooping by an outsider much more difficult. If the
outsider was able to steal your forms auth cookie through another mechanism
like a cross site scripting attack, the SSL no longer does you any good as
the attacker will replay the cookie using SSL.
Comparing other systems: how does Hotmail handle this feature? For
example, I login using SSL to read my mail but then Hotmails switches to
HTTP. So, anyone can take my cookie and read my mail?
Hotmail is not protecting your cookie from snooping at all and is likely to
have issues with replay attacks. By not using SSL consistently, they are
essentially not taking the security of your email data very seriously.
It is common in systems that are more well-designed to try to add additional
barriers to replay attacks. For example, it is common to add message
authenticate codes (MACs) to these cookies to ensure they cannot be modified
and to also include additional data about the browser on the other end such
as the source IP address.
Unfortunately, clever attackers can spoof the source IP address and make the
replay look like it came from the exact same place on the public internet
that the original request came from. Adding source IP data to the cookie
raises the bar but does not prevent the whole issue.
If you are serious about security for your site, you will use SSL
exclusively. Even a simple redirect from HTTP to HTTPS makes you
succeptible to attacks like "sslstrip" as detailed by Moxie Marlinspike in
his recent BlackHat presentation which you can view on the web if you do
some searches for it.