当前位置:网站首页>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,用大小写绕过


看看源码,多了两个匹配项目
先到这里,后期情况更新
边栏推荐
- 可昇級合約的原理-DelegateCall
- How to Create a Beautiful Plots in R with Summary Statistics Labels
- HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
- On April 17, 2022, the five heart matchmaker team received double good news
- How to Easily Create Barplots with Error Bars 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
- b格高且好看的代码片段分享图片生成
- Always report errors when connecting to MySQL database
- 行业的分析
- Tdsql | difficult employment? Tencent cloud database micro authentication to help you
猜你喜欢

Power Spectral Density Estimates Using FFT---MATLAB

GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL

K-Means Clustering Visualization in R: Step By Step Guide

PYQT5+openCV项目实战:微循环仪图片、视频记录和人工对比软件(附源码)

GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R

由粒子加速器产生的反中子形成的白洞

The selected cells in Excel form have the selection effect of cross shading

Wechat applet uses Baidu API to achieve plant recognition

YYGH-9-预约下单

How to Add P-Values onto Horizontal GGPLOTS
随机推荐
How to Create a Beautiful Plots in R with Summary Statistics Labels
What week is a date obtained by QT
JS -- take a number randomly from the array every call, and it cannot be the same as the last time
Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?
How to Create a Nice Box and Whisker Plot in R
K-Means Clustering Visualization in R: Step By Step Guide
Tiktok overseas tiktok: finalizing the final data security agreement with Biden government
HOW TO ADD P-VALUES TO GGPLOT FACETS
HOW TO CREATE AN INTERACTIVE CORRELATION MATRIX HEATMAP IN R
Pyqt5+opencv project practice: microcirculator pictures, video recording and manual comparison software (with source code)
R HISTOGRAM EXAMPLE QUICK REFERENCE
Mmrotate rotation target detection framework usage record
程序员成长第六篇:如何选择公司?
easyExcel和lombok注解以及swagger常用注解
How to Add P-Values onto Horizontal GGPLOTS
to_bytes与from_bytes简单示例
GGPlot Examples Best Reference
Principe du contrat évolutif - delegatecall
【2022 ACTF-wp】
ROS lacks catkin_ pkg