【问题标题】:How to avoid a XSP/Domino Cross-Site Scripting Vulnerability?如何避免 XSP/Domino 跨站脚本漏洞?
【发布时间】:2012-12-22 08:47:49
【问题描述】:

在引用 /xsp/.ibmmodres/XSP/Domino 资源时,似乎可以在 get 请求中注入 javascript。

通常,当您在 .nsf/ 资源中尝试此操作时,您会得到一个正确的默认或自定义错误页面,而不会出现 XSS 可能性。特殊字符被替换。

示例: - http://[server]/[path]/[dbname].nsf/%3Cscript%3Ealert%28document.cookie%29%3C/script%3E

结果: HTTP Web 服务器:找不到设计元素

但是参考 /xsp/.ibmmodres/ 资源,它会产生 XSS 的可能性。

例子:

  • http://[server]/[path]/[dbname].nsf/xsp/.ibmmmodres/%3Cscript%3Ealert%28document.cookie%29%3C/script%3E

结果:

  • 我收到 404 错误页面“无法加载未注册的资源 /”

  • 它执行 CSJS 并显示例如 DomAuthSessID !!

这怎么可能? 有没有办法避免这种情况? 请帮忙!

【问题讨论】:

    标签: xpages


    【解决方案1】:

    这是一篇关于如何避免这种情况的文章:

    http://www.wissel.net/blog/d6plinks/SHWL-8XS3MY

    【讨论】:

      【解决方案2】:

      检查您的 Domino 版本。它应该在 8.5.3 中修复。 FP2(不完全确定)(但肯定是 9.0 Beta)。 除此之外follow my instructions 并创建一些网络规则:

      Type of rule: HTTP response headers
      Incoming URL pattern: */xsp/.ibmxspres/*
      HTTP response codes: 404
      Expires header: Don't add header
      Custom header: Content-Type : text/plain (overwrite)
      
      Type of rule: HTTP response headers
      Incoming URL pattern: */xsp/.ibmmodres/*
      HTTP response codes: 404
      Expires header: Don't add header
      Custom header: Content-Type : text/plain (overwrite)
      

      【讨论】:

      • 感谢您的规则。这些正在工作。虽然,它在 domino 8.5.3 fp3 中并不固定。