现在的位置: 首页 > 综合 > 正文

PJblog跨站漏洞利用及修补

2012年12月24日 ⁄ 综合 ⁄ 共 794字 ⁄ 字号 评论关闭

跨站漏洞成功演示代码:

[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)))%>

抱歉!评论已关闭.