首先判断是数字型注入还是字符型注入

正常显示,说明是字符型注入,那么尝试单引号闭合

还是正常显示,尝试双引号闭合

有报错信息,含有括号,这时就应该想到,sql代码是("$id")这样写的了。直接采取闭合,判断字段数。

4不行,那就是3个字段,再看看哪些地方可以显示数据,把数据库名和版本也搞出来

后面就是利用information_schema这个库查询信息了,先看看security这个数据库中有哪些表

找到users表了,接下来看看users表中有哪些字段,这里要注意,需要同时对数据库名和表名做限制,不然会出现很多其他表的字段

接下来看看username和password中的所有值吧

大功告成!