不要小看注释掉的JS
Posted by adminMay 15
HTTP Response Splitting 攻击主要说明的是两个问题
一个是header插入问题。
另一个是\r\n问题。
我们来看这样一段代码:
Java代码
<script> //alert('<%=request.getParameter("username")%>'); </script>
大家都能看到,这好像有个漏洞,但是已经被补上了,注释掉了。
那既然注释掉了,就不该有问题了么?
不是的。
再看这个URL
http://localhost/index.jsp?username=kxlzx%0d%0a%0d%0aalert('kxlzx
很无奈吧?
生成了如下代码:
XML/HTML代码
<script> //alert('kxlzx alert('kxlzx '); </script>
注释掉的JS,也执行了。
所以,不要把没用的代码,注释掉的JS等,扔到html里。
代码审核是个细活,任何疏漏之处都值得注意。
转自:http://www.inbreak.net/show-136-1.html










































No comments
You must be logged in to post a comment.