当前位置:网站首页>XSS testing
XSS testing
2022-08-03 21:12:00 【hug kitten】
目录
实验
level2
我们首先进行<script>alert(1)</script>测试,发现不行

查看代码,You can see that the code we uploaded is enclosed in double quotes

We try to bypass the double quotes :"><script>alert(1)</script><" ,成功了,You can see that the double quotes are closed by us


level3
我们首先尝试level2的绕过方法,Sure enough, double quotes are restricted,

Try replacing it with single quotes,成功了


成功的原因:我们查看源码,It is found that there is a single quote before the double quote to close the operation,And no single quotes are encoded.So we can use single quotes for closure

level4
我们还是先用<script>alert(1)</script>测试一下

It can be seen that this page filters the angle brackets,Then let's switch to one that doesn't use angle bracketsonclik测试


测试成功
level5
我们先用aaa" οnclick="alert(1) 和 <script>alert(1)</script> 测试,It can be seen that this time it will beonclick/scriptFunctions are underlined,使其失效


Then let's test whether the angle brackets are filtered,Clearly the angle brackets are not filtering

Then we can try to change a less commonly used function to test whether the page is filtered
如:aa"> <a href="javascript:alter(1)">bbb</a>


为什么这个JavaScriptNot filtered yet,We need to look at the source code

原来,Filter in the source codescriptIt is with the angle brackets in front,然而JavaScript中scriptNo angle brackets before it,所以不符合条件.没有过滤成功,It is generally better to use regular expressions for filtering restrictions.
level6
先使用aaa" οnclick="alert(1) 和 <script>alert(1)</script>Test the rules for this page

It can be seen that the underscore is still used to invalidate the function,We move on to see if the angle brackets filter

Angle brackets are not filtered,我们继续使用aThe label tries to bypass

虽然JavaScriptNo filtering yethref被过滤了,那怎么办了,Let's try again to see if the case can be bypassed
如:aaa" ONCLICK="alter(1),绕过成功


level7
Pass the previous questions,We can guess that the previous method should not work,我们先试一下aaa" οnclick="alert(1)

可以看出,This page has been removedondisable its function,At this time, we can try to bypass it by double writingaaa" oonnclick="alert(1),成功了


level8
我们先测试一下aaa" οnclick="alert(1),发现被过滤了

Looking at the source code, you can see that this filters a lot of tags that can be used,Let's test it with coding

我们将javascript:alert(1)Submit after entity coding,bypassed successfully


level9
This page needs to be filled withhttp://的网址,We use Baidu web link test to be successful,Let's still test if we can entity-encode it:javascript:alert(1)//http://,其中在http://前面的//is used to comment out the backhttp://
编码后:javascript:alert(1)//http://
成功了:


level10
First, look at the code on the web page:

It can be seen that our input box is hidden,We can try totypechange the properties:keyword=abc&t_link=bcd&T_history=cde&t_sort=def" type="text"

After we display an input box, we can add a click event behind it:
keyword=abc&t_link=bcd&t_history=cde&t_sort=def" type="text" οnclick="alert(1)

level11
Let's start by looking at the limitations of this level,Available to submitt_sortdata is restricted,所以我们尝试使用HTTP_REFERERThis is bypassed
referer:Indicates from which page the service is accessed

我们首先在referer中提交:bbb" type="text" οnclick="alert(1)
成功了

level12
查看源码,It can be found that this level is similar to the previous one

我们选择在user_agentSubmit the test:bbb" type="text" οnclick="alert(1)


level13
查看源码,This level transfer can be seencookie中设置了user

So we need to add it when uploadinguser=
user=callme bbb" type="text" οnclick="alert(1)

成功了


边栏推荐
- ES6 introduction and let, var, const
- LeetCode_Digit Statistics_Medium_400. Nth Digit
- 9月1日起我国给予多哥等16国98%税目产品零关税待遇
- 深度学习怎么入门?零基础快速入门深度学习
- Use setTimeout to realize setInterval
- 聚焦开源与联合共创|麒麟软件出席开源峰会欧拉分论坛
- 主板设计中:网络变压器与RJ45网口之间应该保持什么样的距离?
- NAACL 2022 | 具有元重加权的鲁棒自增强命名实体识别技术
- 2022-8-3 第七组 潘堂智 锁、多线程
- False label aggregation
猜你喜欢

2021年数据泄露成本报告解读

主板设计中:网络变压器与RJ45网口之间应该保持什么样的距离?

解决npm -v查看npm版本出现npm WARN config global `--global`, `--local` are deprecated. Use `--location报错

检测和控制影子IT的五个步骤

简单又有效的基本折线图制作方法

DDD 中的几个困难问题

idea2021.1.3配置Gradle步骤

XSS线上靶场---prompt

3种圆形按钮悬浮和点击事件

From September 1st, my country has granted zero-tariff treatment to 98% of tax items from 16 countries including Togo
随机推荐
Five Steps to Detect and Control Shadow IT
leetcode 231. Powers of 2
2021年数据泄露成本报告解读
回忆三年浮沉
详解虚拟机!京东大佬出品 HotSpot VM 源码剖析笔记(附完整源码)
小朋友学C语言(1):Hello World
svg+js订单确认按钮动画js特效
leetcode 16.01. Swap numbers (swap the values of 2 numbers without using temporary variables)
主板设计中:网络变压器与RJ45网口之间应该保持什么样的距离?
DDD 中的几个困难问题
tkwebview2创作心得
ECCV 2022 | 清华&腾讯AI Lab提出REALY:重新思考3D人脸重建的评估方法
Often forget HiFlow 】 【 check-in?Use tencent cloud scenario connector to remind you every day.
通关剑指 Offer——剑指 Offer II 009. 乘积小于 K 的子数组
Linux操作Jmeter(附带:关于连接上redis无法进行写入操作的问题),JMeter配置多用户进行压力测试
StoneDB 开源社区月刊 | 202207期
编译器工程师眼中的好代码(1):Loop Interchange
Likou 59 - Spiral Matrix II - Boundary Judgment
StoneDB 助力 2022 开放原子全球开源峰会
七夕快乐!