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

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




Password

 
Reply to this topicStart new topic

Password

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

New D.I.C Head
*

Joined: 8 Jul, 2008
Posts: 39

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
+Quote Post

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

D.I.C Addict
Group Icon

Joined: 30 Jun, 2008
Posts: 578



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
+Quote Post

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

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 50 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
+Quote Post

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

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 2,031



Thanked: 105 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 offlineProfile CardPM
+Quote Post

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

New D.I.C Head
*

Joined: 8 Jul, 2008
Posts: 39

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
+Quote Post

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

D.I.C Head
Group Icon

Joined: 12 Sep, 2008
Posts: 110


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
+Quote Post

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

D.I.C Addict
Group Icon

Joined: 30 Jun, 2008
Posts: 578



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
+Quote Post

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

D.I.C Addict
Group Icon

Joined: 5 Jun, 2008
Posts: 738



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
+Quote Post

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

D.I.C Head
Group Icon

Joined: 12 Sep, 2008
Posts: 110


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
+Quote Post

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

eeeAddict
Group Icon

Joined: 17 Mar, 2008
Posts: 1,066



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
+Quote Post

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

D.I.C Head
Group Icon

Joined: 12 Sep, 2008
Posts: 110


Dream Kudos: 75
My Contributions
Good but can we decrypt the SAM file to know the password
of the system


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 09:49PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month