SQL注入中information_schema的作用

实验简介

实验所属系列:WEB安全应用

实验对象:WEB安全爱好者

相关课程及专业:渗透测试技术

实验时数:1小时

实验类别:实践实验类

实验目的

通过本次实验,掌握SQL注入中,通过information_schema这个数据库爆库名、表名以及字段名的原理。

实验环境

windows 7、安装wamp环境。

实验内容与实验步骤:

实验步骤一:

打开phpmyadmin实验环境:

 

 查看表:


      show tables;

 

 

 select @@datadir

 

 

 

show databases;

 

 运行mysql控制台:

 

 use information_schema; 

 

 show databases;

 

 select schema_name from schemata;。

 

 desc tables;

 

 select count(*) from tables;

 

 select * from tables limit 141,1\G

 

 show tables from sqli;

 

 select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA = 'sqli';

 

 

 

 select count(*) from columns;

 

 select * from columns limit 1661,1\G

 

 show columns from sqli.user;

 

 

select column_name from information_schema.columns where TABLE_SCHEMA='sqli' and TABLE_NAME='user';

 

 

show columns from sqli.user;

 

 分析与思考:

为什么网上的SQL注入语句中,数据库名都是用的字符的16进制值?
易于编码和解码,给过滤法的程序提供服务。

 

 

posted @ 2021-10-26 21:04  乔治Pro  阅读(45)  评论(0)    收藏  举报