本文介绍了在pg_shadow中加密密码加盐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我读到pg_shadow中的密码哈希是用用户名加密的。 这仍然是这样吗?如果是这样,因为可能99%的PostgreSQL都有 " postgres"作为超级用户名,使用标准的 Unix / Apache MD5哈希不是更好吗? - dave ---------------------------(播出结束)------- -------------------- 提示2:您可以使用取消注册命令一次性取消所有列表 (发送取消注册YourEmailAddressHere到 ma*******@postgresql.org ) 解决方案 如何改进?如果我们在其中添加一个随机盐,我们将要求b 必须将盐存储在pg_shadow中,所以不会有任何保密 加上---一个可以阅读pg_shadow的攻击者也可以看到盐。 (实际上,能够读取pg_shadow的攻击者已经是超级用户, 所以它是'不清楚还有什么可以躲避他的。) 问候,汤姆小巷 ------- --------------------(广播结束)------------------------- - 提示5:您是否检查过我们广泛的常见问题解答? http://www.postgresql.org/docs/faqs/FAQ.html Tom Lane写道: 考虑一下创建一个长列表的人: MD5(postgres+" aaaaaaaa) MD5(postgres+aaaaaaab) MD5(postgres+aaaaaaac) ... 现在,如果他可以访问其他人的pg_shadow,他可以将 哈希与他的字典进行比较。替换postgres随机盐 击败这个字典攻击(因此他将不得不求助于粗暴的 力量)。 (实际上,攻击者谁能读懂pg_shadow已经是超级用户了,所以不清楚还有什么东西可以躲避他。) 但是考虑一下找到包含数据库的硬盘或磁带的人 备份......然后他可以访问真实的在线数据库。 - dave ---------------------------(播出结束)--- ------------------------ 提示3:如果通过Usenet发布/阅读,请发送相应的 subscribe-nomail命令 ma*******@postgresql.org 以便 消息可以干净地通过邮件列表 但你肯定必须将随机盐存储在pg_shadow中?或者我是否b $ b缺少一些东西? - Richard Huxton Archonet Ltd ---------------------------(广播结束)-------- ------------------- 提示6:您是否搜索了我们的列表档案? http://archives.postgresql.org I read that the password hash in pg_shadow is salted with username. Isthis still the case? If so, since probably 99% of all PostgreSQL has"postgres" as the superuser name, wouldn''t it be better to use standardUnix/Apache MD5 hash instead?--dave---------------------------(end of broadcast)---------------------------TIP 2: you can get off all lists at once with the unregister command(send "unregister YourEmailAddressHere" to ma*******@postgresql.org) 解决方案How does that improve anything? If we add a random salt into it, we''dhave to store the salt in pg_shadow, so there wouldn''t be any secrecyadded --- an attacker who can read pg_shadow could see the salt too.(Actually, an attacker who can read pg_shadow is already superuser,so it''s not clear there''s anything left to hide from him anyway.)regards, tom lane---------------------------(end of broadcast)---------------------------TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.htmlConsider someone who creates a long list of:MD5( "postgres" + "aaaaaaaa" )MD5( "postgres" + "aaaaaaab" )MD5( "postgres" + "aaaaaaac" )...Now if he has access to other people''s pg_shadow, he can compare thehashes with his dictionary. Replacing "postgres" with a random saltdefeats this dictionary attack (and thus he will have to resort to bruteforce). (Actually, an attacker who can read pg_shadow is already superuser, so it''s not clear there''s anything left to hide from him anyway.)But consider someone who finds a harddisk or tape containing a databasebackup... he can then gain access to the real, online database.--dave---------------------------(end of broadcast)---------------------------TIP 3: if posting/reading through Usenet, please send an appropriatesubscribe-nomail command to ma*******@postgresql.org so that yourmessage can get through to the mailing list cleanlyBut surely you have to store the random salt in pg_shadow too? Or am Imissing something?--Richard HuxtonArchonet Ltd---------------------------(end of broadcast)---------------------------TIP 6: Have you searched our list archives? http://archives.postgresql.org 这篇关于在pg_shadow中加密密码加盐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 01:21