Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- To: "Joshua D. Drake" <jd@xxxxxxxxxxxxxxxxx>
- Subject: Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- From: Stephen Frost <sfrost@xxxxxxxxxxx>
- Date: Thu, 21 Apr 2005 14:05:54 -0400
- Cc: "Jim C. Nasby" <decibel@xxxxxxxxxxx>, Tom Lane <tgl@xxxxxxxxxxxxx>, pgsql-hackers@xxxxxxxxxxxxxx, bugtraq@xxxxxxxxxxxxxxxxx
- In-reply-to: <4267D9D7.1010500@xxxxxxxxxxxxxxxxx>
- List-help: <mailto:bugtraq-help@securityfocus.com>
- List-id: <bugtraq.list-id.securityfocus.com>
- List-post: <mailto:bugtraq@securityfocus.com>
- List-subscribe: <mailto:bugtraq-subscribe@securityfocus.com>
- List-unsubscribe: <mailto:bugtraq-unsubscribe@securityfocus.com>
- Mail-followup-to: "Joshua D. Drake" <jd@xxxxxxxxxxxxxxxxx>, "Jim C. Nasby" <decibel@xxxxxxxxxxx>, Tom Lane <tgl@xxxxxxxxxxxxx>, pgsql-hackers@xxxxxxxxxxxxxx, bugtraq@xxxxxxxxxxxxxxxxx
- Mailing-list: contact bugtraq-help@xxxxxxxxxxxxxxxxx; run by ezmlm
- References: <20050420165055.GQ29028@xxxxxxxxxxxxxx> <4659.1114030998@xxxxxxxxxxxxx> <20050420212323.GT58835@xxxxxxxxxxx> <4267D9D7.1010500@xxxxxxxxxxxxxxxxx>
- User-agent: Mutt/1.5.6+20040907i
* Joshua D. Drake (jd@xxxxxxxxxxxxxxxxx) wrote:
> >Simply put, MD5 is no longer strong enough for protecting secrets. It's
> >just too easy to brute-force. SHA1 is ok for now, but it's days are
> >numbered as well. I think it would be good to alter SHA1 (or something
> >stronger) as an alternative to MD5, and I see no reason not to use a
> >random salt instead of username.
>
> If you aren't paying close enough attention to your database server to
> see that someone is trying to brute force your MD5 password you have
> bigger problems.
If the attacker knows the salt then she can do almost all of the
brute-force work up-front before even attempting to attack the system
directly. The sys admin would have no way of knowing this was
happening. Once this is done the attacker just needs the hash from
pg_shadow to quickly find the user's password (or something that hashes
to the same thing).
In this situation I'm assuming the system is using the 'password'
method in pg_hba.conf. If the system used the 'md5' method in
pg_hba.conf the attacker would need only the hash from pg_shadow to
authenticate and wouldn't need the users original password at all.
If a random salt were used in this situation, and 'password' were used
in pg_hba.conf then the attacker would be unable to determine the salt
ahead of time and would be forced to generate the keyspace after
obtaining pg_shadow to brute-force the password, a time consuming
process hopefully given the admin an opportunity to discover the
compromise.
Thanks,
Stephen
Attachment:
signature.asc
Description: Digital signature
- References:
- Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Prev by Date:
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Next by Date:
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Previous by thread:
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Next by thread:
Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
- Index(es):