Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,648 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,118 people online right now. Registration is fast and FREE... Join Now!




Password

 
Reply to this topicStart new topic

Password

masipro
post 16 Aug, 2008 - 02:31 AM
Post #1


New D.I.C Head

*
Joined: 8 Jul, 2008
Posts: 36

hai,

I want to know how and where passwords are stored in computer for some applications like MS Word, MS Excel & RAR files etc. How does computer checks with password (whether it is correct or not) when we input.
Thanks
masipro
User is offlineProfile CardPM

Go to the top of the page

dineeshd
post 16 Aug, 2008 - 02:39 AM
Post #2


D.I.C Addict

Group Icon
Joined: 30 Jun, 2008
Posts: 560



Thanked 16 times

Dream Kudos: 575
My Contributions


I don't think Microsoft and RARLABS are fool enough to reveal that.
User is offlineProfile CardPM

Go to the top of the page

NickDMax
post 16 Aug, 2008 - 07:48 AM
Post #3


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,858



Thanked 47 times

Dream Kudos: 550
My Contributions


The answer depends upon the program. Most of the time the file contains the information on the password (i.e. it is not stored in the program but in the datafile).

However once you get past armature programmers no one stores passwords -- thats too unsecure (I could just open the file in a hex editor and find the password). So what they do is they use a one way hash and store the hash within the file. Then the user enters the password to open the file, you compute the hash of what they typed in and see if it matches the one stored in the file.

The key to the hash is the it is roughly "one way" meaning that it is nontrivial to go from the hash to the password. However! there is something called collision -- there may be more than one password that makes the same hash -- SO, programs that "search" for the password don't have to find the password, they just have to find something that has the same hash.

The other way that documents are password protected is to encrypt some token (perhaps the content of the file) using the password as the key. Then the program open the file it decrypts the file using the password.

So looking for the password IN the program or the file will not get you very far since they are only stored in the users head (or where ever the user puts them).
User is offlineProfile CardPM

Go to the top of the page

baavgai
post 16 Aug, 2008 - 08:05 AM
Post #4


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,967



Thanked 96 times

Dream Kudos: 475

Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions


As noted, no one stores passwords, they store hashes. You can't get a password from a hash, you can only hash given password and see if it matches what you've got.

Additionally, for a reasonably secure file, the entire contents of the standard unprotected content will have been encrypted using the password, with a basic secure wrapper around it. The application will then take the password you give it and attempt to decrypt the content. Success is achieved when the results look like a standard file. In this case, not even the hash of the password need be stored.

Contrary to the impression you may have from popular entertainment, even minimally secure files are locked tight enough to frustrate a casual attacker.
User is online!Profile CardPM

Go to the top of the page

masipro
post 18 Aug, 2008 - 11:38 PM
Post #5


New D.I.C Head

*
Joined: 8 Jul, 2008
Posts: 36

QUOTE(baavgai @ 16 Aug, 2008 - 09:05 AM) *

As noted, no one stores passwords, they store hashes. You can't get a password from a hash, you can only hash given password and see if it matches what you've got.

Additionally, for a reasonably secure file, the entire contents of the standard unprotected content will have been encrypted using the password, with a basic secure wrapper around it. The application will then take the password you give it and attempt to decrypt the content. Success is achieved when the results look like a standard file. In this case, not even the hash of the password need be stored.

Contrary to the impression you may have from popular entertainment, even minimally secure files are locked tight enough to frustrate a casual attacker.


Thanks
User is offlineProfile CardPM

Go to the top of the page

dreamincodehamza
post 18 Sep, 2008 - 02:52 PM
Post #6


D.I.C Head

Group Icon
Joined: 12 Sep, 2008
Posts: 108



Dream Kudos: 75
My Contributions


pretty stupid peoples are in dreamincode no one know where
password are stored in ms windows.

Passwords are store in the SAM file on windows try to
search on it then you wil know what exactly it is
User is offlineProfile CardPM

Go to the top of the page

dineeshd
post 19 Sep, 2008 - 02:14 AM
Post #7


D.I.C Addict

Group Icon
Joined: 30 Jun, 2008
Posts: 560



Thanked 16 times

Dream Kudos: 575
My Contributions


QUOTE(dreamincodehamza @ 19 Sep, 2008 - 04:22 AM) *
Passwords are store in the SAM file on windows

Only MS Windows user passwords are stored in SAM.

QUOTE
I want to know how and where passwords are stored in computer for some applications like MS Word, MS Excel & RAR files etc.

And masipro is asking MS Office and RAR file passwords..
User is offlineProfile CardPM

Go to the top of the page

Damage
post 19 Sep, 2008 - 02:50 AM
Post #8


D.I.C Addict

Group Icon
Joined: 5 Jun, 2008
Posts: 734



Thanked 7 times

Dream Kudos: 75
My Contributions


QUOTE

pretty stupid peoples are in dreamincode

bud, un-provoked flaming is pretty lame, just cause someone doesn't know something doesn't mean they're stupid.
User is offlineProfile CardPM

Go to the top of the page

dreamincodehamza
post 19 Sep, 2008 - 01:15 PM
Post #9


D.I.C Head

Group Icon
Joined: 12 Sep, 2008
Posts: 108



Dream Kudos: 75
My Contributions


I understand now about that who is stupid or not
and guys if anyone of you feel bad due to my
behaviour then so much sorry for that
i will not try to do like that again
User is offlineProfile CardPM

Go to the top of the page

homemade-jam
post 20 Sep, 2008 - 01:53 AM
Post #10


eeeAddict

Group Icon
Joined: 17 Mar, 2008
Posts: 1,044



Thanked 1 times

Dream Kudos: 25
My Contributions


QUOTE
pretty stupid peoples are in dreamincode no one know where
password are stored in ms windows.

Passwords are store in the SAM file on windows try to
search on it then you wil know what exactly it is


Firstly, there is no need to be so aggressive, secondly, you can only find the sam file, iirc, if you are running a linux livecd to be able to browse to that directory and copy the SAM and SYSTEM files used from SAM extraction.

There are plenty of tutorials about this (dubious) topic, see IronGeek for more information.
User is offlineProfile CardPM

Go to the top of the page

dreamincodehamza
post 20 Sep, 2008 - 01:43 PM
Post #11


D.I.C Head

Group Icon
Joined: 12 Sep, 2008
Posts: 108



Dream Kudos: 75
My Contributions


Good but can we decrypt the SAM file to know the password
of the system

User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 05:05AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month