当前位置:网站首页>复现20字符短域名绕过
复现20字符短域名绕过
2022-08-04 03:09:00 【Lord Chaser】
一、在Kali上安装beef-xss
1、在kali命令上中输入
apt install beef-xss
2、安装成功后,使用如下命令运行beef
beef-xss
运行成功如下图所示:
3、之后使用浏览器访问,在输入框中输入beef-xss显示的IP地址,这里之所以显示127.0.0.1是因为我的kali目前没有连接网络,若连接网络则会显示当前的IP地址
至此,输入用户名和密码,默认用户名为beef,密码为自身设置的密码
二、搭建GalleryCMS服务器
1、将解压包解压到phpstudy_pro/WWW目录下 ,找到文件application/config/database.php文件,修改文件中的数据库的用户名和密码为本机上的用户名和密码一样。
2、打开服务器和数据库,新增一个网站,将解压的GalleryCMS路径放到根目录下,域名设置为文件名。重启Apache服务和Mysql。
三、复现
1、创建一个新的相册
2、使用F12可以看到刚才输入的“aaaa”被传输到了a标签中
3、在输入框中输入<script>alert(1)</script>发现报错
4、此时查看数据表发现输入的<script>标签被过滤掉了
5、此时查看源码D:\PHPstudy\phpstudy_pro\WWW\GalleryCMS2.0\application\controllers\album.php
可以看到这里用了45的字符长度限制和xss-clean进行过滤;将xss-clean删掉后再次输入,出现弹窗,并且每次返回页面都会有这个弹窗,说明在创建的时候已经入库了,每访问一次,便会执行一次。
6、说明可以使用js代码。但xss_clean过滤了很多的标签,但没有过滤掉<svg>标签,所以使用<svg>进行测试
发现仍然可以弹窗,说明<svg>标签可以使用
但此时这些指令长度已经有21个字符了
那么,只能缩短域名
- ff ff
- ℠ sm
- ㏛ sr
- st st
- ㎭ rad
- ℡ tel
使用如上的符号,可以取代我们的域名,但仅仅这样,也超过了20个字符,那么既然我们是白盒测试,则可将源码中的clean_xss删除,这样就可以解除<script>标签的限制,因为HTML有自动纠错的功能,所以我们可以不将<script>标签闭合,这样就可以使用我们的payload了!
边栏推荐
- MySQL query optimization and tuning
- "Introduction to nlp + actual combat: Chapter 8: Using Pytorch to realize handwritten digit recognition"
- Y86. Chapter iv Prometheus giant monitoring system and the actual combat, Prometheus storage (17)
- LeetCode每日一题(2285. Maximum Total Importance of Roads)
- 出现504怎么办?由于服务器更新导致的博客报504错误[详细记录]
- docker+bridge+redis master-slave+sentry mode
- 6口全千兆二层网管型工业以太网交换机千兆2光4电光纤自愈ERPS环网交换机
- 返回字符串中的最大回文数
- 逻辑漏洞----其他类型
- db2中kettle报错 Field [XXX] is required and couldn‘t be found 解决方法
猜你喜欢
随机推荐
keytool命令
What is the source of flinkcdc consuming mysql binlog data without sqltype=delete
Architecture of the actual combat camp module three operations
三分建设,七分管理!产品、系统、组织三管齐下节能降耗
db2中kettle报错 Field [XXX] is required and couldn‘t be found 解决方法
哎,又跟HR在小群吵了一架!
There are too many systems, how to realize multi-account interworking?
【项目实现】Boost搜索引擎
Mockito unit testing
逻辑漏洞----其他类型
如何在MySQL中的数据库下删除所有的表
sqoop ETL工具
2千兆光+6千兆电导轨式网管型工业级以太网交换机支持X-Ring冗余环网一键环网交换机
如何读取 resources 目录下的文件路径?
【源码】使用深度学习训练一个游戏
Dong mingzhu live cold face away, when employees frequency low-level mistakes, no one can understand their products
单片机C语言->的用法,和意思
Zabbix set up email alert + enterprise WeChat alert
SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropri
esp8266-01s刷固件步骤








