Go Back   The macosxhints Forums > Working with OS X > OS Xperiences



Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Old 09-30-2004, 12:50 PM   #1
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,660
Thumbs up PSA: How to create a strong password.

I searched and didn't find a thread dedicated to passwords. So consider this a Public Service Announcement.

How to create a strong password.


A password is your final line of defense in computer security. I hear complaints a lot about how hard it is to remember passwords. Especially when you have to change them often. So typically people choose bad passwords because they are easy to remember. Here are the basics on making a memorable, strong password.

As an example, it's nearly October, so Halloween is right around the corner for us in the U.S. Users will be tempted (if forced to change their passwords around this time of year) to use something like "Halloween", which is a very bad password. "halloween31" is also a bad password. "H@110w33n" is a slightly less-bad password.

Any words that appear in a dictionary make cracking a password that much easier. This includes "foreign" dictionaries. These dictionaries are all readily accessible and can be used as proofs in cracking programs and applied against your password. Adding numbers to dictionary words doesn't increase the password's strength worth a wit. Even with trivial character replacements like capital letters and non-alphanumeric symbols, you're not getting a strong password.

Trust me, if you've thought of it, so have "they".


A true strong password should consist of 8 or more characters and be part of a "passphrase". A passphrase consists of a phrase that has special meaning to you, therefore making it easier to remember. For this example, I will choose:

Homer Simpson for President. I am serious!

One simple approach to create a better password is to take the first letter of each word in your passphrase, giving you:

hsfpias

That looks seemingly random, and it's a fairly hard password to crack, but it's too short. Only 7 characters. Why not make it harder by using the punctuation from the sentence?

hsfp.ias!

Now that is a much harder password to crack. Why stop there? Let's step it up a bit more by capitalizing some letters and adding some numbers, say, the year we need to vote Homer in:

HSfp.ias!04

Voila, a truly difficult password to crack, but is still pretty easy to remember. Feel free to liberally salt it with non-alphanumeric character replacements for greater difficulty (but a bit of "unwieldiness"). For example, replacing an "a" with a "@", and/or a "s" with a "$", leaving us with:

HSfp.i@$!04

A password cracker will give up and move onto greener pastures (read: more easily broken passwords) long before this one is cracked.



I hope this helps you choose a better password for yourself.

Last edited by yellow; 09-30-2004 at 01:14 PM. Reason: fixing crazy syntax
yellow is offline   Reply With Quote
Old 09-30-2004, 01:09 PM   #2
CAlvarez
Hall of Famer
 
Join Date: Sep 2004
Location: Phoenix, AZ
Posts: 4,974
Consider it stolen and sent to all my users.

Next up: DON'T SHARE PASSWORDS. I was walking down the hallway the other day, and heard someone say she wanted to log into someone else's computer. The someone else yelled back her password from the lunch room. Argh.

Oh yeah, it was simply her son's name.
__________________
--
Carlos Alvarez, Phoenix, AZ

"MacBook Nano" (Lenovo S10) Atom 1.6/2GB/160GB Mac OS X 10.5.6
Gigabyte Quad Core 2.83GHz Hackintosh 4GB/500GB Mac OS X 10.5.5
MacBook Air 1.8/2GB/64GB SSD

http://www.televolve.com
CAlvarez is offline   Reply With Quote
Old 09-30-2004, 01:34 PM   #3
derekhed
All Star
 
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 646
Thanks for starting this Yellow.

Here is a good link to read with oodles (technical term) of stuff for the inquisitive.

Perhaps this should be a thread under a general security PSA? That could include firewalls, using SSH, hardening servers, ports and services, as well as real-world experiences.
__________________
...if only you could see what I've seen with your eyes!
- Batty, Blade Runner
derekhed is offline   Reply With Quote
Old 09-30-2004, 01:51 PM   #4
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,660
Good link, thanks derekhed.
yellow is offline   Reply With Quote
Old 09-30-2004, 02:56 PM   #5
AHunter3
Hall of Famer
 
Join Date: Jan 2002
Location: New York City
Posts: 2,830
Wasn't there a little utility awhile back that would while away it's time trying to suss out your password? If you left it whirring overnight and it hadn't come up all pompously full of itself for having hacked you by the time you checked it next morning, you had an adequately good pw.

