Web developers face many challenges in this newly-forged cyber-world. Where once your site had to have something people wanted before it got hacked, now your site is being attacked simply because it can be. Lists of sites with known vulnerabilities float around the internet like an à la carte menu for the under-skilled, impatient hacker. Hacking has become a game show of sorts, with each new participant vying for their 5 minutes of fame on Twitter. In this world, you must assume that you are under attack at all times.
Standing naked in public is always an uncomfortable experience; even more so when people are throwing rocks at you and trying to pull your hair out. That, however, is exactly what a web site does every day. The only way to survive is to keep things neatly trimmed and move fast.
Common web site vulnerabilities like SQL injection and cross-site scripting are easily overcome through proper coding practices. Nice and neat, nothing to grab hold of there, and rocks are bouncing harmlessly off of you. Then, out of nowhere, a walnut-sized rock hits you square between the eyes. Once the stars clear from your vision, you look down at the rock and notice the unmistakable contours of password re-use. You just made the fatal mistake of forgetting that your web site is, by and large, used by human beings, and not ones you can count on to help you keep your site secure. This problem, unlike the others, can't be solved with techniques that are invisible to the user.
Passwords represent a uniquely human challenge in the world of computing. To be effective a password must be complex and difficult to guess, with a mixture of various character types to thwart rainbow table lookups, but at the same time easy to remember for the individual using the password. For a human being, this is a self-contradicting set of requirements. Most people have a hard enough time remembering all of their relatives' birthdays, much less remembering that Ph3n0m!n@l is their password on one site while B1gD@ddy657 is their password on another. Yes, they can have a little cheat sheet with their passwords on it or some electronic equivalent, but from their point of view, it's so much easier to just have the same password on every site. And so guess what? That's what they do most of the time.
You should know that passwords are going to be re-used, and it simply does not matter how small or obscure your site is, and it simply does not matter if you believe that you have a controlled user base that would never, ever re-use passwords. They will. I assure you. If you allow authentication on your site, someone just authenticated with the same password they use on Facebook. Knowing that you can't stop your users from committing this sin, what can you do to keep it from impacting your site? The answer, in almost all cases, is Multi-Factor Authentication.
Multi-Factor Authentication comes in many forms, and has been around for many, many years. When working as a Systems Administrator for MCI twenty years ago, one of my responsibilities was to maintain the "code blocks", little more than an LCD display hooked to a chip and a quartz crystal. Embedded into the chip was a time-based algorithm to generate a pseudo-random but predictable number every ten seconds. When logging in to the MCI sales system, you had to enter the code currently displayed. The matching algorithm on the server would validate the entry, and you would be authenticated. Similar technology is still in use today by companies like Blizzard Entertainment to protect their online gaming assets. Google Mail offers several options for a second factor of authentication, all of which involve generating a random number for each authentication request, and then transmitting it to the user on an alternate channel, such as by SMS message or voice telephone call.
The key to successful Multi-Factor Authentication is to have a piece of secret data that the user does not have access to prior to the authentication attempt, and to deliver that secret data to a specific physical device that is under the user's control. In the case of MCI and Blizzard, that device is a portable LCD display. In the case of Google Mail, it is your mobile or landline phone. Now the hacker not only has to guess, reverse, or find your password, but they have to have physical access to your mobile phone or other device as well.
Nothing will stop hackers from trying to throw rocks and pull hair, but there are things you can do to thwart their attempts. Multi-Factor Authentication is easy and cheap, and raises the hacking requirements from a simple rainbow table attack that any script kiddie can pull off to something worthy of a Hollywood blockbuster. As someone who stands naked in public a lot, multi-factor authentication provides that extra dose of assurance, knowing as I do that most hackers are not Tom Cruise, and probably very few of them have zero-gravity repelling gear or flying motorcycles.
- Michael Snyder