多语言展示
当前在线:422今日阅读:100今日分享:18

MySQL手工注入查询语法

在MySQL注入过程中发现可注入的漏洞,如何高效的获取数据库的数据信息呢?本次主要记录MySQL的功能查询语句。
工具/原料

phpstudy https://jingyan.baidu.com/article/a3f121e4879a86fc9052bb05.html

方法/步骤
1

首先我们先下载phpstudy安装,打开MySQL命令行模式,默认用户名密码为root/root。详细安装可查看工具。

2

查询数据库中所有的库的信息,语法:select schema_name from information_schema.schemata;

3

查询某个库中的所有表名,Example:查询security库中的表名,select table_name from information_schema.tables where table_schema='security';查询security库中的所有表如下图。

4

查询某个表中的某列数据,Example: select column_name from information_schema.columns where table_name='users';查询users的多有列如下图。

5

获取表格中的数据,语法select 列名 from 库名.表名 Example:获取users中username及password的数据:select username,password from security.users;

注意事项
1

查询库名或表名等需要加引号,也可将查询目标更改为16进制数值进行查询。

2

查询数据过程中多个列名可以使用逗号隔开进行多列数据查询。

推荐信息