Named after some fictional character, IIRC.
AHunter3 is offline   Reply With Quote
Old 09-30-2004, 03:00 PM   #6
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,660
John the Ripper

A util I've used many time to check my user's passwords, per Enterprise policy. In my estimation, if I couldn't crack their passwords in 2-3 weeks, it was more then good enough to meet policy.
yellow is offline   Reply With Quote
Old 09-30-2004, 04:17 PM   #7
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
In Panther you can try:
Lepton's Crack
sao is offline   Reply With Quote
Old 10-01-2004, 01:10 AM   #8
Las_Vegas
League Commissioner
 
Join Date: Sep 2004
Location: Las Vegas
Posts: 5,875
I've also been recommending pretty much the same technique. I add to replace words like 'for' 'a' and 'and' with numbers or symbols like '4', '@' and '&'
__________________
Las_Vegas

-- Ts'i mahnu uterna ot twan ot geifur hingts uto.
-- Sometimes I wonder… Why is that Frisbee getting Larger? …and then it hits me.
-- Disposable thumbs make me specialer than most animals…
Las_Vegas is offline   Reply With Quote
Old 10-06-2004, 05:06 PM   #9
macmath
MVP
 
Join Date: Mar 2002
Location: Elsewhere
Posts: 1,476
Is there anything less secure about using or adapting the passphrase itself (instead of just the first letters)? For instance:

HomerSimpsonforPresidentIamserious
or
h0m3r$1mp$0nf0rpr3$1d3nt1@m$3r10u$

Can a potential intruder figure out how many characters are in your password?

If it is something like my computer where I have to type the password in again and again, then it is annoying to have to use/remember the first letter combinations (although it can be done). I use an 18 character passphrase, built like the second one above, from something my younger son said (no one would think of that choice of words or word order). I can type it in very easily and quickly.
macmath is offline   Reply With Quote
Old 10-06-2004, 05:33 PM   #10
derekhed
All Star
 
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 646
The password integrity checker I use (john the ripper) has lots of regular expressions that look for exactly what you are doing, replacing certain letters with symbols that look alike. Basically, if you start with a word that can be found in a dictionary in any language, most variations using this kind of replacement will be found. Same thing with tagging numbers on the ends. That is why the previous posts did not use words, but strings built up from phrases.
__________________
...if only you could see what I've seen with your eyes!
- Batty, Blade Runner
derekhed is offline   Reply With Quote
Old 10-06-2004, 05:43 PM   #11
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,660
Quote:
Originally Posted by macmath
Is there anything less secure about using or adapting the passphrase itself (instead of just the first letters)?

I think any security reduction (because then you are using words that (mostly) appear in a dictionary) would probably be mitigated by the sheer length of the password. Provided the password was 15+ characters. I'll have to do some testing with our boy John.
yellow is offline   Reply With Quote
Old 10-06-2004, 05:48 PM   #12
CAlvarez
Hall of Famer
 
Join Date: Sep 2004
Location: Phoenix, AZ
Posts: 4,974
I ran John against a client's network and discovered three easy holes. One with admin privilege. I quickly earned my billables for security work this week...
__________________
--
Carlos Alvarez, Phoenix, AZ

"MacBook Nano" (Lenovo S10) Atom 1.6/2GB/160GB Mac OS X 10.5.6
Gigabyte Quad Core 2.83GHz Hackintosh 4GB/500GB Mac OS X 10.5.5
MacBook Air 1.8/2GB/64GB SSD

http://www.televolve.com
CAlvarez is offline   Reply With Quote
Old 10-06-2004, 06:24 PM   #13
derekhed
All Star
 
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 646
Quote:
Originally Posted by yellow
I think any security reduction (because then you are using words that (mostly) appear in a dictionary) would probably be mitigated by the sheer length of the password. Provided the password was 15+ characters. I'll have to do some testing with our boy John.

Keep in mind the previous post that mentions that only the first 8 characters of your password matter. Longer doesn't always mean better.
__________________
...if only you could see what I've seen with your eyes!
- Batty, Blade Runner
derekhed is offline   Reply With Quote
Old 10-06-2004, 06:29 PM   #14
hayne
Moderator
 
