|
- c* C- l6 t! V. \! _7 }
<p>当网站过滤了大部分的HTML标签和属性,我们就尝试爆破一下,看哪些标签和属性没有没过滤。</p>7 l$ y9 l* I. ^' ^5 C8 E4 W( O
<h2>爆破的步骤:</h2>" x3 z0 y2 y; e' B, R6 g
<p> 1. 首先在测试点输入我们正常的exp,并抓包发送到Intruder模块。</p>& f& u, [" M# X
<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211213553022-1529348382.png" ></p>
( H9 E2 B9 g: l" Q5 r<p> 2. 将exp改为 <§§> ,以创建有效载荷位置。</p>
6 e# s. b- g2 \. e. n. {<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211213706671-202348246.png" ></p>
# A2 j; T6 p0 _$ ^9 g: M9 }# t<p> 3. 在xss备忘单中点击:Copy tags to clipboard,点击Paste粘贴到Intruder的payload位置。</p>
; A4 m! _: c, [3 c<p> https://portswigger.net/web-security/cross-site-scripting/cheat-sheet</p>
; f- U0 ^4 M: P2 f<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211213910208-9621953.png" ></p>
5 b. P% ]3 C6 b4 U- l<p> 4. 进行爆破。发现body标签没有被过滤。</p>
9 \0 d* Z+ q- U<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211214019819-944940889.png" ></p>
* B E2 F4 W0 S! G4 |<p> 5. 将有效载荷设置为:<body%20§§=1></p>8 i) f) N* v8 z n" L
<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211214230292-1546309510.png" ></p>
$ Y( _: y, G# M* Q, L<p> 6. 在xss备忘单中点击:将事件复制到粘贴板,点击Paste粘贴到Intruder的payload位置。</p>
; F# o% b- y. _* l<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211214535613-35221747.png" ></p>0 n) ]1 n5 Z; f \# N* a
<p> 7. 进行攻击。发现onresize属性没有被过滤。</p>
; I7 V, q# `5 L& d: l: e<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211215313601-1834234454.png" ></p>
# k0 `$ H4 V @( p* n<p> 8. 构造payload,在测试位置输入,并用F12打开调试窗口时,就会弹窗。</p>( C G" z6 z/ W2 a
<p> 因为onresize属性就是窗口或框架被调整大小时触发。</p>
, I. d h+ [# `) H9 a- U% t<div class="cnblogs_code">
8 p; C4 r" `5 s& t. U/ e' ?<pre><body onresize=alert(3)></pre>; W2 f' Y6 v6 ~ e3 d0 `
</div>( p* C1 I7 c3 a* l: N" D+ ^/ Q+ B" j
<p><img src="https://img2022.cnblogs.com/blog/2742124/202202/2742124-20220211220602121-1842422690.png" ></p>$ S2 d* N' ?) a% o' I0 v% }
<p> </p>
7 g0 Y8 K# C8 ^: @% b; @) N |
|