Website Design, Promotion, and Maintenance
Pacific Websites - Promotion, Maintenance, Design - Helping Your Business Succeed Online.           
    Helping Your Business Succeed Online    New service - Link Building! click for more...

Pacific Websites ] Top Listings in Search Engines ] Services ] Portfolio ] Make Your Site SELL ] Domain Names ] Saving Money ] Virus ] Maintenance ] Partners ] Search ] [ Payments ] [ Contact ]

Password Generation Security

How to make passwords that are hard to crack..

All About Making Secure Passwords...

Researched by Pacific Websites

PART I:

By B. Rich: I recently read an interesting article about the pitfalls involved in choosing a secure password. Since it's a techie issue and something many people should be aware of (but aren't), I thought I should recount some of the tips and background on passwords, password selection, and how your password might be compromised. More importantly, I'd like to show you how the weakest link in any security structure is often the human link, and how you can maximize the security integrity of your home or office environment just by choosing more effective, harder to crack passwords.

Password Storage

Passwords, on just about every system, are stored encrypted. The two general approaches to encryption are one-way and two-way encryption. One-way encryption is a method in which characters are encrypted so that the final outcome looks nothing like the original plaintext, and cannot be traced back or unencrypted - the algorithm cannot be reversed. Two-way is really more the type you hear about in spy movies, in which plaintext is translated into gibberish using a cipher, but can be translated back again using a special anti-cipher or key.

Passwords that are highly important - such as the root password to a multi-user system (your Linux 'root' password, your Windows 'administrator' password, etc.), or for most Internet mail accounts and shopping accounts - are stored using one-way encryption. This ensures that no matter where it is - even when it's on the system where no one should, in naive theory, be able to get - the password is never in a form in which it can be easily compromised. When your password is entered (for instance, when you login to your mail or your computer), the characters you enter in plaintext are encrypted using the one-way algorithm, and then the final result is compared to the stored 'hash,' the encrypted information. Only if they match will you be allowed in, not if they are simply the same password (since no one but the user and the algorithm knows what the actual password is).

