2012-12-21 127 views
2

当引用/xsp/.ibmmodres/XSP/Domino资源时,似乎可以在get请求中注入javascript。如何避免XSP/Domino跨站点脚本执行漏洞?

正常情况下,当您在.nsf /资源中尝试此操作时,您将得到正确的默认或自定义错误页面,而无需XSS可能性。特殊字符被替换。

实施例: - HTTP:// [服务器]/[路径]/[DBNAME]。NSF /%3Cscript%3Ealert%28document.cookie%29%3C /脚本%3E

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

但引用/xsp/.ibmmodres/资源,它会产生XSS可能性。

实施例:

  • HTTP:// [服务器]/[路径]/[DBNAME]。NSF/XSP/.ibmmodres /%3Cscript%3Ealert%28document.cookie%29%3C /脚本% 3E

结果:

  • 我得到一个404的errorPage “无法加载未登记资源/”

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

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

回答

1

检查您的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) 
+0

感谢您的规则。这些工作。虽然,它不是固定在多米诺骨牌8.5.3 fp3。 –