推荐工具
HackBar(firefox 插件)
基本使用
- load url ——载入当前url地址
- spilt url ——剪切网址(把网址和后面添加的数据分割开)
- execute ——执行
- 还有很多功能,具体使用方法可自查
【该插件方便我们修改url内容,其中还支持各种编码和sql注入语句,是sql注入练习的一大利器】
重要参数(以下参数皆存在系统数据库中)
information_schema:系统数据库名
schemata: 存放所有数据库名的表
schema_name:上一个表里面的列,存放所有数据库名
tables: 存放所有数据库中全部表的表
table_schema: 上一个表里面的列,存放数据库中所有的表所在的数据库名(在columns表中也有)
table_name: 上一个表里面的列,存放所有数据库中所有的表名(在columns表中也有)
columns:存放所有数据库中全部列的表
column_name: 上一个表里面的列,存放所有数据库中所有的列名
几个参数间的关系:
information_schema数据库中有schemata、tables、column这个三表:schemata表里面有schema_name;tables表里面有table_schema、table_name这两列; columns表里面有table_schema、table_name、column_name
破数据库
猜数据库(所有的)
select schema_name from information_schema.schemata
(如果要知道当前数据库直接用database())
猜某库的数据表
select table_name from information_schema.tables where table_schema='xxxxx'(数据库名)
猜某表的所有列
Select column_name from information_schema.columns where table_name='xxxxx'
获取某列的内容
Select ... from ...
系统函数
1.version()——MySQL 版本
-
user()——数据库用户名 -
database()——数据库名 -
@@datadir——数据库路径 -
@@version_compile_os——操作系统版本
数据库的连接函数,常用的是concat和concat_ws:
concat_ws:第一个参数是连接字符串的分隔符,可以在数据在一个位置里按想要的格式输出
(例:concat_ws(',',id,username,password))
group_concat():获得想要的信息从某个表
(例如:group_concat(username,'/',password),中间加个/是为了隔开)









网友评论