One-way systems are then of course more secure, since, failing a breakthrough in large number theory, it is completely impossible to trace the original plaintext from the resulting hash using any sort of magical algorithm. Two techniques are used in password "retrieval" (i.e. cracking your root password when you've been silly enough to forget it 1); that is, when we're talking about a password that can't be simply 'un-ciphered,' as by some clever WWII Bletchley Park operative "mathemagically."

RoboForm remembers your passwords. http://www.roboform.com

Password Cracking

These two techniques are known as 'brute-force' and 'dictionary' attack techniques. Both have their advantages and disadvantages, but both try to accomplish, in one way or another, the key goal when cracking one-way encryption - to reduce the monumental search-space for the plaintext password (your password), which, when encrypted using the one-way algorithm, will produce the stored hash.

Now indeed, some things might have become apparent. We want to crack let's say, an 8character password, because we happen to remember our root password was 8 letters, just not what it was. Let's assume we've used ASCII characters in our password (a-z, 0-9, !-?), which makes our search-space a whopping 256^8 possible passwords - but wait! Out of the 256 ASCII characters, the first 32 are non-displayable control codes (like beep, end-of-file, etc.) and the last 128 are 'extended' codes, like phi, the degrees sign, and DOS graphics corner brackets - thus, only 96 are really useable for password characters (in general) and finally, out of these 96, the DEL code is non-displayable again, so it's 95.

95^8 (2) is still, however, 66,342,000,000,000,000,000, which I hardly need to point out is gargantuan. To reduce this search space - which, with a computer capable of 1,000,000 password combination trials a second, would take 210 processing years to crack - more action is taken to increase the likelihood the desired solution will be found early in the exercise (3 days) instead of late (182 years).

This is accomplished in a variety of ways. We can prune the possible combinations by reducing the search-space, and that means using fewer characters in the search, or less password length. Many password retrieval programs allow you to enter wildcards (masking parts of the password you've forgotten - 'oh I know it starts with an m but I've forgotten the rest'). We can also make assumptions about the user's intelligence and inventiveness to reduce the possible character set - for instance, it's more likely a password has been constructed out of letters and numbers than it is it's been constructed out of letters, numbers, $'s, #'s, and %'s. Of these, it's more likely # and $ have been used that &, ^ and @, in general (this is not ironclad from statistics, but a good example). This can reduce the possible characters used from 95 down to anything as low as 26 (for people stupid enough to use only one set of letters), or 68 at a slightly more encompassing list size (including most symbols, upper and lower-case letters, and numbers).

Lastly, we can push more likely possibilities to the front of the queue so we increase our chances of reaching a solution faster - rather than doing a systematic search through the ASCII table, we can arrange letters ahead of numbers, numbers ahead of symbols, common letters ahead of less common letters, common symbols ahead of less common symbols, etc. With all this in mind - and with the fact that most people are lazy or unaware of password dynamics - most passwords can be cracked in under a week on a fast computer.

In any case, however, the more preferred method of attack is a polymorphic one, or a technique that second-guesses rather than dumbly applies near infinite lists of character combinations. For instance: trying English words; generating English-like possibilities; accounting for the clever l33t substitutions which their creators may believe makes their password 'not in the dictionary' and therefore 'uncrackable' - most of these comprise the 'dictionary' attack.

Put simply, most people do not make their passwords {^%F^&*# - they make them things like 'firefly' and 'swordfish' and possibly such ingenious non-words like 'blern' and 'st00pa' which all basically fall under the crushing wheels of a dictionary attack. No doubt, early dictionary attack crackers were literally the Aspell dictionary attached to a password checker, so that ubiquitous English words that people thought 'No one could ever possibly guess I would choose, hah ha!' could be entered ahead of 6,000 processing-years of random ASCII strings.

More advanced dictionary crackers use words which have been grabbed from web pages, articles, popular usage, movie scripts, etc. and so, therefore, homer simpson or crantastic, though both long and not in any dictionary, are potentially unsafe. Finally there is polymorphism and substitution, as stated above, which will give a list of tweaked words with common substitutions, or the ultimate in linguistico-hackery, a random English-sounding element generator (after all, even if you have been clever enough to enter something combining upper and lower case, numbers and symbols, and with a good length, if it still equates to crantastic, then it can be guessed by a program with knowledge of the rules of English phonetics and l33t substitutions) - though this is a challenge to say the least, some programs - notably many password generators - are capable of similar things already.

As a final sweetener, passwords can be guessed based on previously guessed passwords. As capitalized upon in the near-movie 'Hackers', while passwords can be, theoretically, combinatorial nightmares to guess, practically, they are often peerlessly simple: and thanks again to laziness, easily crackable passwords are replicated in many systems:

PHREAK:
Alright, what are the three most commonly used passwords?

JOEY:
Love, secret, and uh, sex. But not in that order, necessarily, right?

CEREAL:
Yeah but don't forget God. System operators love to use God. It's that whole male ego thing.

Many dictionary attack programs, upon finding a password, put it at the top of their dictionary file, since there is a good chance that someone else will have the same password (or a l33t variation).

Footnotes

Footnote 1 Hopefully not for cracking someone else's root password. Not that you wouldn't have to have reasonably formidable skills to acquire the hash file first in order to crack it, and therefore, it is hoped, sufficient balls and sense of responsibility as a hacker to not do something immoral like that.

Footnote 2 The number of possible 8-character strings that can be made from 95 characters, not excluding repetition of characters in the string, etc. Notably, this is different from 95 Perm 8, which is a view of 8 characters from a possible space of all permutations of 95 characters - a subtle difference, but the answer is out by several trillion trillion trillion so it's worth noting that permutations should not be used to solve possible password combo problems like this one.

RoboForm remembers your passwords. http://www.roboform.com


PART II

 

Protecting Yourself - How to Choose Secure Passwords
In Part One of Password Infomania, Benjamin Rich discussed ways crackers figure out passwords. In today's installation, he covers hints on selecting good passwords that are difficult to guess or crack.

Length: Unlike baboons but similar to elephants, length is crucial. A 4-character password, no matter how clever, only has about 81 million possibilities, a pathetically small search-space for a Pentium-level processor to move through. Even with every possible practical
ASCII combination, covered in no particular order, a 4-character password can be cracked by a brute force program on our aforementioned 1,000,000 password/sec machine in just over a minute twenty. Most machines aren't capable of this kind of speed, but even at a thousandth of the speed, this can be accomplished in just under 24 hours.

Complexity: Sometimes called entropy. Making your password as free of plausible patterns as possible can indeed bring it closer to 'uncrackable'. Obviously, a 16-letter password, fridge explosion can be quickly sorted out with a dictionary attack. Even fr1dge expl0sion, as explained, can also be accounted for in most dictionary attacks. Therefore, a password that increases the theoretical search-space to the largest possible, with the fewest recognizable patterns, is best. 5-character passwords are fairly easily cracked, although Q+f@~ is still infinitely better than h4ppy (not that you should use a 5-character password, but your see what I mean).

Apathy: Don't choose a password close to your heart - remember, any cracker, or worse, someone who wants to do you real harm and has real surveillance expertise and equipment, is going to find it much easier to crack your password if they don't even have to use a program to do it. If it's 11 characters long, but also happens to be your girlfriend's or boyfriend's name, it will be on the list of first choices for anyone seriously wanting to get into any of your systems.

We've already gone through the pitfalls of using real words or names, or even 'non' words like those from the popular vernacular, or from l33t-sp34k substitution, but add to this list: your birthday; your partner's birthday; your car's number plate; foreign words; famous phrases; pet-names; Social Security number; etc.

Remember - as typified by numerous security breaches in supposed 'impervious' systems, the weakest link is always the human one. It means nothing if the main projects repository server of your company is secure to thousands of outside attacks if it has a 5-letter root password which is the name of the CEO's dog, whom he or she tells their niece in the advertising department 'in case of emergency'. Likewise, it means nothing if your password is easily accessible, guessable, or findable (as in written down somewhere) even if it happens to be long and have reasonable entropy.

Uniqueness:A highly common pitfall is to use the same password for many things: your email, your Linux root, your eBay account, etc. For the love of christ, don't do this: a clever password it may be, and 36 characters long, plus alphanumeric and memorized, but if you're using it for your Joe-Blow JavaScript-R-Us online email account, and it's stored in plaintext in a MySQL database with no password prompt hidden on the site under the directory 'secret'... and you also used it as your Linux root... you're in an extremely dangerous position indeed. Your password may be a secure one, but the different agencies protecting it may not all be secure. Using one password for everything means that a) you're done for - repetition is the sort of thing an immoral cracker will try first upon cracking your online email and finding your use-all password, email-address and geographical location in plain text, and b) you've wasted a good password because you'll have to change it to n different other passwords on all your systems - and this is assuming you figure out someone has your password before said password has been used to break into and gain control of all your protected systems.

Memorability: If you can't remember it, you'll have to write it down, and that's inefficient and means it can be found by immoral others. Mind you, good password practices really should be the cornerstone of computer usage, not necessarily called into question for their practicality - as a Linux user for example, it's unlikely anyone will even attempt to crack your system because most immoral people use Windows (I'm not joking on this one) - and at that, broadband users are more at risk than dialup users, since broadband is a valuable commodity and is more 'prominent' as it were, on the network due to a permanent or long-standing IP1.

RoboForm remembers your passwords. http://www.roboform.com

Sure, sure, you're just a PC owner - unobtrusive, and you don't have the same 3-letter password for your email as your root access - so, theoretically, having a password less than 19 characters, or writing it on the inside of your sleeve cuff just in case, or even telling it to a trusted friend, aren't necessarily security-compromising activities which will see your credit card stolen and your family dead within the week. Nonetheless, it helps if your password is a good one, a long one, and also something you don't have to record anywhere except your memory - just as you take precautions in other areas of your life regardless of the likelihood of extreme misfortune.

Generating a Good Password
Inconvenient as it is, a good password must be long; have a good combination of upper and lowercase letters, symbols, and numbers; and use as many twists and turns as possible. An example of a highly secure password might be:

C#e%4/*W1

9 letters long, utilizing letters, numbers and symbols, and being more or less uncrackable with dictionary means. Resist the temptation also of 'disguising' words with obfuscation - as stated, an English word, even made entirely out of symbols and numbers, can still possibly be guessed by an advanced dictionary attacker.

A good way to choose and remember a complex password is to generate the password using a random exercise, and then type it many times to remember it. Remember, then, the position of the keys you type; the pattern of your fingers moving across the keyboard - not a particular word or phrase, which is easily remembered but also easily cracked.

Generating a good password can be as simple as finding a list of ASCII characters, and then rolling a pair of dice several times to pick out the ones you want - a good example for this sort of thing can be found at http://world.std.com/~reinhold/diceware.html; another way, and a much more trodden path, is using a password generation program. Password generating programs are mostly found for *nix environments, but there are some for Windows, and I've included a list of useful links below - remember to use a program that generates random ASCII gibberish, not combinations of words or English elements. Always be on the lookout for password generating programs that only have fixed character sets (only letters and numbers, which alone doesn't generate enough entropy for a password) or only English-like generations (if it can be generated, it can be second-guessed by a dictionary attacker program).

Good Security Practices
Finally, and this is perhaps hardest of all, remember to change your passwords fairly regularly. With highly complex passwords like the one above, stored on a secure system, there is little need for the average unobtrusive user to change their password very regularly - but as a necessary habit for maintaining a secure system, it should be noted, and particularly by those who do work in high-risk areas.

If anything can be said for good security practices, it's the reminder that what really makes a system secure is diligence, vigilance, and knowledge - a strong human factor. All the high-priced software in the world will not save your company server from attack if it's system administrator is inexperienced, unobservant, and lax in practice; the best system is still not impenetrable if it has an obvious password - no matter how cosseted away that password is.

RoboForm remembers your passwords. http://www.roboform.com

Good Random Password Generators:
Windows
Password Generator  http://www.winguides.com/security/password.php

Java Password Generator    http://www.multicians.org/thvv/gpw.html

Automated Password Generator http://www.adel.nursat.kz/apg/index.shtml

Linux
Keymaker v1.0

Online
LoTekk Password Generator


Footnotes

1 dialup providers change their users' IP addresses each time the user logs on - but cable providers usually give their users permanent IPs, or IPs which have 'leases' of several months. This means that, since your address is unchanging and constantly present on the internet for months at a time, or forever, an attacker could theoretically track you, suss you out, and come back later at any time to collect.
 

Originally written by Benjamin Rich, Web master of CSD.

This article was researched and slightly modified by Pacific Websites.

Do you need research for your project? Call us today.

 

Alan Pattinson      www.PacificWebSites.com

Website Creation, Consulting, and Marketing

1484 Dogwood Ave. Comox, B.C., V9M 2Z5

 “HELPING YOUR BUSINESS SUCCEED ONLINE”


RoboForm remembers your passwords. http://www.roboform.com

Pacific Websites ] Top Listings in Search Engines ] Services ] Portfolio ] Make Your Site SELL ] Domain Names ] Saving Money ] Virus ] Maintenance ] Partners ] Search ] [Payments] [Contact]

A-1 Pacific Websites
Alan Pattinson, Internet Consultant
1484 Dogwood Avenue
Comox, British Columbia,
V9M 2Z5 Canada
Phone: 250-339-2687
Monday - Friday 9 AM - 4 PM
Contact us

 

 

Can't remember your passwords? RoboForm will. Email Marketing

Copyright © 2000-  Alan Pattinson