跨站漏洞成功演示代码:
[font=expression(container.document.write(unescape('%3Ciframe%20src%3D%27http%3A//www.godx.cn%27%3E%3C/iframe%3E')))]God[/font]
对策。。。屏蔽关键字
如果不用屏蔽关键字的办法, 则使用下面的办法修补漏洞
用记事本打开 guestbook.asp
查找
以下是代码片段: <%=UBBCode(HtmlEncode(GuestDB("book_Content")),0,GBSet.getKeyValue("ubbCode"),GBSet.getKeyValue("ImgCode"),GBSet.getKeyValue("autoURL"),1)%> |
改成
以下是代码片段:
<%=CheckStr(UBBCode(HtmlEncode(GuestDB("book_Content")),0,GBSet.getKeyValue("ubbCode"),GBSet.getKeyValue("ImgCode"),GBSet.getKeyValue("autoURL"),1))%>
|
同样
cls_article.asp
以下是代码片段: <%=UBBCode(HtmlEncode(blog_CommContent),commArr(4,Pcount),blog_commUBB,blog_commIMG,commArr(7,Pcount),commArr(9,Pcount))%> |
改成
以下是代码片段: <%=CheckStr(UBBCode(HtmlEncode(blog_CommContent),commArr(4,Pcount),blog_commUBB,blog_commIMG,commArr(7,Pcount),commArr(9,Pcount)))%>
|