Join Date: Jan 2002
Location: Montreal
Posts: 29,452
Quote:
Originally Posted by derekhed
Keep in mind the previous post that mentions that only the first 8 characters of your password matter. Longer doesn't always mean better.

That was a limitation that applied in Jaguar and earlier. If you create a new user account in Panther or even change your password in Panther, all characters of the new password will be significant. Okay, there must be a limit, but I think it is 256 characters or something now.
hayne is online now   Reply With Quote
Old 10-06-2004, 06:33 PM   #15
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,660
What hayne said..
yellow is offline   Reply With Quote
Old 10-06-2004, 06:38 PM   #16
derekhed
All Star
 
Join Date: Mar 2002
Location: Anchorage, AK
Posts: 646
schweet.

Thanks!
__________________
...if only you could see what I've seen with your eyes!
- Batty, Blade Runner
derekhed is offline   Reply With Quote
Old 10-06-2004, 09:13 PM   #17
AHunter3
Hall of Famer
 
Join Date: Jan 2002
Location: New York City
Posts: 2,830
OK, John the Ripper is the one I remembered, but I find that I don't recall how to use it!

I understand how to aim it at a file but what kind of file is it expecting? I tried saving a text file with a ridiculously easy password as that file's contents (in plain text) and pointed John at it and it exited w/o finding any password.
AHunter3 is offline   Reply With Quote
Old 10-07-2004, 08:49 AM   #18
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,660
It's expecting a hashed password file, much like that you would find at /etc/passwd (except with hashed passwords). The gecos fields would look more like this:

yellow:U89tG3dl0V22q:501:20::0:0:Yellow Fellow:/Users/yellow:/bin/tcsh
yellow is offline   Reply With Quote
Old 04-20-2005, 01:43 AM   #19
ThePeterFiles
Prospect
 
Join Date: Apr 2005
Location: The Windy City
Posts: 5
Thumbs up Re: PSA: How to Create a Strong Password

Quote:
Originally Posted by yellow
A true strong password should consist of 8 or more characters and be part of a "passphrase". A passphrase consists of a phrase that has special meaning to you, therefore making it easier to remember. For this example, I will choose:

Homer Simpson for President. I am serious!

One simple approach to create a better password is to take the first letter of each word in your passphrase, giving you:

hsfpias

That looks seemingly random, and it's a fairly hard password to crack, but it's too short. Only 7 characters. Why not make it harder by using the punctuation from the sentence?

hsfp.ias!

Now that is a much harder password to crack. Why stop there? Let's step it up a bit more by capitalizing some letters and adding some numbers, say, the year we need to vote Homer in:

HSfp.ias!04

Voila, a truly difficult password to crack, but is still pretty easy to remember. Feel free to liberally salt it with non-alphanumeric character replacements for greater difficulty (but a bit of "unwieldiness"). For example, replacing an "a" with a "@", and/or a "s" with a "$", leaving us with:

HSfp.i@$!04

A password cracker will give up and move onto greener pastures (read: more easily broken passwords) long before this one is cracked.



I hope this helps you choose a better password for yourself.


Most of this I had seen before, but I found the passphrase concept very useful. Random Character Generation is very hard to crack but gets harder and harder to remember as the number of sites you register for goes up.

Thanks!

Peter
"Founder, and Chief Satirist", The International School of Blog Repair Technicians

http://thepeterfiles.blogspot.com/20...-internet.html
ThePeterFiles is offline   Reply With Quote
Old 04-20-2005, 12:19 PM   #20
nkuvu
MVP
 
Join Date: Jun 2002
Location: Tucson, Arizona
Posts: 1,236
There's an old thread on John the Ripper over at Macfora (specifically, the thread is here) that shows how to get John up and running.

Some of the info is a little dated -- notably the character limitation of Jaguar.

But one thing that's very handy is the command to generate your own password hash using the openssl command. I did this to make a pseudo-password file, with a bunch of different passwords. Which means that I can test a bunch of passwords in one run.

The only problem with this is that the openssl command truncates to eight characters*, like Jaguar. So my chosen passwords are not as secure in the password file as they are in reality. Anyone have a good way around this?


* On the plus side, it does warn you:
Aliens:~ nkuvu$ openssl passwd 'topsecret'
Warning: truncating password to 8 characters
T.sBTqYI6aTm6
nkuvu is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:09 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.
You Rated this Thread: