当前位置:网站首页>CTF show WEB10
CTF show WEB10
2022-06-21 08:00:00 【旋风1+1】
题目地址:https://ctf.show
打开页面点击取消按钮,出现源码。$regex = "/(select|from|where|join|sleep|and|\s|union|,)/i";
从源码中可以得知几乎把注入用到的关键词过滤的差不多了。
如果只有这一条现在可以采用双写绕过,但是下面这条限制,使得无法双写绕过
if(strlen($username)!=strlen(replaceSpecialChar($username))){
die("sql inject error");
}
这里介绍两个mysql语句
①group by(将结果集中的数据行根据选择列的值进行逻辑分组)
不加group by时的输出如下:
在使用group by以后会按照password中的值进行排列:
②with rollup (group by 后可以跟with rollup,表示在进行分组统计的基础上再次进行汇总统计)
来看实例:
结果中将会多出一行,其中password列为null,count(*)为统计和。
个人理解为:并不会对分组的字段进行求和,而是在下面显示为null。
这里我们就可以通过骚姿势绕过了。
其中/**/是为了绕过空格过滤
payload:username=admin'/**/or/**/1=1/**/group/**/by/**/password/**/with/**/rollup#&password=
因为加入with rollup后 password有一行为NULL,我们只要输入空密码使得(NULL==NULL)即可满足$password==$row['password']的限制成功登陆。
登录成功即可显示flag。
边栏推荐
- 微信公众号对接 : 一键推送文章信息至公众号
- Arduino about software uninstallation and library uninstallation
- 如何使用lerna进行多包(package)管理
- 1004 Counting Leaves (30 分)
- 数字孪生实际应用案例-煤矿篇
- 1005 Spell It Right (20 分)(测试点3)
- Qunhui dsm7 add kit source
- 1004 counting leaves (30 points)
- 一元多项式的乘法与加法运算 (20 分)
- How to write the statement of executing stored procedure in MySQL
猜你喜欢

How to make MySQL case insensitive

古风排版 (20 分)(测试点4)

Is the index of nine interview sites of ten companies invalid?

【kotlin】第一天

Rdkit | molecular similarity based on molecular fingerprint

微信公众号对接 : 一键推送文章信息至公众号

2022年的WordPress网站安全问题

Dynamic programming to solve the problem of looting

图解 Google V8 # 14:字节码(二):解释器是如何解释执行字节码的?

How to view the MySQL installation path
随机推荐
[Redis]-[Redis底层数据结构]-字典
Horizontal slot, one line of code can directly convert the web page to PDF and save it (pdfkit)
Yunkang group passed the hearing: the revenue exceeded 1billion in 8 months and the profit within the period was 270Million
antd table长表格如何出现滚动条
虚拟机浏览器花屏空白问题
文件下载 二进制流的形式构造url和base64下载
【kotlin】第一天
Rdkit | compound library based on murcko skeleton clustering
2021-07-28 STM32F103配置信息
The market value of Jinshan office fell below 100 billion yuan: the shareholder Qiwen n-dimensional cash out exceeded 1.2 billion yuan
Illustration Google V8 15: Hidden classes: how to quickly find object attributes in memory?
ANSA二次开发 - 外部程序采用socket与ANSA实现通信
How can we make millions a year now?
How to make MySQL case insensitive
You can't use typescript generics after reading it. Come to me for yyds dry inventory
Yyds dry goods inventory junit5 learning 3: assertions class
Figure neural network and cognitive reasoning - Tang Jie - Tsinghua University
Illustration Google V8 14: bytecode (2): how does the interpreter interpret and execute bytecode?
33 Jenkins modify plug-in source
A table to easily understand the prefix and suffix of increment and decrement operators