【Hacker News搬运】Ruby SAML遭受XML签名包装攻击
-
Title: Ruby-SAML pwned by XML signature wrapping attacks
Ruby SAML遭受XML签名包装攻击
Text:
Url: https://ssoready.com/blog/engineering/ruby-saml-pwned-by-xml-signature-wrapping-attacks/
很抱歉,我无法直接访问外部链接来获取内容。但是,我可以根据你提供的标题和描述来给出一个假设性的分析。 标题:“Ruby SAML 暴露于 XML 签名封装攻击” 分析: 1. **背景**:SAML (Security Assertion Markup Language) 是一种在网络上进行身份验证和授权的数据格式。它常用于单点登录(SSO)和联合身份验证。 2. **问题**:文章提到 Ruby 中的 SAML 实现存在安全问题,具体来说是 XML 签名封装攻击。 3. **XML 签名封装攻击**:这种攻击类型涉及对 XML 文档的签名进行封装,以隐藏或修改原始内容。攻击者可能会利用这个漏洞来篡改 SAML 断言,从而欺骗系统进行非法访问。 4. **影响**:由于 SAML 常用于身份验证和授权,这种漏洞可能导致未经授权的用户获取对敏感资源的访问权限。 5. **Ruby SAML**:这表明问题可能出在 Ruby 语言实现的 SAML 库中。这可能是 Ruby on Rails 或其他 Ruby 应用程序使用的库。 6. **解决方案**:文章可能会讨论如何修复这个漏洞,包括更新受影响的库、改变配置或实施额外的安全措施。 7. **总结**:文章可能强调了在处理 SAML 和 XML 签名时需要特别注意安全问题,并提供了有关如何防范此类攻击的指导。 请注意,以上分析基于标题和常见的安全漏洞类型。要获取准确的信息,您需要阅读文章本身。如果您需要将内容翻译成中文,您可以使用在线翻译工具或人工翻译服务。
Post by: ucarion
Comments:
stouset: SAML is absolutely insane. It’s <i>three</i> separate specs: one that defines what every XML element means semantically, one that defines multiple document models that you might want to combine those to use, and one that talks about network protocols you might want to use those documents in.<p>It’s insane and inscrutable.<p>I previously worked at the company that first created this gem. It was not written based off actually reading the spec. It was based off a loose examination of what other legitimate docs in the wild looked like, and built to parse those.<p>Which of course meant that early on it was vulnerable to <i>everything</i> since it was built to fit positive results and not negative ones. This isn’t even the first XML signature issue: early released versions didn’t even bother to check that the part being used was the part that was signed. If <i>any</i> part of the doc was signed and valid it was good to go.<p>Fun times.
stouset: SAML简直疯了。这是三个独立的规范:一个定义了每个XML元素在语义上的含义,一个定义你可能想组合使用的多个文档模型,一个讨论你可能想在其中使用这些文档的网络协议。<p>这很疯狂,也很难理解<p> 我之前在第一家创造这种宝石的公司工作过。它不是基于实际阅读规范而编写的。它是基于对其他合法文档的松散检查,并为解析这些文档而构建的<p> 当然,这意味着早期它很容易受到<i>所有</i>的影响,因为它是为了适应积极的结果而不是消极的结果而构建的。这甚至不是第一个XML签名问题:早期发布的版本甚至懒得检查所使用的部分是否是已签名的部分。如果<i>文档的任何</i>部分已签名并有效,则可以继续<p> 有趣的时光。
caust1c: I know very little about XML and SAML, but from what little I do know it shocks me that it's still the de-facto standard for SSO.<p>Great analysis and thanks for sharing!
caust1c: 我对XML和SAML知之甚少,但据我所知,它让我感到震惊;这仍然是SSO的事实标准<p> 很好的分析,谢谢分享!
bfrog: Signed xml alone is a wildly confusing idea, as the signatures get embedded as elements in the document being signed. There’s a wild set of rules on how to make xml canonical, sign, add the signature, etc. It’s nontrivial.
bfrog: 单独使用签名的xml是一个非常令人困惑的想法,因为签名作为元素嵌入到正在签名的文档中。关于如何使xml规范化、签名、添加签名等,有一套规则。这并不简单。
bawolff: SAML has to be one of the worst security specs ever
bawolff: SAML必须是有史以来最糟糕的安全规范之一
zb3: Unfortunately XML signatures are also widely used in Polish government APIs which citizens/companies are required to use
zb3: 不幸的是,XML签名也广泛用于波兰政府API;公司必须使用:(