2012-12-21 47 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。 –