当前位置:网站首页>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,用大小写绕过
看看源码,多了两个匹配项目
先到这里,后期情况更新
边栏推荐
- Power Spectral Density Estimates Using FFT---MATLAB
- vant tabs组件选中第一个下划线位置异常
- deepTools对ChIP-seq数据可视化
- Analyse de l'industrie
- Esp32 stores the distribution network information +led displays the distribution network status + press the key to clear the distribution network information (source code attached)
- HOW TO ADD P-VALUES TO GGPLOT FACETS
- 电脑无缘无故黑屏,无法调节亮度。
- How to Easily Create Barplots with Error Bars in R
- Compilation errors and printout garbled problems caused by Chinese content in vs2019 code
- How to Create a Nice Box and Whisker Plot in R
猜你喜欢
pgsql 字符串转数组关联其他表,匹配 拼接后原顺序展示
Three transparent LED displays that were "crowded" in 2022
Tiktok overseas tiktok: finalizing the final data security agreement with Biden government
Summary of data export methods in powerbi
亚马逊云科技 Community Builder 申请窗口开启
PgSQL string is converted to array and associated with other tables, which are displayed in the original order after matching and splicing
The selected cells in Excel form have the selection effect of cross shading
TDSQL|就业难?腾讯云数据库微认证来帮你
What is the relationship between digital transformation of manufacturing industry and lean production
6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
随机推荐
QT获取某个日期是第几周
GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
制造业数字化转型和精益生产什么关系
进入前六!博云在中国云管理软件市场销量排行持续上升
bedtools使用教程
YYGH-BUG-05
PYQT5+openCV项目实战:微循环仪图片、视频记录和人工对比软件(附源码)
MySQL比较运算符IN问题求解
HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
Three transparent LED displays that were "crowded" in 2022
多文件程序X32dbg动态调试
MySql存储过程游标遍历结果集
Basic usage of MySQL in centos8
vant tabs组件选中第一个下划线位置异常
Programmer growth Chapter 6: how to choose a company?
Homer预测motif
HOW TO ADD P-VALUES ONTO A GROUPED GGPLOT USING THE GGPUBR R PACKAGE
Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
Wechat applet uses Baidu API to achieve plant recognition
通讯录的实现(文件版本)