General Chat
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsGeneralGeneral Chat

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 13th, 2007, 03:38 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Finland
Posts: 2,332 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 26229 Folding Title: Starter FolderFolding Points: 26229 Folding Title: Starter Folder
Time spent in forums: 6 Days 16 h 34 m 49 sec
Reputation Power: 5
78 000 passwords and password hashes stolen and published

Swedish(?) crackers have stolen and published a list of 78 000 MD5/SHA1 hashes and cleartext passwords. Almost all of the passwords belong to Finnish people, so unless you're a Finn, you probably don't need to worry. If you are, see this thread.

The reason I brought this up here is that we all, as web developers, can learn something from this. The first lesson is that there indeed are people who steal login information they can't use to get money. The second lesson is that you must always validate user input and salt your hashes.

The third lesson can be gained by analyzing the password list itself. People use very weak passwords!. Here's a list of common passwords from the list, which may or may not have short numeric strings attached to them. Most numeric strings were four numbers, so I'm guessing they could be using their cell phone or bank card PINs.
  • the user's username
  • the user's first name
  • the name of a loved one
  • a pet's name
  • the user's phone number
  • the user's social security number
  • the user's birthday
  • "salasana" (Finnish for "password", a lot of these on the list)
  • "tietokone" (Finnish for "computer", a lot of these too)
  • "villevalo" (See the Wikipedia article)
  • "perkele" (Wikipedia)
  • "pillu" (a very informal word for female genitalia. The male counterpart was found too)
  • "helppomuistaa" ("easytoremember")

NOTE: The list above contains actual passwords from the list. WIthout knowing the username and the service they are used for, however, they are useless, so that's why I dared to post them. Besides, those passwords are so damn weak, that I think they had it coming.

The last one sums up what people feel about passwords -- they need to be easy to remember. They have no problem with security, since they don't believe they would ever be targets. The developer of the login system, however, has the power to decide what kind of passwords can be allowed. I recommend the common but not too common check that the password has at least one lowercase, one uppercase and one numerical character, and is at least eight characters long. I'm also starting to think that a dictionary check wouldn't hurt.

Also note that people tend to use the same password for multiple services. So if another service is cracked, it can cause additional work for you. On the other hand, if your service is cracked, it can even compromise people's emails and other sensitive information.

More: F-Secure
__________________
Fight Internet censorship!

Code:
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

Last edited by tkarkkainen : October 13th, 2007 at 04:01 PM. Reason: tags..., details

Reply With Quote
  #2  
Old October 17th, 2007, 02:27 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Click here for more information.
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,775 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 13 h 47 m 18 sec
Reputation Power: 7
ready to be scared - read http://www.codinghorror.com/blog/archives/000949.html
__________________
life is a game.... Have fun
-----------------------------
http://www.phpwomen.org
strength in unity

PHPCommunity IRC
#phpc on freenode

Reply With Quote
  #3  
Old October 21st, 2007, 08:48 AM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Finland
Posts: 2,332 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 26229 Folding Title: Starter FolderFolding Points: 26229 Folding Title: Starter Folder
Time spent in forums: 6 Days 16 h 34 m 49 sec
Reputation Power: 5
That's not so scary after all. Salting is an easy way to beat precalculation of hashes. I highly recommend the article linked to from the codinghorror.com article: Enough with the Rainbow Tables: What You Need to Know About Secure Password Schemes.

I've come to the conclusion that something like the following might be a nice way to hash passwords:

PHP Code:
 $hash sha1($username.sha1($password).$join_date.file_get  _contents("/path/to/separate/salt_file")); 


The reason I've put the sha1 hash of the password inside the string to be hashed is because if someone did go through all the trouble of cracking the above string, they would still need to crack the actual password. This will buy some time.

The username is included so that if two people who have joined the same day happened to have the same password, their hashes would be different. Join date is there just to increase the size of the string to be hashed.

salt_file should be placed outside the root directory of the web site to reduce the risk of accidental exposure. The salt should be long and consist of (truly) random characters. A separate salt file also allows you to create expiring passwords: just have a script replace the salt file periodically.

Ideas? Anything to add?

Reply With Quote
Reply

Viewing: Codewalkers ForumsGeneralGeneral Chat > 78 000 passwords and password hashes stolen and published


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 8 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek