BugTraq
Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 04:50PM
Stephen Frost (sfrost snowman net) (2 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 09:03PM
Tom Lane (tgl sss pgh pa us) (1 replies)
Stephen Frost <sfrost (at) snowman (dot) net [email concealed]> writes:
> The md5 hash which is generated for and stored in pg_shadow does not
> use a random salt but instead uses the username which can generally be
> determined ahead of time (especially for the 'postgres' superuser
> account).

So?

The fact that we encrypt the contents of pg_shadow at all is not to
provide security against breakins by people who have managed to
obtain the contents of pg_shadow. Any such attacker knows as much as
the postmaster does, and so there isn't anything much the postmaster can
do to prevent a breakin. The reason we do it is to prevent such a
person (or a dishonest DBA) from obtaining the user's actual original
password. This doesn't improve the security of the database at all,
of course, but it does improve security globally if the user used the
same password for other systems.

> This would allow for the pregeneration of the entire md5
> keyspace using that 'salt' and then quick breakage of the hash once
> it's retrieved by the attacker.

Considering the size of the possible keyspace, this is pretty silly.

> Were a decent random salt of some
> size used it would be difficult to guess and pregenerate the keyspace
> for. Thus, keyspace generation would have to happen after pg_shadow
> was compramised, giving the admin time to detect the compramise and
> take corrective action.

Another large assumption: that the admin knows about the compromise
before the results are used.

>. It is also not made clear that if you are
> already handling transport-level security via SSL and/or IPSEC that
> using md5 actually reduces security by not adding anything to the
> transport-level security and defeating the on-disk security
> effectivness of using md5 for pg_shadow.

That's simply false. The contents of pg_shadow are never sent over the
wire.

You're going to have to work a lot harder to convince us there's any
significant issue here.

regards, tom lane

[ reply ]
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 09:23PM
Jim C. Nasby (decibel decibel org) (4 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 04:50PM
Joshua D. Drake (jd commandprompt com) (2 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 07:48PM
Lance James (lancej securescience net)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 06:05PM
Stephen Frost (sfrost snowman net)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encryptedpasswords Apr 21 2005 09:06AM
Tino Wildenhain (tino wildenhain de) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted Apr 21 2005 01:32PM
Rod Taylor (pg rbt ca) (2 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted Apr 22 2005 03:33AM
Michael Samuel (michael miknet net)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted Apr 21 2005 01:47PM
Tino Wildenhain (tino wildenhain de)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 02:58AM
Jim Knoble (jmknoble pobox com) (1 replies)
RE: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 07:25PM
Mike Fratto (mfratto nwc com) (2 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 09:14PM
Jim Knoble (jmknoble pobox com)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 08:50PM
Stephen Frost (sfrost snowman net) (1 replies)
RE: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 09:14PM
Mike Fratto (mfratto nwc com) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 09:33PM
Stephen Frost (sfrost snowman net) (1 replies)
RE: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 09:57PM
Mike Fratto (mfratto nwc com)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 10:03PM
Tom Lane (tgl sss pgh pa us) (3 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 02:27AM
Stephen Frost (sfrost snowman net) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 10:27PM
Bruno Wolff III (bruno wolff to) (2 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encryptedpasswords Apr 22 2005 08:02PM
Antoine Martin (antoine nagafix co uk) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted Apr 23 2005 01:02PM
Stephen Frost (sfrost snowman net) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted Apr 23 2005 02:53PM
Antoine Martin (antoine nagafix co uk)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 22 2005 12:05AM
Stephen Frost (sfrost snowman net)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 10:10PM
Bruce Momjian (pgman candle pha pa us) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 10:17PM
Tom Lane (tgl sss pgh pa us) (1 replies)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 21 2005 12:26AM
David F. Skoll (dfs roaringpenguin com)
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 10:08PM
Jim C. Nasby (decibel decibel org)
Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 07:36PM
David F. Skoll (dfs roaringpenguin com) (1 replies)
Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords Apr 20 2005 07:44PM
Stephen Frost (sfrost snowman net)


 

Privacy Statement
Copyright 2010, SecurityFocus