The phishing continues

Posted by Jonas Elfström Tue, 27 Mar 2007 20:30:00 GMT

The phishing attempts against Nordea are still going strong and the mails are now in almost correct swedish.

One might wonder why Nordea still haven't done any major changes. Maybe the've seen Fight Club and calculates just the way Jack does while working as an automotive manufacture recall coordinator...

What one-way hash function to use?

Posted by Jonas Elfström Tue, 27 Feb 2007 16:01:00 GMT

One-way hash functions takes a message of any length as input and outputs a very large but fixed length number, called message digest or fingerprint. They can be used for "storing" passwords or as a signature that makes it possible to verify that you got the correct message.

MD5 got into problems over 10 years ago and SHA-1 could to be heading the same way. Until the new standard is published I would follow the crowd and recommend SHA-256.

Ruby
require 'digest/sha2'
quickfox="The quick brown fox jumps over the lazy dog"
Digest::SHA256.hexdigest(quickfox)

=> "d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592"

C#
using System.Security.Cryptography;

...

 ASCIIEncoding byteConverter = new ASCIIEncoding();
 string quickfox="The quick brown fox jumps over the lazy dog";
 HashAlgorithm sha256 = new SHA256Managed();
 byte[] hash = sha256.ComputeHash(byteConverter.GetBytes(quickfox));
 crypt.Text = Convert.ToBase64String(hash);           

Change your default passwords!

Posted by Jonas Elfström Mon, 26 Feb 2007 16:01:00 GMT

It has recently been reported that by simply opening the wrong web page you could be in trouble if you haven't changed the default password of your home router. The page could contain a JavaScript that changes the DNS-settings. Schneier blogs about it here and today he posted a link to a page containing default passwords for most of the home routers on the market.

Change it now!

Recently I helped a friend to change the password on his router. He knew that he could administer his router with a web interface but he did not know where to point his browser. He's running Windows and if you are in the same situation as my friend you could almost always find out the address by:

Randomly chosen OTPs defaced

Posted by Jonas Elfström Mon, 12 Feb 2007 18:45:00 GMT

Gunnar Kreitz has shown that random chosen OTPs aren't nearly as good as I first thought. Against the current trojan they work just fine but Kreitz describes how a modified and more advanced trojan could be effective.

It seems that in the end the protocol only forces the trojan be more complex, adds a time span for the validity of the OTP and makes the attack more likely to fail (there is no guarantee that the user will enter a second OTP or that he will do it in time). I suppose the attacker also would have to make the trojan completely automated or have a 24/7 staff waiting. If the user has opted in to have the n presented as a CAPTCHA it would force the evildoers to have that 24/7 staff.

Advantages:
  • A TTL (time to live) for OTPs.
  • Demands more resources and higher complexity from the attacker.
Disadvantages:
  • A little harder to use (finding the challenged OTP).
  • In theory not that much more secure.

My bank has support for sending OTPs by SMS but a trojan that works like the one described by Kreitz would have no problem with that one either.

The protection against phising, as in redirecting the user to a fake login page, is still much greater with randomly chosen OTPs.

I find it a bit ironic that the bank in question actually is going to implement something that sounds like randomly chosen OTPs. They recently announced a change in their login procedure: "Vilken engångskod från kodkortet du ska använda framgår på inloggningssidan." / "What one-time password you are supposed to enter will be presented on the login page."

Personally I think the security tokens with signing abilities sounds more and more reasonable.

Randomly chosen OTPs

Posted by Jonas Elfström Tue, 06 Feb 2007 15:59:00 GMT

In this post I hope to answer some questions I got about the one-time password protocol I described in "Trojans and one-time passwords".

The scenario is that the attacker has got at least one OTP by using a trojan or some other means.

Couldn't the attacker just reload the login page until he is asked to enter an OTP that he has?
- No, he could not. All decent login procedures has a max number of tries before blocking the account. Also the OTP is asked for in the page following the login-page and failure to enter or to enter a faulty OTP there should count as a failed login attempt.

Couldn't the trojan record all OTPs entered and then it knows it's only one left redirect the login attempt and then login itself with that OTP?
- This is a real concern. To counterfeit this you have to have more OTPs than you will actually use or the numbered list could go on and on and not begin from 1 for every new sheet of OTPs. In either way the trojan will have a hard time to find out how many OTPs there are left.

In theory you could also present the number of the OTP as a CAPTCHA but I would recommend against it for usability reasons and because it locks out people with certain disabilities.

Probability of success

Let's say the trojan has succeeded in getting hold of two OTPs. What is the probability that it will hit the correct OTP if the user has a list of 20, 50 and 200 OTPs and if three login tries are allowed?

20: (1-(18/20*17/19*16/18))*100 = 28.4%
50: (1-(48/50*47/49*46/48))*100 = 11.8%
200: (1-(198/200*197/199*196/198))*100 = 3.0%

This is why it is important to make it hard or impossible for the trojan to count how many OTPs there are left.

If you add a second round of OTP check like I suggested in my earlier post life gets a lot harder for Mallory.

Older posts: 1 2 3 4 5