【问题标题】:Is Spring Security's BCrypt implementation vulnerable?Spring Security 的 BCrypt 实现是否易受攻击?
【发布时间】:2015-06-26 17:57:33
【问题描述】:

我们公司的安全审计发现我们的 bcrypt 哈希的前缀是“$2a$”。根据 [1] 和 [2],这可能表明使用了旧的、易受攻击的 bcrypt 实现。

所以 - 这里是我的问题:

  1. Spring Security 的 bcrypt 实现是否包含该漏洞?
  2. Spring Security 是否支持“$2x$”和“$2y$”前缀?

参考:
[1]http://blog.ircmaxell.com/2012/12/seven-ways-to-screw-up-bcrypt.html
[2]http://www.openwall.com/lists/oss-security/2011/06/21/16

【问题讨论】:

    标签: spring-security bcrypt jbcrypt


    【解决方案1】:
    1. 您提供的链接是关于 BCrypt 的 C 实现中的一个漏洞。 Spring Security 实现是 jBCrypt 的一个分支,它是用 Java 编写的不同实现。

    2. 查看source code,从 3.2.5 版开始,Spring Security 不支持“$2x$”和“$2y$”前缀。该实现不包含 C 漏洞,但不能与当前基于 C 的实现(如 PHP)互操作。

    【讨论】:

    • jBCrypt 提交了一个错误以支持其他哈希前缀:code.google.com/p/jbcrypt/issues/detail?id=9
    • @koe 我认为 Google Code 网站上没有任何进展,据我所知,最后一次提交是 2010 年。
    • 没错 - 当前没有 SCM。我想这就是 Spring 分叉/复制它并将代码放在 GitHub 上的原因。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-17
    • 2015-12-31
    • 2016-04-04
    • 2016-04-29
    • 2015-06-08
    • 2014-10-12
    • 1970-01-01
    相关资源
    最近更新 更多